The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Compiler Error C3826


'type': declaring pinned formal parameters is illegal

A function parameter cannot be decorated with the __pin keyword.

C3826 is only reachable using /clr:oldSyntax.

The following sample generates C3826:

// C3826.cpp
// compile with: /clr:oldSyntax /c
__gc class G {};

typedef G __pin * GPinPtrType;
typedef G * GPinPtrType2;

void func1(G __pin * x) {}   // C3826
void func1b(G * x) {}   // OK

void func2(GPinPtrType x) {}   // C3826
void func2(GPinPtrType2 x) {}   // OK