H
hophy
Unregistered / Unconfirmed
GUEST, unregistred user!
我的com接口定义如下:
CoAppPublicServer = class
class function Create: IAppPublicServer;
class function CreateRemote(const MachineName: string): IAppPublicServer;
end;
dll定义如下:
procedure test(AParam: Pchar);
stdcall;
var
IAPS: IAppPublicServer;
begin
IAPS := CoAppPublicServer.CreateRemote('128.111.100.210');
end;
exports
test;
客户端程序:
procedure test(AParam: Pchar);
stdcall;
external 'test.dll';
procedure TForm1.Button4Click(Sender: TObject);
begin
test('aaa');
end;
Button4按下一次后退出客户端程序不会出错,但只要多按一次,退出时会弹出(不退出程序不会出错):
“Project d:/TestDll.exe raised too many consecutive exceptions:'access violation at 0x004138e2:read of address 0x01084474'.Process Stopped. Use Step or Run to continue.”
有谁能告诉我是什么原因?怎么解决呢?
CoAppPublicServer = class
class function Create: IAppPublicServer;
class function CreateRemote(const MachineName: string): IAppPublicServer;
end;
dll定义如下:
procedure test(AParam: Pchar);
stdcall;
var
IAPS: IAppPublicServer;
begin
IAPS := CoAppPublicServer.CreateRemote('128.111.100.210');
end;
exports
test;
客户端程序:
procedure test(AParam: Pchar);
stdcall;
external 'test.dll';
procedure TForm1.Button4Click(Sender: TObject);
begin
test('aaa');
end;
Button4按下一次后退出客户端程序不会出错,但只要多按一次,退出时会弹出(不退出程序不会出错):
“Project d:/TestDll.exe raised too many consecutive exceptions:'access violation at 0x004138e2:read of address 0x01084474'.Process Stopped. Use Step or Run to continue.”
有谁能告诉我是什么原因?怎么解决呢?