IPA函数中的字符串参数要区分大小写吗?
如getmodulehandle,getprocaddress,等函数,在调用时都有一个名称字符串参数,这些字符串要区分大小写吗?另外,我想遍历一个进程加载的全部模块,有哪些API函数可以用?我学的是delphi,用EnumProcessModules函数怎么老说我使用了未定义标识符?应该在uses中添加什么单元啊?
怎么遍历一个dll文件里的全部输出函数?
谢谢 不用区分大小写~至于EnumProcessModules,你可以试试uses TLHelp32,
还没有的话,就自己声明一下吧~ 谢谢了,
怎么遍历一个dll文件里的全部输出函数? 网上找的,遍历DLL导出函数表:
procedureListDLLExports(constFileName:string;List:TStrings);
type
TDWordArray=arrayofDWORD;
var
imageinfo:LoadedImage;
pExportDirectory:PImageExportDirectory;
dirsize:Cardinal;
pDummy:PImageSectionHeader;
i:Cardinal;
pNameRVAs:^TDWordArray;
Name:string;
begin
List.Clear;
ifMapAndLoad(PChar(FileName),nil,@imageinfo,True,True)then
begin
try
pExportDirectory:=ImageDirectoryEntryToData(imageinfo.MappedAddress,
False,IMAGE_DIRECTORY_ENTRY_EXPORT,dirsize);
if(pExportDirectory<>nil)then
begin
pNameRVAs:=ImageRvaToVa(imageinfo.FileHeader,imageinfo.MappedAddress,
DWORD(pExportDirectory^.AddressOfNames),pDummy);
fori:=0topExportDirectory^.NumberOfNames-1do
begin
Name:=PChar(ImageRvaToVa(imageinfo.FileHeader,imageinfo.MappedAddress,
pNameRVAs^,pDummy));
List.Add(Name);
end;
end;
finally
UnMapAndLoad(@imageinfo);
end;
end;
end; 能不能告诉我要用到那些IPA函数及所在dll文件?程序我自己学编,编好了再放到这让大家帮我更正,好吗?
另外我试了,EnumProcessModules函数,uses TLHelp32不行.这个函数在哪个DLL文件中?我用汇编试试.或者,EnumProcessModules是不是不能在win2k,xp中用啊?有没有别的功能类似的函数替代?
页:
[1]