P
popboy
Unregistered / Unconfirmed
GUEST, unregistred user!
Delphi 代码:
type
TSoftSocket = class(TASPObject, ISoftSocket)
Ssocket: TSocketConnection ;
protected
procedure OnEndPage; safecall;
procedure OnStartPage(const AScriptingContext: IUnknown); safecall;
procedure SendMsg(Shost: PWideChar; Sport: SYSINT; Smsg: PWideChar); safecall;
end;
implementation
uses ComServ;
procedure TSoftSocket.OnEndPage;
begin
inherited OnEndPage;
end;
procedure TSoftSocket.OnStartPage(const AScriptingContext: IUnknown);
begin
inherited OnStartPage(AScriptingContext);
end;
procedure TSoftSocket.SendMsg(Shost: PWideChar; Sport: SYSINT;
Smsg: PWideChar); safecall;
begin
//Ssocket.Host := Shost ;
//Ssocket.Port := Sport;
response.write('<B><font size=6 color=red>Now OK!!</font></B>');
//Ssocket.Connected := true;
end;
initialization
TAutoObjectFactory.Create(ComServer, TSoftSocket, Class_SoftSocket,
ciMultiInstance, tmApartment);
end.
ASP 代码:
Set DelphiASPObj = Server.CreateObject("Psocket.SoftSocket")
DelphiASPObj.SendMsg "192.168.3.29" ,4321 , "OK"
错误提示:
Microsoft VBScript 运行时错误 错误 '800a01ca'
变量使用了一个 VBScript 中不支持的 Automation 类型: 'SendMsg'
/2.asp,行 9
请各位帮忙!!
type
TSoftSocket = class(TASPObject, ISoftSocket)
Ssocket: TSocketConnection ;
protected
procedure OnEndPage; safecall;
procedure OnStartPage(const AScriptingContext: IUnknown); safecall;
procedure SendMsg(Shost: PWideChar; Sport: SYSINT; Smsg: PWideChar); safecall;
end;
implementation
uses ComServ;
procedure TSoftSocket.OnEndPage;
begin
inherited OnEndPage;
end;
procedure TSoftSocket.OnStartPage(const AScriptingContext: IUnknown);
begin
inherited OnStartPage(AScriptingContext);
end;
procedure TSoftSocket.SendMsg(Shost: PWideChar; Sport: SYSINT;
Smsg: PWideChar); safecall;
begin
//Ssocket.Host := Shost ;
//Ssocket.Port := Sport;
response.write('<B><font size=6 color=red>Now OK!!</font></B>');
//Ssocket.Connected := true;
end;
initialization
TAutoObjectFactory.Create(ComServer, TSoftSocket, Class_SoftSocket,
ciMultiInstance, tmApartment);
end.
ASP 代码:
Set DelphiASPObj = Server.CreateObject("Psocket.SoftSocket")
DelphiASPObj.SendMsg "192.168.3.29" ,4321 , "OK"
错误提示:
Microsoft VBScript 运行时错误 错误 '800a01ca'
变量使用了一个 VBScript 中不支持的 Automation 类型: 'SendMsg'
/2.asp,行 9
请各位帮忙!!