> Once I got it working, but cannot reproduce it this time. I also remember
> that is was not always stable.
> Anothing approach is to pass all the ASP object you need, from the APS
code,
> to the component.
> Like this:
> 'In your Dll:
> Public Sub Initialize (byval objResponse as Response, byval objRequest as
> request etc)
> Set m_objResponse = objResponse
> Set m_objRequest = objRequest
> end sub
> etc.
> Good luck.
> > Hi,
> > I'm developing a component and wish to use the ASP library. It's got to
> run
> > on a Windows XP platform and there, just like Win 2000 had (after SP2
not
> > anymore), I get the "Error 91 - Object variable or With block variable
not
> > set" error message when calling ObjectContext.
> > Does anybody know how to solve this (searched all over the internet, but
> not
> > much success)?
> > Here's the code (logically, I get the error when Class_Initialize()
> starts):
> > Option Explicit
> > 'Implementing the ObjectControl interface
> > Implements ObjectControl
> > 'The ObjectContext property
> > Private objContext As ObjectContext
> > 'Declare variables
> > Private Request As Request
> > Private Response As Response
> > Private Session As Session
> > Private Application As Application
> > Private Server As Server
> > Private Sub Class_Initialize()
> > 'Obtain ASP Response objects
> > Set Response = objContext("Response")
> > Set Request = objContext("Request")
> > Set Session = objContext("Session")
> > Set Application = objContext("Application")
> > Set Server = objContext("Server")
> > End Sub
> > Private Sub ObjectControl_Activate()
> > Set objContext = GetObjectContext()
> > End Sub
> > Private Function ObjectControl_CanBePooled() As Boolean
> > ObjectControl_CanBePooled = False
> > End Function
> > Private Sub ObjectControl_Deactivate()
> > Set objContext = Nothing
> > End Sub
> > Public Function MapPath(strUrl As String) As String
> > MapPath = Server.MapPath(strUrl)
> > End Function