寫DLL FOR ASP問題,來者有分!
我在VB6中新建了個ActiveX DLL
如下:
Public Sub OnStartPage(PassedScriptContext As ScriptingContext)
Set mContext = PassedScriptContext
Set mApplication = mContext.Application
Set mRequest = mContext.Request
Set mResponse = mContext.Response
Set mServer = mContext.Server
Set mSession = mContext.Session
End Sub
Public Sub OnEndPage()
Set mApplication = Nothing
Set mRequest = Nothing
Set mResponse = Nothing
Set mServer = Nothing
Set mSession = Nothing
Set mContext = Nothing
End Sub
Public Sub Count()
Dim i As Long
Dim j As Long
For i = 0 To 10000000
j = j + 2
Next i
mResponse.Write j
End Sub
引用了:Microsoft Active Server Pages Object Library
保存工程名為:aa
class名為:bb
最終make dll為:aa.dll
regsvr32 aa.dll 也成功
asp文件如下:
<%
Set obj = Server.CreateObject("aa.bb")
obj.Count
set obj=nothing
%>
運行出現以下提示:
Microsoft VBScript 編譯階段錯誤 錯誤 '800a0408'
不正確的字元
/test6.asp, 列2
Set obj = Server.CreateObject("aa.bb")
^
請各位指點,是哪出了問題
小第感激不盡