NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error C3169

'function' : cannot declare a managed object or a gc pointer within an unmanaged function

Unmanaged functions cannot declare managed objects or pointers to managed objects.

The following sample generates C3169:

#using <mscorlib.dll>

__gc class A {
};

#pragma unmanaged   // remove this line to resolve

void func() {
   A __gc* a;   // C3169
}

#pragma managed

void main() {
}