Can't find PInvoke DLL error in Windows Mobile

前端 未结 4 1266
故里飘歌
故里飘歌 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:49

    Given the error message there are usually one of 2 problems

    1. It can't find the DLL. The DLL is found by looking at the executing directory and the PATH environment variable
    2. It can't find the function within the DLL. Have you checked to make sure both the declaration and definition of the DLL are both extern "C" and marked as __declspec(dllexport)

    Also, sanity check is to make sure the DLL name is spelled correctly and lacking the .dll suffix.

提交回复
热议问题