2,添加引用Microsoft Active Server Pages Object Library
Public objContext As objectContext
Public Application As ASPTypeLibrary.Application
Public Server As ASPTypeLibrary.Server
Public Session As ASPTypeLibrary.Session
Public Response As ASPTypeLibrary.Response
Public Request As ASPTypeLibrary.Request
On Error Resume Next
Set Application = Nothing
Set Server = Nothing
Set Session = Nothing
Set Request = Nothing
Set Response = Nothing
Set objContext = Nothing
End Sub
Response.Write "王永胜的动态链接库"
End Sub
控制面板-管理工具-组件服务-com+应用程序
新建-应用程序-空应用程序
注册上面的dll
dim obj
set obj=server.CreateObject("project1.Class1")
obj.Print1