By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,894 Members | 1,937 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,894 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a

"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 discussion thread is closed

Replies have been disabled for this discussion.