5,388
社区成员
发帖
与我相关
我的任务
分享
//试试,改改。
var MainConnection :TAdoConnection;
一定要写到implementation上面
function GetConn(。。。;var ConnState:Boolean):Pointer; stdcall; export;
begin
MainConnection :=TAdoConnection.Create(nil);
Result :=nil;
Try
MainConnection.Connectstring(?记不清了) :='....';
MainConnection.Connected :=True;
Result :=Pointer(MainConnection);
ConnState :=True;
Except
ConnState :=False;
end;
end;
procedure DisConnect; stdcall; export;
begin
ConnState.Free;
end;