473,471 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Making Code Library available to COM & .NET from the same assembly

Using C# I've created a code library of useful functions I use regularly in
..NET projects.

I know if you want to make a DLL available to COM clients, you have to
include an interface and guid ID e.g.

[Guid("13FE32AD-4BF8-495f-AB4D-6C61BD463EA4")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("Tester.HelloWorld")]
The question I have is what impact does creating a single DLL have on .NET
Clients if it contains wrappers to make it COM friendly?
Would it be better to create another DLL to wrapper the .NET functions and
the place the COM attributes in that one instead.

That way I will only have a single code library but two DLL's one with COM
wrappers and one without?

Cheers

Steve Le Monnier


Sep 25 '06 #1
1 1196

"Steve Le Monnier" <st*********@no.spam.hotmail.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
| Using C# I've created a code library of useful functions I use regularly
in
| .NET projects.
|
| I know if you want to make a DLL available to COM clients, you have to
| include an interface and guid ID e.g.
|
| [Guid("13FE32AD-4BF8-495f-AB4D-6C61BD463EA4")]
| [ClassInterface(ClassInterfaceType.None)]
| [ProgId("Tester.HelloWorld")]
|
|
| The question I have is what impact does creating a single DLL have on .NET
| Clients if it contains wrappers to make it COM friendly?

What do you mean with "if it contains wrappers ", managed classes don't
'contain' any wrappers whether they are attributed or not. Wrappers (here
CCW's) are only synthesized by the runtime when these classes are
effectively exposed to COM clients, they don't even exist when exposed to
..NET clients .
| Would it be better to create another DLL to wrapper the .NET functions and
| the place the COM attributes in that one instead.
|
Obviously No.
Willy.
Sep 25 '06 #2

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

Similar topics

3
by: Mart Rogers | last post by:
We have a situation where we have decided (in an attempt to keep things simple) to stick to local assemblies rather than global ones. However we now have the following situation looming AssyA ...
7
by: Wysiwyg | last post by:
Is there any way to add an embedded resource to a project without copying it to the project's directory? I have shared resources and don't want each project using the images, xml files, etc. to...
7
by: jason | last post by:
i have a C# class library full of objects. the immediate need was to instantiate these objects in classic ASP, so i inherit ServicedComponent and build the project with COM Interop set to true....
18
by: Joe Fallon | last post by:
I have some complex logic which is fairly simply to build up into a string. I needed a way to Eval this string and return a Boolean result. This code works fine to achieve that goal. My...
39
by: Abubakar | last post by:
I want to get characters for given ascii codes. Dont wanna use the CHR or ChrW functions. What r the .NET equivilents of the Chr & ChrW functions? Regards, Abubakar.
351
by: CBFalconer | last post by:
We often find hidden, and totally unnecessary, assumptions being made in code. The following leans heavily on one particular example, which happens to be in C. However similar things can (and...
18
by: dbahooker | last post by:
team i'm having a tough time getting these data readers to work correctly I'd just like to be able to centralize my GetDataReader functions; so i can pass a simple SQL statement and be passed...
5
by: ffrugone | last post by:
My scenario involves two classes and a database. I have the classes "Broom" and "Closet". I want to use a static method from the "Closet" class to search the database for a matching "Broom". If...
7
by: James Crosswell | last post by:
I want to create a class with a static property as follows: class MyClass { private static List<MyHandlerRegisteredHandlers = new List<MyHandler>; } I then want to be able to create...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
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.