L
linqi07
Unregistered / Unconfirmed
GUEST, unregistred user!
DLL名:PutGet.dll<br>函数名:PutGet<br>参数1:发送的消息(512位字符串)<br>参数2:返回的消息(512位字符串)<br>估计是c++编写的。dll源型不知道<br>*************<br>delphi中调用如下:<br>//申明<br> function PutGet(sPut,sGetchar)char; stdcall; External 'PutGet.dll' <br>name 'PutGet';<br>//调用<br>procedure Tform1.Button1Click(Sender: TObject);<br>var sOut,sInchar;<br> ReceiveMsg:string;<br>begin<br> try<br> getmem(sout,512);<br> getmem(sIn,512);<br> strpcopy(sOut,edit1.text);<br> SendRcv(sOut,sIn);<br> ReceiveMsg:=strpas(sIn);<br> finally<br> AnalyseReceive(ReceiveMsg); //处理返回的消息串ReceiveMsg<br> end;<br>end<br><br>运行时偶尔会发生非法指针错误,然后就会出现程序异常。<br>请各位大侠帮我看看以上程序有什么问题???<br>如果问题解决,还会加分。先谢谢各位。<br>