W
William Stacey
private readonly IntPtr hEvent;
hEvent = Win32Native.CreateEvent(null, true, false, null); //Or use
"name_of_event" in fourth parm.
if ( hEvent == IntPtr.Zero )
throw new ApplicationException("Error creating Event object.");
....
[DllImport("kernel32.dll")]
public static extern IntPtr CreateEvent(
SECURITY_ATTRIBUTES eventAttributes, //[in] Pointer to a
SECURITY_ATTRIBUTES structure.
bool manualReset, //[in]
bool initialState, //[in] Initial State.
string name //[in] File name. Pointer to null-terminated
string.
);
hEvent = Win32Native.CreateEvent(null, true, false, null); //Or use
"name_of_event" in fourth parm.
if ( hEvent == IntPtr.Zero )
throw new ApplicationException("Error creating Event object.");
....
[DllImport("kernel32.dll")]
public static extern IntPtr CreateEvent(
SECURITY_ATTRIBUTES eventAttributes, //[in] Pointer to a
SECURITY_ATTRIBUTES structure.
bool manualReset, //[in]
bool initialState, //[in] Initial State.
string name //[in] File name. Pointer to null-terminated
string.
);