Your top level question:
"Does VC++ compile down to machine code or intermediate code?"
You'd have to ask MS.
But given they are targeting different platforms (at least CLR and native x86), I'd guess the compiler operates in stages:
- Parse VC++
- Generate a high-level "intermediate" representation of the C++ code
- a) Generate CLR code or b) generate native x86 code
I'm not sure what the connection between your main question and the detailed question is, but anyway...
Yes, you should be able to set a VC++ function pointer to point to an arbitrary block of x86 code using a cast. You have to make sure that code follows all the VC++ calling/returning conventions. If the VC++ code is compiled as CLR code, the calling conventions likely include ways to signal that the function is either more CLR code, or native x86 code. Check the MS documentation for calling conventions.