可以在中找到对s的很好解释。]public static SafeHandle test()marshal 'parameter #1': This type can only be marshaled in restricted ways."
// alternatively for HandleRef我更愿意从SafeHandle</
SafeHandle sHandle = this.ServiceHandle; // I want to do this but this fails.SetServiceObjectSecurity(sHandle, secInfo, binaryDescriptor); }如何将IntPtr(如this.ServiceHandle)转换为"System.Runtime.InteropServices.SafeHandle</e
(new HandleRef(null, _hwnd), NativeMethods.WM_KEYUP, new IntPtr(0x24), IntPtr.Zero);Thread.Sleep(1000);
NativeMethods.SendMessage(new HandleRef(NativeMethods.SendMessage(new <em