using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace SpeechLib { [ComImport] [TypeLibType(512)] [InterfaceType(1)] [Guid("5EFF4AEF-8487-11D2-961C-00C04F8EE628")] public interface ISpNotifySource { [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetNotifySink([In][MarshalAs(UnmanagedType.Interface)] ISpNotifySink pNotifySink); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetNotifyWindowMessage([In][ComAliasName("SpeechLib.wireHWND")] ref _RemotableHandle hWnd, [In] uint Msg, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetNotifyCallbackFunction([In] ref IntPtr pfnCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetNotifyCallbackInterface([In] ref IntPtr pSpCallback, [In][ComAliasName("SpeechLib.UINT_PTR")] ulong wParam, [In][ComAliasName("SpeechLib.LONG_PTR")] long lParam); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void SetNotifyWin32Event(); [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] void WaitForNotifyEvent([In] uint dwMilliseconds); [MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] IntPtr GetNotifyEventHandle(); } }