473,473 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using a "COM" class

Ot
Although I think I have developed a class library properly, maybe I
haven't. When I attempt to include a reference to that class library A
which appears in the IDE when I click the COM tab after selecting add
reference, I get an error:

<quote>
A reference to 'A' could not be added. Converting that type library to a
..NET assembly failed. Type library A was exported from a CLR assembly and
cannot be re-imported as a CLR assembly.
</quote>

I am at a loss to understand what it is trying to tell me. If the stuff in
the DLL created is CLR (isn't that Common Language Runtime?) then shouldn't
a second project be able to reference the DLL by including it as a
reference?
Nov 20 '05 #1
3 2227
"Ot" <ur***@tds.invalid (use net)> schrieb
Although I think I have developed a class library properly, maybe
I haven't. When I attempt to include a reference to that class
library A which appears in the IDE when I click the COM tab after
selecting add reference, I get an error:

<quote>
A reference to 'A' could not be added. Converting that type library
to a .NET assembly failed. Type library A was exported from a CLR
assembly and cannot be re-imported as a CLR assembly.
</quote>

I am at a loss to understand what it is trying to tell me. If the
stuff in the DLL created is CLR (isn't that Common Language Runtime?)
then shouldn't a second project be able to reference the DLL by
including it as a reference?


It is not possible to use the COM wrapper of a .NET assembly in a .NET
project (please don't ask me why). Reference the assembly (*.dll) directly
(on the ".NET" folder in the add reference dialog).
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
Ot

"Armin Zingler" <az*******@freenet.de> wrote in message
news:eQ**************@TK2MSFTNGP10.phx.gbl...
It is not possible to use the COM wrapper of a .NET assembly in a .NET
project (please don't ask me why). Reference the assembly (*.dll) directly (on the ".NET" folder in the add reference dialog).
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


Forgive me if my questions are naive. I am somewhat new to this.

So the consumer/user of my class references the class by directly referring
to the DLL.

In the COM environment, when the consumed/used class changes (a new version
delivered) the consuming program will refer/use the changed module, right?
My program, in turn, references classes via COM that are developed in C++,
C, et al. When those programs change, I do nothing to my code.

Will the consumer/user of _my_ class experience this behavior? That is,
when I deliver a slicker version will they automatically reap the benefit?
Or must they recompile?
Nov 20 '05 #3
"Ot" <ur***@tds.invalid (use net)> schrieb
It is not possible to use the COM wrapper of a .NET assembly in
a .NET project (please don't ask me why). Reference the assembly
(*.dll)

directly
(on the ".NET" folder in the add reference dialog).


Forgive me if my questions are naive. I am somewhat new to this.

So the consumer/user of my class references the class by directly
referring to the DLL.

In the COM environment, when the consumed/used class changes (a
new version delivered) the consuming program will refer/use the
changed module, right? My program, in turn, references classes via
COM that are developed in C++, C, et al. When those programs change,
I do nothing to my code.

Will the consumer/user of _my_ class experience this behavior?
That is, when I deliver a slicker version will they automatically
reap the benefit? Or must they recompile?


Sorry, I have (almost) no experience in this.

Somebody else can help?

There is also an interop group:
microsoft.public.dotnet.framework.interop

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: TJ | last post by:
In C# how do you achieve pass-by-reference property declarations in the Type Library? I am writing a COM Class Library that must mimick an existing library for which the only information is the...
5
by: Tim Frawley | last post by:
I created a .NET Com Class object for use in ASP reports to export database results directly to Excel. I have it all working just find but I cannot get the Excel process to go away after the job...
0
by: Mark | last post by:
I receive the following error when instantiating a COM Class built in VB.Net: Run-time error '-2147217843 (80040e4d)': No Error information available: DB_SEC_E_AUTH_FAILED(0X80040E4D). It...
6
by: Mark | last post by:
How can I "Unbuild" a COM class? Basically, I used the "Build" command to register to COM Class. But I want to remove/unregister it. Thanks, Mark
2
by: Sakke | last post by:
Hello! We have written a GCryptoSvr.dll COM server in C++. Inside that resides WebClient COM component. WebClient CLSID is {8DC27D48-F94C-434B-A509-C3E1A3E75B9E}. When we are using that...
1
by: jimmyfo | last post by:
Hi, I recently wrote an ASP.Net web application in VS2005 and published (using VS2005 Publish feature) it to a relatively clean machine with ASP.Net 2.0 and MDAC 2.8 installed on it. However, when...
1
by: VoTiger | last post by:
Hi, i want to make my own DLL in DotNet for an Excel use. I have tried COM but i am facing a little problem... it might be normal but i hope not. Here is my problem : I have made a lot of classes...
1
by: Mayur | last post by:
This is my COM wrapper written in c#. using System.Runtime.InteropServices; namespace SAFE_NAMESPACE_NAME { #region Events raised by your COM class public delegate void Event1Handler(int i,...
9
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, I'm using automation and it's working fine when I run it from my local machine. but if I try to access it from another machine it's giving me this Error: Retrieving the COM class factory...
4
by: =?Utf-8?B?QmFkaXM=?= | last post by:
Hi, I'm using automation and it's working fine when I run it from my local machine. but if I try to access it from another machine it's giving me this Error: Retrieving the COM class factory...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.