WaitForSingleObject function Null safety kernel32

int WaitForSingleObject(
  1. int hHandle,
  2. int dwMilliseconds

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

DWORD WaitForSingleObject(
  HANDLE hHandle,
  DWORD  dwMilliseconds


int WaitForSingleObject(int hHandle, int dwMilliseconds) {
  final _WaitForSingleObject = _kernel32.lookupFunction<
      Uint32 Function(IntPtr hHandle, Uint32 dwMilliseconds),
      int Function(int hHandle, int dwMilliseconds)>('WaitForSingleObject');
  return _WaitForSingleObject(hHandle, dwMilliseconds);