Avoiding C++ types in your P/invokes

It’s easier to explain this in an example. Let’s say you have a export function in your native DLL: void WINAPI MyFunction(_com_ptr_t<IMyInterface> ptr) { // … do something with ptr ptr->Func(); } And the DllImport would be something like this: [DllImport("mydll.dll")] void MyFunction(IMyInterface ptr); Everything seems to be perfectly valid, except that there is a…

0