VB编写的ASP可用的ActiveX组件
Lanno Cheecke 2006-8-22
页面调用代码(HTML)
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <title>无标题文档</title>
- </head>
- <script language="VBScript" type="text/VBScript">
- dim oDll
- sub newDll
- set oDll = CreateObject("Project1.DllVb")
- oDll.Addint
- end sub
- </script>
- <body onload="newDll">
- </body>
- </html>
新建一个ActiveX DLL工程,添加如下代码
- Private Sub Class_Initialize()
- MsgBox "class_initialize"
- End Sub
- Private Sub Class_Terminate()
- MsgBox "Class_Terminate"
- End Sub
- Public Function AddInt()
- MsgBox "AddInt"
- End Function