Vb6写的Active Dll,有点问题

下面的这段代码在VB6中编译时会出现"用户定义类型未定义"的错误,在工程中引用了Microsoft Active Server Pages Object Library 和Microsoft Active Server Pages ObjectContent Object Library ,请帮忙看看

'对象的声明

Dim rp As Response

Dim rq As Request

Dim ap As Application

Dim sr As Server

Dim sn As Session

'当组件被创建的时候会触发这个事件

Public Sub OnStartPage(mysc As ScriptingContent) 'ERR:用户定义类型未定义

'进行对象的实例化

Set rp = mysc.Response

Set rq = mysc.Request

Set sr = mysc.Server

Set ap = mysc.Application

Set sn = mysc.Session

rp.write "<br>ActiveX DLL组件已经被创建了!<br>"

End Sub

'当组件被销毁的时候触发这个事件

Public Sub OnEndPage()

rp.write "<br>ActiveX DLL组件已经被销毁!<br>"

'销毁对象

Set rp = Nothing

Set rq = Nothing

Set sr = Nothing

Set ap = Nothing

Set sn = Nothing

End Sub

'定义我们自己的一个组件方法

Public Sub HelloWorld()

rp.write "<H1>Hello,World!</H1>"

End Sub

[1176 byte] By [river_hcl-自然之子] at [2008-6-10]
# 1
Public Sub OnStartPage(mysc As ScriptingContent)
===>
Public Sub OnStartPage(mysc As ScriptingContext)
看清楚了.
swans-swan.net at 2007-10-22 > top of Msdn China Tech,visual basic,COM/DCOM/COM+...
# 2
这个问题解决了,可是在进行下列测试时,在"testme.HelloWorld " 这名会出错:无效字符

<html>
<head>
<title>测试ActiveX DLL</title>
</head>
<body>

<%
Dimd testme
set testme=server.CreateObject ("Project.ConnDb")

testme.HelloWorld '无效字符

set testme=nothing
%>
</body>
</html>
river_hcl-自然之子 at 2007-10-22 > top of Msdn China Tech,visual basic,COM/DCOM/COM+...
# 3
Dimd testme 应该是 Dim TestMe ,是抄错了。仍然是无效字符
river_hcl-自然之子 at 2007-10-22 > top of Msdn China Tech,visual basic,COM/DCOM/COM+...
# 4
你上面的如果是copy进来的代码,

testme.HelloWorld

上面这句在testme前面的空格中有中文全角空格。
swans-swan.net at 2007-10-22 > top of Msdn China Tech,visual basic,COM/DCOM/COM+...
# 5
Thank you,swans
river_hcl-自然之子 at 2007-10-22 > top of Msdn China Tech,visual basic,COM/DCOM/COM+...