I use this code to load embedded resource (bitmap image)
HRSRC hResInfo = ::FindResource(hInstance, MAKEINTRESOURCE(resourceId), RT_BITMAP); HGLOBAL hRes = ::Loa
CreateFile(), WriteFile(), and CloseHandle().
CreateFile()
WriteFile()
CloseHandle()
WriteFile() takes a pointer and a size so can write from the locked resource directly.