/com+[:noAssembly]
where,
The /com+ compiler option enables the use of Managed Extensions for C++ and to create an output file that will require the NGWS runtime at run time. There may or may not be managed data in the application.
/com+ does not imply that classes, interfaces, or structs are managed; use __gc to explicitly specify when you want a construct to be managed.
/com+ does imply that all functions will be managed. To make specified functions unmanaged, use the managed pragma.
Code compiled with /com+ must also use the #using <mscorlib.dll>
statement.
Managed code is code that can be inspected and managed by the NGWS runtime. Managed code can access managed objects.
By default, the /com+ compiler option is not in effect.
See the /ASSEMBLY linker option for information about how you can create a NGWS assembly when you compile and link your Managed Extensions for C++ program.
Note the following restrictions on the use of /com+:
When /com+ is used to compile a program that does not use Managed Extensions for C++, the following guidelines apply to the use of inline assembly:
static void TestInlineAsmInStaticFunc(void) { __asm { nop } }
class CMyClass { public: int a, b, c; CMyClass() { a = b = c = 1; } CMyClass(const CMyClass & mSrc) { a = b = c = mSrc.a + 1; } }; void TestCopyCtors(void) { CMyClass m; f(3, m, 4); __asm { nop }; }
Compiler Options | Setting Compiler Options