MsgWaitForMultipleObjects function Null safety user32

int MsgWaitForMultipleObjects(
  1. int nCount,
  2. Pointer<IntPtr> pHandles,
  3. int fWaitAll,
  4. int dwMilliseconds,
  5. int dwWakeMask
)

Waits until one or all of the specified objects are in the signaled state or the time-out interval elapses. The objects can include input event objects, which you specify using the dwWakeMask parameter.

DWORD MsgWaitForMultipleObjects(
  DWORD        nCount,
  const HANDLE *pHandles,
  BOOL         fWaitAll,
  DWORD        dwMilliseconds,
  DWORD        dwWakeMask
);

Implementation

int MsgWaitForMultipleObjects(int nCount, Pointer<IntPtr> pHandles,
    int fWaitAll, int dwMilliseconds, int dwWakeMask) {
  final _MsgWaitForMultipleObjects = _user32.lookupFunction<
      Uint32 Function(Uint32 nCount, Pointer<IntPtr> pHandles, Int32 fWaitAll,
          Uint32 dwMilliseconds, Uint32 dwWakeMask),
      int Function(int nCount, Pointer<IntPtr> pHandles, int fWaitAll,
          int dwMilliseconds, int dwWakeMask)>('MsgWaitForMultipleObjects');
  return _MsgWaitForMultipleObjects(
      nCount, pHandles, fWaitAll, dwMilliseconds, dwWakeMask);
}