protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); try { IntPtr pUnk = IntPtr.Zero; if (WinAPI.CreateTextServices(IntPtr.Zero, this, out pUnk) < 0) throw new Win32Exception(); //Guid iid = typeof(WinInterface.ITextServices).GUID; //Marshal.QueryInterface(pUnk, ref iid, out ppv); //services = (WinInterface.ITextServices) // Marshal.GetTypedObjectForIUnknown(ppv, typeof(WinInterface.ITextServices)); } finally { //Marshal.Release(pUnk); } } [DllImport(ExternDll.Msftedit, SetLastError = true, CharSet = CharSet.Auto)] public static extern int CreateTextServices( IntPtr punkOuter, WinInterface.ITextHost pITextHost, out IntPtr ppUnk );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)