F
FeiDao
Unregistered / Unconfirmed
GUEST, unregistred user!
[][!]
我的ActiveX控件代码(只有一个事件Show)如下:
unit U_rr;
{$WARN SYMBOL_PLATFORM OFF}
interface
uses
ComObj, ActiveX, AspTlb, rr_TLB, Dialogs,StdVcl;
type
Trrshow = class(TASPObject, Irrshow)
protected
procedure OnEndPage
safecall;
procedure OnStartPage(const AScriptingContext: IUnknown)
safecall;
procedure show
safecall;
end;
implementation
uses ComServ;
procedure Trrshow.OnEndPage;
begin
inherited OnEndPage;
end;
procedure Trrshow.OnStartPage(const AScriptingContext: IUnknown);
begin
inherited OnStartPage(AScriptingContext);
end;
procedure Trrshow.show;
begin
showmessage('dddd');
end;
initialization
TAutoObjectFactory.Create(ComServer, Trrshow, Class_rrshow,
ciMultiInstance, tmApartment);
end.
-------调用的页面如下:
<HTML>
<BODY>
<TITLE> Testing Delphi ASP </TITLE>
<CENTER>
<H3> You should see the results of your Delphi Active Server method below </H3>
</CENTER>
<HR>
<% Set DelphiASPObj = Server.CreateObject("rr.rrshow")
DelphiASPObj.show
%>
<HR>
</BODY>
</HTML>
----打开这个ASP文件总是不能打开,IE下方进度条停在中间,显示"正在打开....',但就是打不开。
去掉 DelphiASPObj.show就行,这是什么回事呢?
我的ActiveX控件代码(只有一个事件Show)如下:
unit U_rr;
{$WARN SYMBOL_PLATFORM OFF}
interface
uses
ComObj, ActiveX, AspTlb, rr_TLB, Dialogs,StdVcl;
type
Trrshow = class(TASPObject, Irrshow)
protected
procedure OnEndPage
safecall;
procedure OnStartPage(const AScriptingContext: IUnknown)
safecall;
procedure show
safecall;
end;
implementation
uses ComServ;
procedure Trrshow.OnEndPage;
begin
inherited OnEndPage;
end;
procedure Trrshow.OnStartPage(const AScriptingContext: IUnknown);
begin
inherited OnStartPage(AScriptingContext);
end;
procedure Trrshow.show;
begin
showmessage('dddd');
end;
initialization
TAutoObjectFactory.Create(ComServer, Trrshow, Class_rrshow,
ciMultiInstance, tmApartment);
end.
-------调用的页面如下:
<HTML>
<BODY>
<TITLE> Testing Delphi ASP </TITLE>
<CENTER>
<H3> You should see the results of your Delphi Active Server method below </H3>
</CENTER>
<HR>
<% Set DelphiASPObj = Server.CreateObject("rr.rrshow")
DelphiASPObj.show
%>
<HR>
</BODY>
</HTML>
----打开这个ASP文件总是不能打开,IE下方进度条停在中间,显示"正在打开....',但就是打不开。
去掉 DelphiASPObj.show就行,这是什么回事呢?