I have a .h file that is externally generated and includes enums and strings I need to reference in my C# code.
To 'solve' this, I created a C++/CLI project to encapsulate the information in a class I can access from C#. This worked fine for me (running Windows 7 - 32 bit).
All has gone well until someone tried to run it on x64 and he got BadImageFormatException.
There is ONE LINE in the external .h that is keeping me from being able to build /clr:safe:
static const char* const NiFpga_M_OTRM_OVDFPGA_Signature = "C2BF591011B5C7046AB3528D7EFEFC72";
If it was just this instead, all would be fine:
#define NiFpga_M_OTRM_OVDFPGA_Signature = "C2BF591011B5C7046AB3528D7EFEFC72";
ARG! The application needs to build and run on both 64-bit and 32-bit Windows 7.
Any recommendations (that allow me to leave the .h file intact).