linesh Posted September 18, 2006 Posted September 18, 2006 I have a native C++ (not COM) DLL that has classes in it. I would like to call it from csharp - create class objects, and invoke functions. What is the best way of approaching this. I donot have access to the source, all i have is the .h files and the dlls. I am not really very familiar with P/Invoke - is that the only option? Thanks in advance! Linesh Quote
Administrators PlausiblyDamp Posted September 19, 2006 Administrators Posted September 19, 2006 Unfortunately P/Invoke is about the only option and not likely to be an easy one at that. Depending on how the classes have been exported from the DLL the actual method names could have been 'mangled', in this case you would need to use a tool like dumpbin.exe to get the actual exported method names to call. Depending on the situation in might be easier to create a .Net wrapper in managed C++ and call the wrapper from .Net. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts