在VB6或经典ASP中使用.NET [英] Use .NET in VB6 or classical ASP

查看:192
本文介绍了在VB6或经典ASP中使用.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

重复 致电。 .NET方法从VB6通过COM可见DLL

在VB6中使用/调用.NET类/函数/库(.net 3.x)或经典ASP?
有没有人体验过吗?将.NET包装到COM需要多少努力?
有帮助的工具吗?

Which ways exist to use/call .NET classes/functions/libraries (.net 3.x) in VB6 or classical ASP ? Has anybody experiences with that ? How much effort is necessary to wrap .NET to COM ? Are there tools which help ?

推荐答案

实际上很容易,我创建了.NET组件从VB6 COM DLL和经典ASP。你基本上需要创建一个COM可调用包装器,将.NET组件公开给COM客户端。本文将让您入门

It's pretty easy actually and I have created .NET components called from both VB6 COM dlls and Classic ASP. You essentially need to create a COM callable wrapper thats exposes the .NET component to a COM client. This article will get you started

从COM组件调用.NET组件

几个指针


  • 任何COM可调用类型都需要一个无参数的构造函数

  • 标记public要暴露给COM的任何方法,属性或事件

  • 这是一个好主意,请 明确实现了一个界面 ,而不是依赖于为您生成的类。

  • Any COM callable types will need a public parameterless constructor
  • Mark public any methods, properties or events that you want to expose to COM.
  • It's a good idea to explicitly implement an interface as opposed to relying on one to be generated from your class for you.

这篇关于在VB6或经典ASP中使用.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆