It is not a COM DLL. I would call it a native DLL. You will use Platform Invoke (P/Invoke) the same as for what you call the extern "C"
style. See Platform Invoke Examples. If you can find the header file showing the C signature for the functions then you can use that to create DllImport attributes for them.
C++ / C# interop

winprofessional
41
Reputation points
Hi, I have a C++ COM dll where some functions have been exported using def file using EXPORTS statement. Now, can I call these COM methods from a C# application? I have done some interop earlier using normal C++ DLLs where the function were exported in extern "C" style. Could you please provide some sample code or link for the EXPORT scenario?
1 answer
Sort by: Most helpful
-
Sam of Simple Samples 5,466 Reputation points
2021-07-08T17:49:23.28+00:00