Post by Kenneth Porter
A vendor has supplied me with a DLL and .LIB of a C++ .NET wrapper around
their C API. No header file. My existing app is all unmanaged C++ with no
special MS libraries (like ATL and MFC). How do I hook this into my
With an unmanaged library I'd just #include the header and add the library
to the link inputs. What's the equivalent for a .NET library?
All the examples I'm finding go the other way, for calling an unmanaged DLL
from a managed language. I already know how to do that. (I needed a wrapper
for a customer using C#.)
I see at least two possibilities:
- Try to register the .NET wrapper DLL as a COM server, and then call
into the DLL via COM. (This has the advantages of being less work, and
even allows you to bridge over 32/64 Bit boundary by using out-of
process hosting in case your code and the native C++ code is for
describes how you can host the CLR runtime, load the DLL into it, and
then call into it.