'method' : cannot import method - a parameter type or the return type is inacessible
The method could not be imported because one of the types is not accessible. To generate C3377, create two source code files and compile them as described below:
// a.cpp // compile with /com+ and /LD // creates a DLL called a.dll #using <mscorlib.dll> private __gc class X { // change 'private' to 'public' to resolve }; public __gc class Y { public: Y() { } void mf1(X *pX) { } }; // b.cpp // compile with /com+ // creates an EXE called b.exe #using "a.dll" #using <mscorlib.dll> void main() { Y *pY = new Y; // C3377 }