I am getting quite far into a VC++ project but am put off releasing it by the thought that all my unmanaged code will be lumped with the .NET code since this is one big Windows Forms project from Visual C++ 2008 Express. If this happens my code will be too prone to reverse engineering.
Anyone got any pointers for how to ensure my portable, unmanaged, native, C++ classes, files etc get compiled down x86 assembler?
How does using gcroot in native classes affect this?
http://msdn.microsoft.com/en-us/library/ms973872.aspx is a start. So much for the myth of “write-once-run-anywhere” portability. Seems I need to learn about COM to reuse C++ classes. While simpler solutions exist for ‘flat APIs’ by that I assume they mean object-less code.
http://msdn.microsoft.com/en-us/library/0adb9zxe%28v=VS.90%29.aspx
provides the answer. VS2008 does NOT default to producing native code for unmanaged classes. So I will placing #pragma unmanaged’s before each function there.