问题描述
一个COM服务器是创建和我registerd这一点。
A COM server is create and I registerd that.
当我尝试添加COM服务器的COM客户端,我是不是能够添加,和以下错误是正在添加。
When I am trying to add that COM server in a COM Client, I was not able to add, and following error is comming.
一提到'COMTEST不能添加
该ActiveX类型库
'c\user\〜\Debug\COMTest.tlb'是
从.NET程序集导出,可以
不加入作为参考。
The ActiveX type Library 'c\user\~\Debug\COMTest.tlb' was exported from a .NET assembly and can not added as a reference.
添加引用,而不是到.NET
Add a reference to .NET instead "
有谁能够告诉我,什么是错。我注册在这两个方式COM,从VS同时,也试图与命令提示符。
can anybody tell me What is the mistake. I register the COM in both way, from VS also and also tried with command prompt.
推荐答案
这是一个为什么地球上你会做的消息。项目+添加引用,浏览选项卡,选择DLL,而不是TLB。所以,你将使用.NET类(ES)的,而不是直接通过COM互操作去两次。
This is a "why on Earth would you do that" message. Project + Add Reference, Browse tab, select the DLL, not the TLB. So you'll use the .NET class(es) directly instead of going through the COM interop twice.
这篇关于无法添加引用COM客户端COM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!