北京连卡佛折扣:asp 组件编程 高手帮忙看一下

来源:百度文库 编辑:神马品牌网 时间:2024/05/03 07:34:23
在VB6中建的

这是DLL 文件为:Exmaple.dll
工程名:Exmaple
类名为:HelloWorld.cls

代码:
Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session

Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub

Public Sub OnEndPage()
Set MyScriptingContext = Nothing
Set MyApplication = Nothing
Set MyRequest = Nothing
Set MyResponse = Nothing
Set MyServer = Nothing
Set MySession = Nothing
End Sub

Public Sub SayHello()
MyResponse.Write ("Hello World")
End Sub

asp中 为什么创建不了对像:

<%
Set ObjReference = Server.CreateObject("Example.HelloWorld")
ObjReference.SayHello
%>
Server 对象 错误 'ASP 0177 : 800401f3'

Server.CreateObject 失败

注册了。。
我到SYST32下面都看到我的文件了

是不是没注册??