Home   Free Applications   Code Snippets   Fun Stuff 
 
 You are here: Home > Code Snippets > Visual Basic
Register   Login  

 
Site Navigation


Print Print this page
Email E-mail this page
Bookmark Add to Favorites

 
ASP Objects in VB 6 ActiveX DLL's

Posted by on Friday, October 17, 2003 (EST)

This the syntax to use the asp objects in an ActiveX VB DLL.

OnStartPage is a default function an asp pages calls when
it creates the object.

Project needs Reference to ...
"Microsoft Active Server Pages Object Library"

Also, the object has to be created using the asp Server object

set objME = Server.CreateObject("MyDll.MyClass")

Private Request As IRequest
Private Response As IResponse
Private Server As IServer
Private Session As ISessionObject
Private Application As IApplicationObject

Public Function OnStartPage(aspScriptingContext As ScriptingContext)
    On Error Resume Next
   
    Set Request = aspScriptingContext.Request
    Set Response = aspScriptingContext.Response
    Set Server = aspScriptingContext.Server
    Set Session = aspScriptingContext.Session
    Set Applicaiton = aspScriptingContext.Application
   
End Function

Add Your Comment



Top