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 C2694

Cannot declare gc pointer to 'void'

Garbage-collected pointers cannot be pointers to type void. To resolve the error, be sure managed pointers point to managed objects. The following sample generates C2694:

#using <mscorlib.dll>

__gc struct A {
};

void main() {
   void __gc* ptr;   // C2694

   // try..
   // A __gc* ptr;
}