S
shubiao123
Unregistered / Unconfirmed
GUEST, unregistred user!
PImpDir = ^TImpDir; TImpDir = packed record ThunkRVA: DWORD; ImpFuncCount: DWORD; Name: Array [0..0] of char;定义了一个变量 PkImportDir: PImpDir;在下面的转存后,列表里为啥没有地址呢?是没转存进去吗?不知道问题出在哪?vImport:=ImageNTHeaders.OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress;tRVA:=Integer(ImageSectionHeader.VirtualAddress-ImageSectionHeader.PointerToRawData); ImageImport:=PImageImportDecriptor(PChar(vImport)-tRVA+vBase); //读取所有DLL直到为空 while ImageImport.Name<>0 do begin PkImportDir.ThunkRVA:= ImageImport.FirstThunk; mmo1.Lines.Add(format('虚拟地址', [PkImportDir.ThunkRVA])); Inc(ImageImport); end;----------------------------------------------