且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

找不到,在Windows Mobile的PInvoke DLL错误

更新时间:2023-11-20 16:08:16

要延长Jared的答案,四更常见的原因获得的MissingMethodException,而P /调用在CF:

To extend Jared's answer, four more common reasons to get a MissingMethodException while P/Invoking in the CF:

  1. 您缺少的依赖你调用到机库的
  2. 本机assmebly被编为错误的子系统(如台式机,不符合CE)
  3. 本机的组装编译的错误处理器(即x86和ARM没有)
  4. 您没有足够的虚拟内存的DLL加载。
  1. You are missing dependencies of the native library you are calling into.
  2. The native assmebly was compiled for the wrong subsystem (i.e. desktop, not CE)
  3. The native assembly was compiled for the wrong processor (i.e. x86 and not ARM)
  4. 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?