How to Marshall (DLL::MyClass) object in a VS2005-C# App?
-
Hi, An application written in C#-VS2005 needs to use a class exported in a VC6Dll. I have googled around a bit about Data Marshalling using P/Invoke. But all I could find is information on how to use the exported functions from a dll OR a struct from a dll. I could not find any info on how to use the (exported,unmanaged) class of the dll in my C# App. Any help or link woud be helpful. Thanks and Regards, Arti Gujare
-
Hi, An application written in C#-VS2005 needs to use a class exported in a VC6Dll. I have googled around a bit about Data Marshalling using P/Invoke. But all I could find is information on how to use the exported functions from a dll OR a struct from a dll. I could not find any info on how to use the (exported,unmanaged) class of the dll in my C# App. Any help or link woud be helpful. Thanks and Regards, Arti Gujare
-
led mike
Hi Led, I did have a look at this site. For each class to be used from the dll a skeleton(StructLayout) of that class has to be defined in the project using that dll. However, the dll I am talking about is huge and consists of too many classes. I have approximately 16 exported classes which I would be using. 1) Is there a better way to do this? These classes again have member variable as objects of other classes not exposed from the dll. 2) Could you tell me how to write the StructLayout for a class having private members as objects of other classes. Regards, Arti Gujare