VB中己引用要引用的组件Private Context As ScriptingContext
Private Application As Application
Private Response As Response
Private Request As Request
Private Session As Session
Private Server As ServerPublic Sub OnStartPage(PassedScriptContext As ScriptingContext)
    Set Context = PassedScriptContext  'Asp运行环境对象
    Set Application = Context.Application  'Asp 五大对象
    Set Request = Context.Request
    Set Response = Context.Response
    Set Server = Context.Server
    Set Session = Context.Session
End SubPublic Function Rw(str)
    Response.Write str
End FunctionAsp中调用:(asp绝对没有调用错)
Set ayang = Server.CreateObject("AyangSoft.Main")
    ayang.Rw "aaa"
set ayang=nothing
错误提示:
ayangsoft '800a005b' 未设置对象变量或 With block 变量 \dll\test.asp, line 20
组件可以100%确认己经注册成功。不知何解,是否是因为病毒引起。

解决方案 »

  1.   

    ASP 的调试,还真麻烦。继续慢慢调试吧
      
      

  2.   

    OnStartPage 还没被调用呢!
      

  3.   

    用个好你ASP调试器,看看是那句报的错
      

  4.   

    Set Context = PassedScriptContext  'Asp运行环境对象
        Set Application = Context.Application  'Asp 五大对象在VB中引用的时候要将对象实例化Set Context =new  PassedScriptContext
    set Application =new  Context.Application