Reputation: 33
I have an x86 dll built in c++. I need to be able to use the dll from a portable class library. This can be directly or indirectly, but I want to keep the entire application local on the users computer.
I have designed a c++/cli wrapper to allow access to the dll. I confirmed it works through an x86 console C# project.
I think I'm making this way too complicated but I am unfamiliar with a way to do what I want. I can't rebuild the dll in 64-bit and do side by side loading - I only have the option of using the x86 dll.
Thank you for the help.
Upvotes: 3
Views: 799
Reputation: 16744
Why do you need to reference a C++ DLL from a Portable Class Library? A C++ DLL isn't going to be usable from multiple platforms. The point of PCLs is that they can run on more than one platform, but that means everything they reference needs to also be a PCL.
Probably what I'd recommend is to use the abstraction pattern, as described here.
Upvotes: 1