Re: Linking to a .NET dll from C#
- From: "Bob Bryan" <RobertGBryanREMOVETHIS@xxxxxxx>
- Date: Fri, 24 Apr 2009 01:16:49 -0700
Cor,
The application is for a destination gateway that a client is using for obtaining price quotes and performance is absolutely critical. The users of this data will all be on the same computer per the client's request (trust me on this issue - I am aware that other price servers usually use a socket connection to communicate price updates to clients on other machines). I suppose another way to do it would be to use shared memory or memory mapped files.
In the past when using VC++, I believe we used COM and called CreateInstance on the object which would return a pointer to the object and then method calls were very efficient - like makiing a virtual method call in C++. This was many years ago though so I'm a little rusty and don't remember if we used a different technique to actually link to an existing dll or not. The question is - can something like this be done in a managed .NET language like C#, and if so what is the best way? Should we consider using com interop for this? Thought com was dead...
Bob
"Cor Ligthert[MVP]" <Notmyfirstname@xxxxxxxxx> wrote in message news:e7b69YJxJHA.1212@xxxxxxxxxxxxxxxxxxxxxxx
Bob,
Has this any goal, I did this when memory in Dos was limited to 640Kb (and there was absolute nothing more for a program despite all kinds of extended memory possibilities)
But now I don't see any reason anymore for that.
I am curious why you want this.
Cor
"Bob Bryan" <RobertGBryanREMOVETHIS@xxxxxxx> wrote in message news:7A86E279-6A12-4627-8EAA-B84124960B97@xxxxxxxxxxxxxxxxI am trying to find out if its possible to do the following from C#:
1. Determine if a certain managed .NET dll or assembly is loaded into memory or not. If not, then load it.
2. If the dll is already loaded, then get a reference to it so that its members can be called directly. The apps that will be using the dll already knows all the methods.
3. There are several apps (exes) that will be using the dll and I'm wondering if there is a way to dynamically link to a specific dll that is already in memory and get back a reference (or pointer) that will be just as fast as if each app had used static linking.
Can this be done, if so an example or link would be appreciated.
.
- Follow-Ups:
- Re: Linking to a .NET dll from C#
- From: Jesse Houwing
- Re: Linking to a .NET dll from C#
- From: Cor Ligthert[MVP]
- Re: Linking to a .NET dll from C#
- References:
- Linking to a .NET dll from C#
- From: Bob Bryan
- Re: Linking to a .NET dll from C#
- From: Cor Ligthert[MVP]
- Linking to a .NET dll from C#
- Prev by Date: Re: Linking to a .NET dll from C#
- Next by Date: Re: Linking to a .NET dll from C#
- Previous by thread: Re: Linking to a .NET dll from C#
- Next by thread: Re: Linking to a .NET dll from C#
- Index(es):
Relevant Pages
|