@@ -982,6 +982,7 @@ var (
982
982
endPage uintptr
983
983
extCreatePen uintptr
984
984
getDeviceCaps uintptr
985
+ getDIBits uintptr
985
986
getEnhMetaFile uintptr
986
987
getEnhMetaFileHeader uintptr
987
988
getObject uintptr
@@ -1041,6 +1042,7 @@ func init() {
1041
1042
endPage = MustGetProcAddress (libgdi32 , "EndPage" )
1042
1043
extCreatePen = MustGetProcAddress (libgdi32 , "ExtCreatePen" )
1043
1044
getDeviceCaps = MustGetProcAddress (libgdi32 , "GetDeviceCaps" )
1045
+ getDIBits = MustGetProcAddress (libgdi32 , "GetDIBits" )
1044
1046
getEnhMetaFile = MustGetProcAddress (libgdi32 , "GetEnhMetaFileW" )
1045
1047
getEnhMetaFileHeader = MustGetProcAddress (libgdi32 , "GetEnhMetaFileHeader" )
1046
1048
getObject = MustGetProcAddress (libgdi32 , "GetObjectW" )
@@ -1299,6 +1301,20 @@ func GetDeviceCaps(hdc HDC, nIndex int32) int32 {
1299
1301
return int32 (ret )
1300
1302
}
1301
1303
1304
+ func GetDIBits (hdc HDC , hbmp HBITMAP , uStartScan uint32 , cScanLines uint32 , lpvBits * byte , lpbi * BITMAPINFO , uUsage uint32 ) int32 {
1305
+ ret , _ , _ := syscall .Syscall9 (getDIBits , 7 ,
1306
+ uintptr (hdc ),
1307
+ uintptr (hbmp ),
1308
+ uintptr (uStartScan ),
1309
+ uintptr (cScanLines ),
1310
+ uintptr (unsafe .Pointer (lpvBits )),
1311
+ uintptr (unsafe .Pointer (lpbi )),
1312
+ uintptr (uUsage ),
1313
+ 0 ,
1314
+ 0 )
1315
+ return int32 (ret )
1316
+ }
1317
+
1302
1318
func GetEnhMetaFile (lpszMetaFile * uint16 ) HENHMETAFILE {
1303
1319
ret , _ , _ := syscall .Syscall (getEnhMetaFile , 1 ,
1304
1320
uintptr (unsafe .Pointer (lpszMetaFile )),
0 commit comments