GlobalAlloc function kernel32
Allocates the specified number of bytes from the heap.
To learn more, see learn.microsoft.com/windows/win32/api/winbase/nf-winbase-globalalloc.
Implementation
Win32Result<HGLOBAL> GlobalAlloc(GLOBAL_ALLOC_FLAGS uFlags, int dwBytes) {
resolveGetLastError();
final result_ = _GlobalAlloc(uFlags, dwBytes);
return .new(value: .new(result_), error: GetLastError());
}