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 C3821

'function' : value types/managed classes cannot be used in functions which use '__asm' or '__setjmp'

Functions with inline assembly or setjmp cannot contain value types or managed classes. To resolve the error, remove the inline assembly and setjmp or remove the managed objects.

The following sample generates C3821:

#using <mscorlib.dll>

__gc  class A {
   public:
   int i;
};

void main() {
   // cannot use managed classes in this function
   A *a;   

   __asm { 
      nop
   }
} // C3821