为什么我在程序中loadlibrary了一个dll后,我在关闭空上窗体的时候,点两下才能关闭!(附程序)(0分)

  • 主题发起人 linjifan
  • 开始时间
L

linjifan

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>ll:=loadlibrary(pchar('DemoHook.dll'));<br>if ll=0 then messagebox(hmain,'Error Open DemoHook.dll','',0);<br>hrun:=GetProcAddress(ll,'SetThreadHook');<br>hstop:=GetProcAddress(ll,'DeThreadHook');<br>if @hrun&lt;&gt;nil then hrun;<br>&nbsp; &nbsp; while(GetMessage(aa,hmain,0,0)) do<br>&nbsp; begin<br>&nbsp; &nbsp; TranslateMessage(aa);<br>&nbsp; &nbsp; DispatchMessage(aa);<br>&nbsp; end;<br>end;
 
这个问题真的很难吗?<br>
 
资源没有释放
 
怎么释放资源!
 
顶部