|
发表于 2024-8-23 14:29:55
|
显示全部楼层
美国
#常量 PROCESS_ALL_ACCESS = &H1F0FFF #常量 GENERIC_WRITE = &H40000000 #常量 GENERIC_READ = &H80000000 #常量 CREATE_ALWAYS = 2 #常量 OPEN_EXISTING = 3 #常量 FILE_ATTRIBUTE_NORMAL = &H80 |
CreateMemoryDump | 逻辑型 | | |
pid | 整数型 | | | | dumpFilePath | 文本型 | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 | hProcess | 整数型 | | | hFile | 整数型 | | |
hProcess = OpenProcess (PROCESS_ALL_ACCESS, 假, pid )如果 (hProcess = 0 )输出调试文本 (“Failed to open process.”)返回 (假)hFile = CreateFile (dumpFilePath, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0 )如果 (hFile = 0 )输出调试文本 (“Failed to create dump file.”)CloseHandle (hProcess )返回 (假) CloseHandle (hFile )CloseHandle (hProcess )返回 (假). endif . endif 返回 (真) |
LoadMemoryDump | 逻辑型 | | |
dumpFilePath | 文本型 | | | | dumpData | 字节集 | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 | hFile | 整数型 | | | fileSize | 整数型 | | | bytesRead | 整数型 | | |
hFile = CreateFile (dumpFilePath, GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0 )如果 (hFile = 0 )输出调试文本 (“Failed to open dump file.”)返回 (假)fileSize = GetFileSize (hFile, 0 )置字节集长度 (dumpData, fileSize )如果 (!ReadFile (hFile, dumpData [1 ], fileSize, bytesRead, 0 ) 或 bytesRead ≠ fileSize )输出调试文本 (“Failed to read dump file.”)CloseHandle (hFile )返回 (假)CloseHandle (hFile )返回 (真). endif . endif
|
|