问题描述
- PE编程,关于输入表,无法取得输入表的名称
-
HANDLE hFile;HANDLE hMapping;
LPVOID ImageBase;
PIMAGE_IMPORT_DESCRIPTOR pImportDesc;
PIMAGE_OPTIONAL_HEADER pOptionHeader;
hFile = CreateFile(szFilePath,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
hMapping = CreateFileMapping(hFile,NULL,PAGE_READONLY,0,0,NULL);
ImageBase = MapViewOfFile(hMapping,FILE_MAP_READ,0,0,0); pOptionHeader=GetOptionalHeader(ImageBase);
pImportDesc=(PIMAGE_IMPORT_DESCRIPTOR)((byte*)ImageBase+pOptionHeader->DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress);
char dllName=(char)((byte*)ImageBase+pImportDesc->Name);
dllName的不对,是乱码,是哪里出了问题,求帮助,谢谢
时间: 2024-09-24 12:58:31