要延长Jared的答案,四更常见的原因获得的MissingMethodException,而P /调用在CF:
To extend Jared's answer, four more common reasons to get a MissingMethodException while P/Invoking in the CF:
- 您缺少的依赖你调用到机库的的
- 本机assmebly被编为错误的子系统(如台式机,不符合CE)
- 本机的组装编译的错误处理器(即x86和ARM没有)
- 您没有足够的虚拟内存的DLL加载。
- You are missing dependencies of the native library you are calling into.
- The native assmebly was compiled for the wrong subsystem (i.e. desktop, not CE)
- The native assembly was compiled for the wrong processor (i.e. x86 and not ARM)
- You don't have enough virtual memory for the DLL to load.
你有没有验证的DLL入口点是未经修饰的东西,如 DUMPBIN ?
Have you verified the DLL entry points are undecorated with something like dumpbin?