|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Call C# Dll from CHi,
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
Show quote
"Ash" <A**@discussions.microsoft.com> wrote in message Investigate whether you can access COM components from your environment. news:B37A965F-5BB5-4043-A4EF-B6043FE3E4F7@microsoft.com... > 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. > 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 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. Show quote "David Browne" wrote: > > "Ash" <A**@discussions.microsoft.com> wrote in message > news:B37A965F-5BB5-4043-A4EF-B6043FE3E4F7@microsoft.com... > > 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 > > > |
|||||||||||||||||||||||