P
pmis
Unregistered / Unconfirmed
GUEST, unregistred user!
我做一个DLL,当我第一次调用时可正确调用,<br>当我再次调用时就出现错误(Invalid Pointer Operation)!!<br>代码如下,请大家指点!!!,谢谢!!!<br>unit Form_1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,<br> StdCtrls;<br><br>type<br> TForm1 = class(TForm)<br> Edit1: TEdit;<br> Button1: TButton;<br> procedure Button1Click(Sender: TObject);<br> private<br> { Private declarations }<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>function FormatToDate(Tdate:string):String ; stdcall;external 'DateFormat_Project.DLL';<br>implementation<br><br>{$R *.DFM}<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>Var<br> Dat:string;<br>begin<br> Dat:=trim(edit1.text);<br> Edit1.Text:=FormatToDate(Dat);<br>end;<br><br>end.<br><br>