请高手指点一下吧,谢谢!!
DLL在 VS2012 for windows phone中新建的(新建项目--模版--VC++--Windows Phone空动态链接库)
C++ 写的DLL编译成 Win32,然后在C#中添加这个DLL引用,运行程序,到:
i = Chk1(1); 这行就会出错;
声明:
[DllImport("W.dll", EntryPoint = "Ch", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern int Ch(int i);
调用:
i = Chk1(1);
不知为何出错??