Click to See Complete Forum and Search --> : Error while adding reference on COM+ object created in C#
Alex Cherviakov
September 27th, 2002, 11:41 AM
Hello
I 've written COM+ librart within C#.
Then, when i try to add reference on it to my C# application
I get error message:
" A reference to "MyLib" could not be added. Converting the library to .NET assembly failed. Type library MyLib was exportrd from CLR assembly and can'not be re-imported to CLR assembly"
:confused:
What does it mean?
To use COM+ in C# I need write library in C++ 6.0 ?
or C# have alternative mechanism of remote using DLLs ?
Help me plz
MRutledge
September 30th, 2002, 07:39 PM
in .NET you would write a custom server side control or a library not a COM.... .NET is supposed to get rid of COM even thogh it has COM support....if you want to make it a COM object instead of a library or server side control then yes you would have to write it in C++ 6.0
Alex Cherviakov
October 1st, 2002, 03:05 AM
So, as I understood, C# does not support COM+.
But .NET objects (and C# remoting objects) must present
at server and at client side of object oriented system.
And there is not any new way of remote object control
According afore mentioned, C# is less object oriented
language then C++.
Please, correct me if that is wrong.
Arild Fines
October 1st, 2002, 05:29 AM
Originally posted by Alex Cherviakov
According afore mentioned, C# is less object oriented
language then C++.
That was a good joke. Ha ha. :rolleyes:
To me it seems like you have created a CCW(COM Callable Wrapper) for a C# object, and then tried to reference that wrapper from C#. C# can both use and create COM objects, but if you are going to be using it from C# anyway, why bother creating a COM object?
Alex Cherviakov
October 4th, 2002, 03:02 AM
C# support COM objects by using CWW and can create its
analog, named .NET objects.That's obviously.
But problem is C# unable to create COM+ or DCOM object
analogues. And remoted C# client must have whole (large and
oft alterable) set of object libraries....Very bad! :mad:
Where solution of the problem?
Using HTTTP and XML ... Much oft that's inconvenied and
hard in use.
What else?
makai
October 8th, 2002, 04:35 PM
Natively .NET does not use COM technology but instead uses assemblies. This is the recommended way to go if you have a choice.
However you are able to build ActiveX dlls or COM components in VB.NET by using the COM interop services. You need to create a new VB.NET project using the Class Library project type.
Then you need to check the 'Register for COM Interop' box somewhere in the project properties.
Then use the ComClass attribute to create the COM object. There is a tutorial which explains this in detail in MSDN - search for COM Interop and you should find what you need.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.