Library guang;
uses
ComServ,
SysUtils,
Classes,
StrUtils,
md5 in 'md5.pas',
main in 'main.pas';
{$R *.res}
exports
DllGetClassObject,
DllCanUnloadNow,
DllRegisterServer,
DllUnregisterServer,
main.get_snClick;
begin
end.
编译成dll时候,,再delphi中建立一个exe程序调用dll成功,,但是放到ASP中调用的时候提示
Server 对象 错误 'ASP 0177 : 800401f3' Server.CreateObject 失败 ASP代码为
<%Set objConnection9 = Server.CreateObject("guang.main")%>
guang.dll已经注册在system32中了,,希望大侠帮忙~~~~~~
uses
ComServ,
SysUtils,
Classes,
StrUtils,
md5 in 'md5.pas',
main in 'main.pas';
{$R *.res}
exports
DllGetClassObject,
DllCanUnloadNow,
DllRegisterServer,
DllUnregisterServer,
main.get_snClick;
begin
end.
编译成dll时候,,再delphi中建立一个exe程序调用dll成功,,但是放到ASP中调用的时候提示
Server 对象 错误 'ASP 0177 : 800401f3' Server.CreateObject 失败 ASP代码为
<%Set objConnection9 = Server.CreateObject("guang.main")%>
guang.dll已经注册在system32中了,,希望大侠帮忙~~~~~~
解决方案 »
- 如何在DBGrid插入数据后让新插入行被选中为当前行?
- 5.1节日来临,GMAIL的50份邀请函剩余,送大家
- delphi下运行DOS命令后,如何得到此DOS命令的返回值?
- 有谁能帮我解释这条语句中的参数的意思
- 两个霎时间相减如(2004-1-14)-(2004-12-7)=多少天?
- application.messagebox运行的时候,系统就停在messagebox,不执行我的程序了。。
- 不用delphi的控件,怎样得到指定目录下特定扩展名的所有文件名?
- form颜色
- 请教一个SQL的分组统计写法 ,谢谢,
- sos pb and delphi dll!
- 在主form中调用多个frame,只知道不同的frame名字,如何调用?
- OleContainer控件的使用~有关操作word修订功能
Delphi的File/New/Other.../ActiveX页面/ActiveX Library
File/New/Other.../ActiveX页面/Active Server Object
library funclt;uses
ComServ,
md5 in 'md5.pas',
main in 'main.pas';exports
DllGetClassObject,
DllCanUnloadNow,
DllRegisterServer,
DllUnregisterServer;{$R *.RES}begin
end.
main 的代码为:
unit main;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Dialogs, StdCtrls, StrUtils, md5; function get_snClick(D: PCHAR): PCHAR; export;
implementationfunction get_snClick(D: PCHAR): PCHAR; export;var
getidstr:String;
begin
getidstr := String(D);
result := Pchar(getidstr);
end;end.
编译成dll后在 asp调用,asp代码为
<%Set objConnection9 = Server.CreateObject("funclt.main")%>
还是出错:Server 对象 错误 'ASP 0177 : 800401f3' Server.CreateObject 失败 funclt.dll在system32中已注册成功了
File/New/Other.../ActiveX页面/Active Server Object
我还以为挑一个建就好了 我去查查怎么建
File/New/Other.../ActiveX页面/Active Server Object
不知道怎么连起来 不懂,,能不能说的详细点呀
然后再建立File/New/Other.../ActiveX页面/Active Server Object
在New Active Server Object对话框的CoClass Name填写类名,其他默认例如类名Test则生成
unit Unit2;{$WARN SYMBOL_PLATFORM OFF}interfaceuses
ComObj, ActiveX, AspTlb, Project1_TLB, StdVcl;type
TTest = class(TASPObject, ITest)
protected
procedure OnEndPage; safecall;
procedure OnStartPage(const AScriptingContext: IUnknown); safecall;
end;implementationuses ComServ;procedure TTest.OnEndPage;
begin
inherited OnEndPage;
end;procedure TTest.OnStartPage(const AScriptingContext: IUnknown);
begin
inherited OnStartPage(AScriptingContext);
end;initialization
TAutoObjectFactory.Create(ComServer, TTest, Class_Test,
ciMultiInstance, tmApartment);
end.
Test.asp测试页面
<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("Project1.Test")
DelphiASPObj.{Insert Method name here}
%>
<HR>
</BODY>
</HTML>