title: IspObjectToken::DisplayUI
body: <p>I tried to use IspObjectToken::DisplayUI from SAPI 5.4 in C# and I don't know what are the exact parameters for that.</p>
  
  <pre><code>void ISpObjectToken.DisplayUI(ref _RemotableHandle HWndParent, string pszTitle, string pszTypeOfUI,IntPtr pvExtraData, uint cbExtraData,object punkObject)
  </code></pre>
  
  <p>I know that we should put null for <code>pszTitle</code>, and for <code>pszTypeOfUI</code> we should use one of supported UI like <code>MicTraining</code> or <code>AddRemoveWord</code> , But I know nothing about the rest of it. I'm using windows 7 on my laptop.</p>
  
  <p><strong>Edit:</strong> This is the code that I wrote and obviously it's not working.</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
      {
          int pfSupported;
          string extradata = "test\0";
          IntPtr pvExtraData = Marshal.StringToHGlobalUni(extradata);
          uint cbExtraData = (uint)extradata.Length * sizeof(Char);
          Speechlib._RemotableHandle rh = new Speechlib._RemotableHandle();
          rh = getRemotableHandle(this.Handle);
          ISpObjectToken isot = (ISpObjectToken)new SpObjectToken();
  
          isot.IsUISupported("AddRemoveWord", pvExtraData, cbExtraData, null, out pfSupported);
          if (pfSupported == 1)
          {
              isot.DisplayUI(ref rh, null, "AddRemoveWord", pvExtraData, cbExtraData, null);
          }
      }
      SpeechLib._RemotableHandle getRemotableHandle(IntPtr handle)
      {
          IntPtr address = Marshal.AllocHGlobal(IntPtr.Size);
          Marshal.WriteIntPtr(address, handle);
          return (SpeechLib._RemotableHandle)Marshal.PtrToStructure(address, typeof(SpeechLib._RemotableHandle));
      }
  </code></pre>