Jell Posted March 5, 2004 Posted March 5, 2004 I am facing this problem 1. I have to load a C++ DLL into my C# code. 2. The method in the DLL which i want to access is GetNames(&strCStringArrayClass) This method takes a pointer to the CStringArray Class Object and populates the array of strings. If I use DllImport (pInvoke) method, how should i write the prototype for the exported method??? is there any other way of doing this? Please Help Quote
HJB417 Posted March 6, 2004 Posted March 6, 2004 (edited) I believe u will need to use c++.net for this. I cannot think of a way to create a CStringArray object in c# to be passed to the c++ method. Edited March 7, 2004 by HJB417 Quote
*Experts* Bucky Posted March 7, 2004 *Experts* Posted March 7, 2004 I believe if you declare the parameter as the IntPtr type, you can just pass the method directly to the DLL and marshalling will convert the method into a pointer. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts