Dirk Dastardly Dirk Dastardly - 1 year ago 189
C# Question

Managed C++ and AnyCPU

I have a Managed C++ dll that I am referencing from a C# project. The C# project will be compiled as AnyCPU. Is there any way to compile a 32-bit and 64-bit version of the Managed C++ dll and then tell the C# project at runtime to load the correct one depending on which architecture it is being run?

Answer Source

This article discusses a complex way to do it, and see Stefan's comment that discusses a much simpler methods that applies to some applications.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download