用VB自编DLL组件,出现错误,请帮忙!

lbx972 2004-06-09 04:24:50
出错提示:

错误类型:
服务器对象, ASP 0177 (0x800401F3)
无效的 ProgID。 若要获取关于此消息的更多的信息,请访问 Microsoft 联机支持站点: http://www.microsoft.com/contentredirect.asp 。
/lbx/1.asp, 第 11 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

页:
GET /lbx/1.asp

时间:
2004年6月9日, 16:24:19


VB中的源代码:


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



调用页面的代码:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<%
dim ObjReference
Set conn = Server.CreateObject("ADODB.Connection")
Set ObjReference = Server.CreateObject("exmaple1.helloword")
ObjReference.SayHello
%>
</body>
</html>

...全文
145 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
king2003 2004-06-10
  • 打赏
  • 举报
回复
我做过QQ联系了
tjficcbw 2004-06-10
  • 打赏
  • 举报
回复
运行:
regsvr32 你的库文件名
库文件名即*.dll(不是工程名,也不是类模块名)
萝卜波 2004-06-10
  • 打赏
  • 举报
回复
用vb工程 调用这个dll看看 行不行
lbx972 2004-06-09
  • 打赏
  • 举报
回复
有做过这方面的朋友,共享一下啦!
谢谢!
擒兽 2004-06-09
  • 打赏
  • 举报
回复
mark
lbx972 2004-06-09
  • 打赏
  • 举报
回复
在系统中,如果查看有无注册成绩的?
lbx972 2004-06-09
  • 打赏
  • 举报
回复
它告诉我:
dllRegisterserver in D:\dll\lbx\exmaple1.dll succeeded
tjficcbw 2004-06-09
  • 打赏
  • 举报
回复
Set ObjReference = Server.CreateObject("exmaple1.helloword")这一行没错
你注册了吗。
lbx972 2004-06-09
  • 打赏
  • 举报
回复
我的组件的工工程名字为:exmaple1 类的名字为:helloword

出现这问题,真烦,是了,楼上的朋友

你有你自己的写的简单的组件源码吗?

给我一份参考

我的邮件:lbx972@21cn.com

QQ:449817
loii 2004-06-09
  • 打赏
  • 举报
回复
我用你的代码测试了一下,没有发现什么问题,你仔细看看是不是这个地方

Set ObjReference = Server.CreateObject("exmaple1.helloword")
应该是

Set ObjReference = Server.CreateObject("exmaple.helloword")

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧