GlobalAlloc function Null safety kernel32

int GlobalAlloc(
  1. int uFlags,
  2. int dwBytes
)

Allocates the specified number of bytes from the heap.

HGLOBAL GlobalAlloc(
  UINT   uFlags,
  SIZE_T dwBytes
);

Implementation

int GlobalAlloc(int uFlags, int dwBytes) {
  final _GlobalAlloc = _kernel32.lookupFunction<
      IntPtr Function(Uint32 uFlags, IntPtr dwBytes),
      int Function(int uFlags, int dwBytes)>('GlobalAlloc');
  return _GlobalAlloc(uFlags, dwBytes);
}