见鬼了: dll释放时系统提示错误,(0分)

  • 主题发起人 主题发起人 dnewb
  • 开始时间 开始时间
D

dnewb

Unregistered / Unconfirmed
GUEST, unregistred user!
小弟刚接触DLL遍程, 最简单的程序都报错,请教DX们:<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>begin<br>&nbsp; &nbsp; &nbsp; &nbsp; cHandle:= LoadLibrary('device1.dll');<br>&nbsp; &nbsp; &nbsp;if com4Handle &gt; 32 then<br>&nbsp; &nbsp; &nbsp; &nbsp;begin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;showmessage('DLL装载成功.'); &nbsp;{或执行相关的操作...}<br>&nbsp; &nbsp; &nbsp; &nbsp;end;<br>&nbsp; &nbsp; &nbsp;freelibrary(cHandle);<br>end;<br><br>程序执行过程中,可成功装载DLL,并成功地执行相关操作,但FreeLibrary(chandle)时报错如下: &nbsp;The instruction at '0X00000000' referenced memory at '0X00000000'. The memory could not be 'read'<br><br>好象是没有正确地找到DLL的地址,(0X00000000不应由应用程序去读写),请问如何解决?<br><br>
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
666
import
I
I
回复
0
查看
970
import
I
后退
顶部