本帖最后由 斗战胜猴 于 2025-4-5 19:13 编辑
.版本 2
.DLL命令 RtlMoveMemory_BITMAPINFOHEADER字节型, , "kernel32.dll", "RtlMoveMemory"
.参数 Dest, 字节型, 传址
.参数 Src, BITMAPINFOHEADER
.参数 len, 整数型
.版本 2
.DLL命令 GetDIBits2, 整数型, "gdi32.dll", "GetDIBits"
.参数 aHDC, 整数型
.参数 hBitmap, 整数型
.参数 nStartScan, 整数型
.参数 nNumScans, 整数型
.参数 lpBits, 字节型, 传址
.参数 lpBI, 字节型, 传址
.参数 wUsage, 整数型
.版本 2
.数据类型 BITMAPINFOHEADER
.成员 biSize, 整数型
.成员 biWidth, 整数型
.成员 biHeight, 整数型
.成员 biPlanes, 短整数型
.成员 biBitCount, 短整数型
.成员 biCompression, 整数型
.成员 biSizeImage, 整数型
.成员 biXPelsPerMeter, 整数型
.成员 biYPelsPerMeter, 整数型
.成员 biClrUsed, 整数型
.成员 biClrImportant, 整数型
.数据类型 BITMAP
.成员 bmType, 整数型
.成员 bmWidth, 整数型, , , 宽度
.成员 bmHeight, 整数型, , , 高度
.成员 bmWidthBytes, 整数型, , , 扫描行
.成员 bmPlanes, 短整数型, , , 位图位面数
.成员 bmBitsPixel, 短整数型, , , 深度
.成员 bmBits, 整数型, 传址
.版本 2
.数据类型 RECT, 公开, 矩形
.成员 Left, 整数型, , , 左边
.成员 Top, 整数型, , , 顶边
.成员 Right, 整数型, , , 右边 宽度
.成员 Bottom, 整数型, , , 底边 高度
.版本 2
.子程序 GetModuleHandleA_汇编, 整数型, 公开, 取模块句柄 快
.参数 lpLibFileName, 文本型
置入代码 ({ 139, 125, 8, 139, 63, 87, 51, 192, 131, 201, 255, 242, 174, 95, 139, 241, 247, 214, 100, 161, 48, 0, 0, 0, 139, 64, 12, 139, 80, 12, 141, 64, 16, 255, 48, 51, 192, 82, 139, 74, 48, 15, 182, 28, 56, 15, 182, 20, 65, 43, 218, 131, 251, 0, 116, 12, 131, 251, 32, 116, 7, 131, 251, 224, 116, 2, 117, 9, 131, 192, 1, 59, 240, 116, 15, 117, 220, 90, 139, 18, 51, 192, 91, 59, 218, 83, 116, 6, 117, 203, 90, 139, 66, 24, 201, 194, 4, 0 })
返回 (0)
.子程序 GetProcAddress_汇编, 整数型, 公开, 取内存函数地址 快
.参数 hModule, 整数型, , 模块句柄
.参数 lpProcName, 文本型, , 函数名称
置入代码 ({ 86, 87, 83, 131, 236, 16, 139, 84, 36, 40, 139, 68, 36, 36, 139, 10, 133, 192, 15, 132, 166, 0, 0, 0, 133, 201, 15, 132, 158, 0, 0, 0, 139, 88, 60, 139, 84, 3, 120, 139, 92, 3, 124, 133, 210, 15, 132, 139, 0, 0, 0, 133, 219, 15, 132, 131, 0, 0, 0, 139, 216, 3, 218, 15, 132, 121, 0, 0, 0, 139, 116, 2, 24, 133, 246, 116, 113, 131, 124, 2, 20, 0, 116, 106, 139, 124, 2, 32, 139, 92, 2, 36, 3, 248, 139, 84, 2, 28, 3, 216, 3, 208, 133, 246, 118, 84, 137, 20, 36, 51, 237, 137, 124, 36, 12, 137, 116, 36, 4, 137, 76, 36, 8, 139, 68, 36, 12, 139, 124, 36, 8, 15, 183, 12, 107, 139, 52, 168, 3, 116, 36, 36, 138, 23, 58, 22, 117, 26, 132, 210, 116, 18, 138, 87, 1, 58, 86, 1, 117, 14, 131, 199, 2, 131, 198, 2, 132, 210, 117, 228, 51, 192, 235, 5, 27, 192, 131, 200, 1, 133, 192, 116, 19, 69, 59, 108, 36, 4, 114, 189, 51, 192, 131, 196, 16, 91, 95, 94, 93, 194, 8, 0, 139, 20, 36, 139, 20, 138, 139, 68, 36, 36, 3, 194, 131, 196, 16, 91, 95, 94, 93, 194, 8, 0 })
返回 (0)
.版本 2
.支持库 spec
.子程序 截图窗口, 字节集, 公开
.参数 窗口句柄, , 可空
.参数 参_起点X, 整数型, 可空
.参数 参_起点Y, 整数型, 可空
.参数 参_宽度, 整数型, 可空
.参数 参_高度, 整数型, 可空
.参数 位深度, 整数型, 可空, 16,24,32
.局部变量 hdc, 整数型, , , 场景句柄
.局部变量 hBmp, 整数型
.局部变量 bmp, BITMAP
.局部变量 BitmapHead, BITMAPINFOHEADER
.局部变量 Data, 字节集
.局部变量 DesktopDC, , , , 设备句柄
.局部变量 DesktopRect, RECT
.局部变量 DesktopWidth
.局部变量 DesktopHeight
.局部变量 DesktophWnd, 整数型
.局部变量 BitCount, 整数型
.局部变量 BitX
.局部变量 BitY
.局部变量 biWidth, 整数型
.局部变量 biHeight, 整数型
.局部变量 文件长度, 整数型
DesktophWnd = 窗口句柄
.如果真 (DesktophWnd = 0)
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“user32.dll”), “GetDesktopWindow”), , DesktophWnd)
.如果真结束
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“user32.dll”), “GetWindowRect”), , , DesktophWnd, DesktopRect)
DesktopWidth = DesktopRect.Right - DesktopRect.Left
DesktopHeight = DesktopRect.Bottom - DesktopRect.Top
biWidth = 选择 (参_宽度 = 0, DesktopWidth, 参_宽度)
biHeight = 选择 (参_高度 = 0, DesktopHeight, 参_高度)
BitCount = 选择 (位深度 ≥ 16 且 位深度 ≤ 32, 位深度, 32)
BitX = 参_起点X
BitY = 参_起点Y
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“user32.dll”), “GetWindowDC”), , DesktopDC, DesktophWnd)
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“gdi32.dll”), “CreateCompatibleDC”), , hdc, DesktopDC)
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“gdi32.dll”), “CreateCompatibleBitmap”), , hBmp, DesktopDC, DesktopWidth, DesktopHeight)
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“gdi32.dll”), “SelectObject”), , , hdc, hBmp)
.如果真 (DesktophWnd ≠ 65552)
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“user32.dll”), “PrintWindow”), , , DesktophWnd, hdc, 0)
.如果真结束
BitmapHead.biSize = 40
BitmapHead.biWidth = biWidth
BitmapHead.biHeight = biHeight
BitmapHead.biPlanes = 1
BitmapHead.biBitCount = BitCount
BitmapHead.biSizeImage = 左移 (右移 (BitmapHead.biWidth × BitmapHead.biBitCount + 31, 5), 2) × BitmapHead.biHeight
BitmapHead.biXPelsPerMeter = 3780
BitmapHead.biYPelsPerMeter = 3780
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“gdi32.dll”), “BitBlt”), , , hdc, 0, 0, BitmapHead.biWidth, BitmapHead.biHeight, DesktopDC, BitX, BitY, 13369376)
.如果真 (BitmapHead.biSizeImage ≠ 0)
Data = 取空白字节集 (BitmapHead.biSize + BitmapHead.biSizeImage)
RtlMoveMemory_BITMAPINFOHEADER字节型 (Data [1], BitmapHead, BitmapHead.biSize)
.如果 (GetDIBits2 (hdc, hBmp, 0, BitmapHead.biHeight, Data [BitmapHead.biSize + 1], Data [1], 0) ≠ 0)
文件长度 = 14 + BitmapHead.biSize + BitmapHead.biSizeImage
Data = { 66, 77 } + 到字节集 (文件长度) + { 0, 0, 0, 0, 54, 0, 0, 0 } + Data
.否则
Data = { }
.如果结束
.如果真结束
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“gdi32.dll”), “DeleteDC”), , , hdc)
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“user32.dll”), “ReleaseDC”), , , DesktophWnd, DesktopDC)
调用子程序 (GetProcAddress_汇编 (GetModuleHandleA_汇编 (“gdi32.dll”), “DeleteObject”), , , hBmp)
返回 (Data) |