We recommend using Visual Studio 2017
This documentation is archived and is not being maintained.

Compiler Error C3645

'function' : __clrcall cannot be used on functions compiled to native code

The presence of some keywords in a function will cause the function to be compiled to native.

The following sample generates C3645.

// C3645.cpp
// compile with: /clr /c
#pragma unmanaged 
int __clrcall dog() {}   // C3645