WaitForSingleObject function kernel32

Win32Result<WAIT_EVENT> WaitForSingleObject(
  1. HANDLE hHandle,
  2. int dwMilliseconds
)

Waits until the specified object is in the signaled state or the time-out interval elapses.

To learn more, see learn.microsoft.com/windows/win32/api/synchapi/nf-synchapi-waitforsingleobject.

Implementation

Win32Result<WAIT_EVENT> WaitForSingleObject(
  HANDLE hHandle,
  int dwMilliseconds,
) {
  final result_ = WaitForSingleObject_Wrapper(hHandle, dwMilliseconds);
  return .new(value: .new(result_.value.u32), error: result_.error);
}