CreateDIBSection function gdi32
Win32Result<HBITMAP>
CreateDIBSection(
- HDC? hdc,
- Pointer<
BITMAPINFO> pbmi, - DIB_USAGE usage,
- Pointer<
Pointer< ppvBits,NativeType> > - HANDLE? hSection,
- int offset,
Creates a DIB that applications can write to directly.
To learn more, see learn.microsoft.com/windows/win32/api/wingdi/nf-wingdi-createdibsection.
Implementation
Win32Result<HBITMAP> CreateDIBSection(
HDC? hdc,
Pointer<BITMAPINFO> pbmi,
DIB_USAGE usage,
Pointer<Pointer> ppvBits,
HANDLE? hSection,
int offset,
) {
resolveGetLastError();
final result_ = _CreateDIBSection(
hdc ?? nullptr,
pbmi,
usage,
ppvBits,
hSection ?? nullptr,
offset,
);
return .new(value: .new(result_), error: GetLastError());
}