A: 

My answer is YES. A possible approach is to use addin architecture so it works like this,

  1. When your C# application runs on x86, it loads the x86 version of the addin.
  2. When it runs on x64, it loads x64 version.

Then you prepare two projects for the addin versions. One is configured to compile for x86, while the other for x64. In turn, the x86 addin wraps over x86 build of the C++ library, and the x64 over x64 build of the C++ library.

This is slightly complicated because you have to maintain two addin project files, while the source files can be shared.

Using addin architecture, the addin libraries are loaded at runtime, so you have plenty of time to detect if now on x86 or x64, and then decide which addin to load.

Hope this help.

Lex Li
A: 

The main question you should ask yourself is, do you need a 64-bit version. For details see blogs posts by Scott Hanselman and myself.

If you really need both versions, you can also load both the 32bit and 64bit library into the GAC, so the runtime can chose the correct one automatically.

If you don't want to GAC your libraries, you can also take a look at this StackOverflow post, where a way to load the correct assembly is described. I don't really like this solution though, because it really requires a plugin model

Sander Rijken
A 64-bit version is occasionally attractive either due to performance (mostly if you're doing math in a native library) or due to memory limitations. I run into both regularly. Thanks for the link anyhow, although I also really don't like the plugin model.
Eamon Nerbonne