0
我想更新exe文件中的位图。我打开资源黑客,看到资源名称是6801,所以我想出了这个代码UpdateResource失败...我做错了什么?
ResUpdate:=BeginUpdateResource(Pchar(szExplorer),false);
ShowMessage(SysErrorMessage(GetLastError));
if ResUpdate<>0 then
begin
FS:=TFileStream.Create(szBitmap,fmOpenRead or fmShareDenyWrite);
SetLength(thebmp,FS.Size);
dwSize:=FS.Size;
FS.ReadBuffer(thebmp[0],FS.Size);
FS.Free;
UpdateResource(ResUpdate,RT_BITMAP,MAKEINTRESOURCE(6801),LANG_SYSTEM_DEFAULT,@thebmp[0],dwSize);
EndUpdateResource(ResUpdate,false);
end;
对UpdateResource的调用失败。我在哪里错了?
什么是错误代码? – 2011-01-24 23:51:22
请求不受支持 – opc0de 2011-01-24 23:53:31