Hethcox
Hethcox

Reputation: 108

C# Wrapper for C++

I'm working on an app that I would really like to write in C#, but I need to use a library that is in C++. The vendor supplements their DLL with some C++ code to make the API more convenient, which it does, but it's still C++. I'd like to incorporate this extra C++ code into my app. It seems reasonable to create a DLL to wrap the vendor-supplied C++ code and the other calls into a module that I can use in C#.

My question is, does it make sense to wrap a DLL in another DLL? Are the potential problems I should watch out for?

Best, John

Upvotes: 0

Views: 129

Answers (1)

zmbq
zmbq

Reputation: 39013

Wrapping a wrapper for the sake of creating a better API (or, in your case, a .NET API) is OK. You might face some interop problems, as they can always pop up when moving from managed to unmanaged code.

Upvotes: 1

Related Questions