怎样用自程序代码替换已编译好的EXE文件内资源
ICON,BITMAP,HTML,STRING TIBLE等 问题点数:20、回复次数:5Top
1 楼Mackz(在相互)回复于 2006-03-20 18:53:05 得分 0
The BeginUpdateResource function creates an update handle for the executable file whose resources are to be changed. The UpdateResource function uses this handle to add, delete, or replace a resource in the executable file. The EndUpdateResource function closes the handle.Top
2 楼Snow_Ice11111(雪上加冰)回复于 2006-03-20 19:53:05 得分 0
修改.exe或其它模块的资源,参考下面几个函数:
LoadLibrary
FindResource
LoadResource
LockResource
BeginUpdateResource
UpdateResource
EndUpdateResource
FreeResource
具体用法自己看MSDN吧,我没试过,不知道行不行。Top
3 楼DrSmart(斯玛特)回复于 2006-03-20 20:11:16 得分 0
可以的,ResHacker是这样的,不过你替换时会发现空间计算问题,比如原来的图片占10k导入的占20k嘛~~~~~~~~~~比较麻烦,就懒得做这个,主要还得自己分析pe写文件,一般不用这些apiTop
4 楼tcg4()回复于 2006-03-20 20:31:53 得分 0
哦,谢谢,
BOOL UpdateResource(
HANDLE hUpdate, // update-file handle
LPCTSTR lpType, // address of resource type to update
LPCTSTR lpName, // address of resource name to update
WORD wLanguage, // language identifier of resource
LPVOID lpData, // address of resource data
DWORD cbData // length of resource data, in bytes
);
好象可以Top
5 楼lynx090(黑色的风)回复于 2006-03-21 08:33:23 得分 0
我也想知道,学习ING~Top




