dll中取avi(100分)

  • 主题发起人 主题发起人 blues hu
  • 开始时间 开始时间
B

blues hu

Unregistered / Unconfirmed
GUEST, unregistred user!
以下是我的代码,可我的pavi只是资源的前几个字符,dll中肯定有我要的avi<br>&nbsp; DllHandle := LoadLibrary(pchar('epys.dll'));<br>&nbsp; ResHandle:=FindResourceHInstance(dllhandle);<br>&nbsp; if resHandle &gt; 0 then<br>&nbsp; try<br>&nbsp; &nbsp; hres:=FindResource(ResHandle,pchar('loader'),'AVI');<br>&nbsp; &nbsp; resource := LoadResource(ResHandle, hRes);<br>&nbsp; &nbsp; if resource&gt;32 then<br>&nbsp; pavi:= LockResource(Resource);<br>&nbsp; animate1.resname:=pavi;<br>&nbsp; animate1.Active :=true;<br>&nbsp; finally<br>&nbsp; &nbsp; FreeLibrary(DllHandle);<br>&nbsp; &nbsp; FreeResource(resource);<br>&nbsp; end;<br>
 
要用一些dll分析工具了,我不懂
 
to 释放自已:<br>&nbsp; 由于API好久未用所以未用你的方法下列方法你可以试试。<br>&nbsp;制作RES 时用XX RCDATA CLOCK。AVI<br>procedure TForm1.BitBtn1Click(Sender: TObject);<br>var<br>&nbsp; dllhandle:thandle;<br>&nbsp; Fres: TResourceStream;<br>&nbsp; Ffile: TFileStream;<br>begin<br>&nbsp; dllhandle:=LoadLibrary(pchar('Project2.dll'));<br>&nbsp; if dllhandle&lt;&gt;0 then<br>&nbsp; begin<br>&nbsp; &nbsp; Fres := TResourceStream.Create(DLLHANDLE, 'MYAVI', RT_RCDATA);<br>&nbsp; &nbsp; Ffile := TFileStream.Create('tmp.avi', fmCreate);<br>&nbsp; &nbsp; Ffile.CopyFrom(Fres, Fres.Size);<br>&nbsp; &nbsp; Fres.Free;<br>&nbsp; &nbsp; Ffile.Free;<br>&nbsp; end;<br>&nbsp; Animate1.Active:=false;<br>&nbsp; Animate1.FileName:='tmp.avi';<br>&nbsp; Animate1.Active:=true;<br>end;
 
有一些资源修改 工具吧,比如resoucehack 等,简单。
 
后退
顶部