CoWaitForMultipleHandles function Null safety ole32

int CoWaitForMultipleHandles(
  1. int dwFlags,
  2. int dwTimeout,
  3. int cHandles,
  4. Pointer<IntPtr> pHandles,
  5. Pointer<Uint32> lpdwindex
)

Waits for specified handles to be signaled or for a specified timeout period to elapse.

HRESULT CoWaitForMultipleHandles(
  DWORD    dwFlags,
  DWORD    dwTimeout,
  ULONG    cHandles,
  LPHANDLE pHandles,
  LPDWORD  lpdwindex
);

Implementation

int CoWaitForMultipleHandles(int dwFlags, int dwTimeout, int cHandles,
    Pointer<IntPtr> pHandles, Pointer<Uint32> lpdwindex) {
  final _CoWaitForMultipleHandles = _ole32.lookupFunction<
      Int32 Function(Uint32 dwFlags, Uint32 dwTimeout, Uint32 cHandles,
          Pointer<IntPtr> pHandles, Pointer<Uint32> lpdwindex),
      int Function(
          int dwFlags,
          int dwTimeout,
          int cHandles,
          Pointer<IntPtr> pHandles,
          Pointer<Uint32> lpdwindex)>('CoWaitForMultipleHandles');
  return _CoWaitForMultipleHandles(
      dwFlags, dwTimeout, cHandles, pHandles, lpdwindex);
}