I decided to take a closer look at the #pragma managed and #pragma unmanaged directives in Managed C++. These directives are very important to managed C++ developers; they let you instruct the compiler to emit native code for all code that follows a #pragma unmanaged directive.
There’s another reason why you want to use these directives: the VS.NET debugger. Earlier, I reported that the VS.NET debugger cannot debug managed C++ code that uses pointers. However, if use the #pragma unmanaged directive to force the compiler to generate native instructions for the code that uses pointers, you’ll find that the debugger will automatically switch back into native mode when debugging that code!
Unfortunately, I’m in another deadline crunch, so not much more to report on these pragmas right now. I’ve got a bunch of partially compiled notes that I’ll convert later into some more internals info on IJW.