CoWaitForMultipleObjects function Null safety ole32

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

A replacement for CoWaitForMultipleHandles. This replacement API hides the options for CoWaitForMultipleHandles that are not supported in ASTA.

HRESULT CoWaitForMultipleObjects(
  DWORD        dwFlags,
  DWORD        dwTimeout,
  ULONG        cHandles,
  const HANDLE *pHandles,
  LPDWORD      lpdwindex
);

Implementation

int CoWaitForMultipleObjects(int dwFlags, int dwTimeout, int cHandles,
    Pointer<IntPtr> pHandles, Pointer<Uint32> lpdwindex) {
  final _CoWaitForMultipleObjects = _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)>('CoWaitForMultipleObjects');
  return _CoWaitForMultipleObjects(
      dwFlags, dwTimeout, cHandles, pHandles, lpdwindex);
}