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) {
final result_ = GlobalAlloc_Wrapper(uFlags, dwBytes);
return .new(value: .new(result_.value.ptr), error: result_.error);
}