先在VB6.0下创建一ActiveX工程,添加如下代码
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
|
创建一ASP页面,添加如下代码
<html xmlns="">
<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>
|
阅读(1295) | 评论(0) | 转发(0) |