用VB 6封装ASP代码, 制作DLL组件
2007-07-25 10:29
447 查看
启动vb6.0,新建-->Active dll工程。单击"工程"-->引用,选择"microsoft active server pages object library"
和"microsoft activeX data objects 2.1 library"两项。将类模块的名称改为class将工程的名称改为object
'以下2个函数是前提:
Private myscriptingcontext As ScriptingContext
Private application As application
Private request As request
Private response As response
Private server As server
Private session As session
Public Sub onstartpage(passedscriptingcontext As ScriptingContext)
Set myscriptingcontext = passedscriptingcontext
Set application = myscriptingcontext.application
Set request = myscriptingcontext.request
Set response = myscriptingcontext.response
Set server = myscriptingcontext.server
Set session = myscriptingcontext.session
End Sub
Public Sub onendpage()
Set myscriptingcontext = Nothing
Set application = Nothing
Set request = Nothing
Set response = Nothing
Set server = Nothing
Set session = Nothing
End Sub
'定义一个方法
Public Sub aa()
response.Write "hello world!"
End Sub
最后编译生成zy.dll文件。注册regsvr32 路径zy.dll
在asp中调用
set nc=server.CreateObject("object.class")
nc.aa
和"microsoft activeX data objects 2.1 library"两项。将类模块的名称改为class将工程的名称改为object
'以下2个函数是前提:
Private myscriptingcontext As ScriptingContext
Private application As application
Private request As request
Private response As response
Private server As server
Private session As session
Public Sub onstartpage(passedscriptingcontext As ScriptingContext)
Set myscriptingcontext = passedscriptingcontext
Set application = myscriptingcontext.application
Set request = myscriptingcontext.request
Set response = myscriptingcontext.response
Set server = myscriptingcontext.server
Set session = myscriptingcontext.session
End Sub
Public Sub onendpage()
Set myscriptingcontext = Nothing
Set application = Nothing
Set request = Nothing
Set response = Nothing
Set server = Nothing
Set session = Nothing
End Sub
'定义一个方法
Public Sub aa()
response.Write "hello world!"
End Sub
最后编译生成zy.dll文件。注册regsvr32 路径zy.dll
在asp中调用
set nc=server.CreateObject("object.class")
nc.aa
相关文章推荐
- 用VB 6封装ASP代码, 制作DLL组件
- 用VB 6封装ASP代码, 制作DLL组件
- 用VB 6封装ASP代码, 制作DLL组件
- 用VB 6封装ASP代码, 制作DLL组件
- 用VB生成DLL封装ASP代码一个例子:连接access数据库等
- 用VB生成DLL封装ASP代码,连接数据库。
- 使用VB将ASP代码封装到DLL文件完整实例
- 用VB生成DLL封装ASP代码,连接数据库- -
- 使用VB将ASP代码封装到DLL文件完整实例
- 用VB生成DLL封装ASP代码例子
- 用VB生成DLL封装ASP代码一个例子:连接access数据库等
- 封装 JMail 4.4 的 POP3 为 .Net 组件 (.dll 程序集),实现 "邮件(附件) 到达" 等 "事件"!
- 使用VB将ASP代码封装到DLL文件
- VB制作可输出函数的通用DLL
- 使用VB开发封装ASP的DLL例子
- ASP 调用dll(VB)及封装dll实例
- vb.net封装组件成com的方法
- C#.NET 封装自定义组件(控件)Dll
- 封装 JMail 4.4 的 POP3 为 .Net 组件 (.dll 程序集),实现 "邮件(附件) 到达" 等 "事件,c#接收邮件
- Delphi编写组件封装asp代码的基本步骤(Asp组件系列)