Call C# Dll from C

G

Guest

Hi,

I need to call a C# dll from C (Mecury LoadRunner Vugen Script to be more
specific) I have been told that i need to create a C++ wrapper class, and
have instructions for doing this for Visual Studio 2003.
I have using Visual Studio 2005 and understand it is different to create a
mixed mode dll with .Net 2.0?
Also I am very unexperienced with Dlls and C++, but i understand that i need
to do something with structs in order for me to pass strings across from my
C# managed code dll to my C++ wrapper dll and then finally the call from my C
script.

Thanks

Ash
 
D

David Browne

Ash said:
Hi,

I need to call a C# dll from C (Mecury LoadRunner Vugen Script to be more
specific) I have been told that i need to create a C++ wrapper class, and
have instructions for doing this for Visual Studio 2003.
I have using Visual Studio 2005 and understand it is different to create a
mixed mode dll with .Net 2.0?
Also I am very unexperienced with Dlls and C++, but i understand that i
need
to do something with structs in order for me to pass strings across from
my
C# managed code dll to my C++ wrapper dll and then finally the call from
my C
script.


Investigate whether you can access COM components from your environment.
The process of creating a COM component in .NET is much easier (you can do
it in C#) then creating a dll in C++.

David
 
G

Guest

No, i dont think i can call COM components from C in that environment, all i
really need is a dll written in C/C++ that wraps a single function in a c#
dll.

would this really require a lot of work? the c# dll returns a string. I
would be very greatful if anybody has any example code.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top