473,666 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
+ 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( ClassInterfaceT ype.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 1204

"Steve Le Monnier" <st*********@no .spam.hotmail.c omwrote in message
news:%2******** ********@TK2MSF TNGP06.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( ClassInterfaceT ype.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
3650
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 depends on AssyB depends on AssyD version 1 AssyA depends on AssyC depends on AssyD version 2 Obviously we cannot copy both versions of AssyD to the AssyA's bin directory. Is the only sensible way around this (rather than going the GAC route)...
7
5406
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 need to be updated with the current copy before being built. I also don't want projects being built with the old copy. Thanks! Bill
7
1473
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. and the objects work in classic ASP just fine. however, we are slowly introducing ASP.NET code, and i would like to make use of the same objects. however, i don't want to use the old COM method of Server.CreateObject(). i would like to use...
18
3150
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 question is what happens to the dynamically created assembly when the method is done running? Does GC take care of it? Or is it stuck in RAM until the ASP.Net process is recycled? This code executes pretty frequently (maybe 4 times per transaction) and...
39
2558
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
12956
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 do) occur in any language. These assumptions are generally made because of familiarity with the language. As a non-code example, consider the idea that the faulty code is written by blackguards bent on foulling the language. The term...
18
1733
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 back a valid DataReader object. I've been slaving with this all day long. I've been trying 'new' and not new and just slaving over this; im calling it an early day..
5
2117
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 it finds a matching "Broom", i want it to return a "Broom" object to the calling program. I want the static method to call the constructor for the "Broom" class. I want this static method, (and one other called "CreateBroom") to be the only...
7
1796
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 descendants of the MyHandler class which will register themselves using a RegisterHandler method, which
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8551
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4198
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.