D
DJ6674
Unregistered / Unconfirmed
GUEST, unregistred user!
我的dll文件如下:<br>Procedure GetOSInfo(Var SysName,SysVer:String);stdcall;export;<br>……(这是一个判断os的过程)<br>exports<br> GetOSInfo name 'getos';<br>我的应用程序如下:<br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br>read:hModule;<br>getos: procedure(Var SysName,SysVer:String); stdcall;<br>os1,os2:string;<br>begin<br> read:=LoadLibrary('dlls.dll');<br> @getos:=GetProcAddress(read,'getos');<br> getos(os1,os2);<br> label1.Caption:=os1;<br> label2.Caption:=os2;<br> FreeLibrary(read);<br> end;<br>在按下button1后,出错如下:Access violation at address 00403E46 in module 'project1.exe'.Read of address 00DD2054.