You can create a new solution / project platform for a 64-bit build and then define different GUID-s for the different platforms. You'll then build 2 DLL-s of your MMC snap-in: one for 32-bit platforms and one for 64-bit platforms.
In Build->Configuration Manager
create a new build platfom (for example x64
) and then go to the Build
in Project properties
to define a new symbol for your x64
build target. This would be something like _WIN64
. You can leave the Platform target
dropdown as Any CPU
, just make sure that the 64-bit MMC loads your _WIN64 build version. (I'm not familiar with how to set up MMC snap-ins so I don't know what this involves.)
Once you do the above configuration steps, you can now pretty much duplicate your C++ code in C# to check for build target:
#ifdef _WIN64
[SnapInSettings("x64_guid")]
#else
[snapInSettings("x86_guid")]
#endif
The GUID-s would be hardcoded strings so they'd be constants.