Ternary
Ternary

Reputation: 2421

Marshalling Between /MD and /MT Runtime Libraries

I have third party libs that were compiled as /MTd and /MT respectively. These cannot be changed. I am consuming them using a MT dll.

How can I cross boundaries into /MD dll land in order to satisfy the requires for /CLI and have any hopes of calling these third party libs from C#?

Upvotes: 0

Views: 111

Answers (1)

MSalters
MSalters

Reputation: 180295

Fairly easy: COM-style. That is to say, do not assume you can pass C++ types (because the C++ libraries differ) but instead pass all data using the native COM mechanism such as BSTR/_bstr_t.

Upvotes: 1

Related Questions