1. 打開 VisualBasic6 選擇 ActiveX DLL 開啟
2.設定引用元件 選擇 Microsoft Active Server Pages Object Library 按確定
3. 開始用 VisualBasic6 寫入程式喏


Option Explicit

Private Context As ScriptingContext
Private Application As Application
Private Response As Response
Private Request As Request
Private Session As Session
Private Server As Server

Public Sub OnStartPage(PassedscriptContext As ScriptingContext)
Set Context = PassedscriptContext
Set Application = Context.Application
Set Request = Context.Request
Set Response = Context.Response
Set Server = Context.Server
Set Session = Context.Session
End Sub

Public Sub showsuc()
Response.Write "測試"
End Sub

Public Sub OnEndPage()
Set Application = Nothing
Set Request = Nothing
Set Response = Nothing
Set Server = Nothing
Set Session = Nothing
Set Context = Nothing
End Sub

建立成為.DLL

使用regsvr32來註冊DLL
regsvr32 D:\mylib\bi.dll
arrow
arrow
    全站熱搜

    lovean 發表在 痞客邦 留言(0) 人氣()