public static IntPtr RegisterWait(IntPtr handle, RegisterWaitCallback callback, object argument, int timeoutMilliseconds) { IntPtr waitHandle; Win32.RtlRegisterWait( out waitHandle, handle, (context, timeout) => callback(argument, timeout), IntPtr.Zero, timeoutMilliseconds, WtFlags.ExecuteDefault ).ThrowIf(); return waitHandle; }
public static IntPtr RegisterWait(IntPtr handle, RegisterWaitCallback callback, object argument, int timeoutMilliseconds) { IntPtr waitHandle; Win32.RtlRegisterWait( out waitHandle, handle, (context, timeout) => callback(argument, timeout), IntPtr.Zero, timeoutMilliseconds, WtFlags.ExecuteDefault ).ThrowIf(); return(waitHandle); }