从.Net类库创建.COM组件 [英] Create .COM Component from .Net Class library

查看:77
本文介绍了从.Net类库创建.COM组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有一个.Net类库项目,它是Web服务的包装器。



它已经被设计为COM兼容使用COMVisible(True)属性。



但是现在我希望这些dll纯粹的工作就像在VB6中创建的COM一样。 />


目前我正在使用Regasm注册.Net dll,因此它依赖于.net框架。

我想用regsvs32注册它。



请有人在这方面指导我。

Hi,

I have a .Net Class Library Project which is a wrapper for web services.

It's already designed as COM compatible using COMVisible(True) attributes.

But Now I want these dll pure work as like COM like created in VB6.

Currently I am registering .Net dll using Regasm, so it has dependency over .net framework.
I want to register it using regsvs32.

Please can anyone guide me on these front.

推荐答案

我对你的问题很困惑。你说,你已经创建了.net库,但是你抱怨它是.net依赖的?您可以像使用COM一样使它可见,但它不是本机COM对象。即使您可以使用regsvr32注册它,库本身也将依赖于.net框架。但它不适用于regsvr32,因为该库不是COM组件,它是一个.net库,它具有.net框架提供的接口和COM包装器,而不是库本身。



所以我建议你接受依赖的事实,或者如果可以的话,在VB6下重写你的组件 - 但我想你不会这样做。
I am quite confused about your question. You state, that you have made .net library, but you complain that it is .net dependent? You can make it COM visible, as you did, but it won't be native COM object. Even if you could register it with regsvr32, the library itself would depend on .net framework. But it won't work with regsvr32 since that library is not COM component, it is a .net library that has the interfaces and the wrappers for COM made available by the .net framework, and not by the library itself.

So I suggest you accept the fact of the dependency, or rewrite your component under VB6 if you can - but I suppose you won't do that.


谢谢,



我得到你的观点,就像我不能使用没有.net框架的任何.net dll。我需要将我的项目转换为VB6或VC ++,以便它可以为我工作。对吗?



有没有可以将.net dll转换为VB6或VC ++的工具?
Thanks,

I got your point like I cannot use any .net dll without .net framework. I need to convert my project into VB6 or VC++ so it can work for me. right?

Is there any tool available which can convert the .net dll to VB6 or VC++ ?


这篇关于从.Net类库创建.COM组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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