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