Can't find PInvoke DLL error in Windows Mobile

前端 未结 4 1276
故里飘歌
故里飘歌 2020-12-18 23:27

I am having a lot of trouble getting a basic scenario to work on windows mobile 5.0 emulator. I have a winforms app that eventually calls into native code. Deployment work

4条回答
  •  误落风尘
    2020-12-18 23:48

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

    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.

    Have you verified the DLL entry points are undecorated with something like dumpbin?

提交回复
热议问题