can't find Pinvoke dll

  • Thread starter Thread starter Xavier PACOTTE
  • Start date Start date
X

Xavier PACOTTE

Hello,

I have a message sometimes under windows mobile 5 when I start my
application : can't find Pinvoke dll ..
I use differents external librairies. (not a windows librairies).
Can you help me?

Best regrads.
 
Do those external libraries exist on the device (e.g. under \Windows or the
applications directory) ?
 
I tried to copy dll under Windows directory and the application directory,
same problem.
 
What error are you getting? Ensure in your P/Invoke declaration you are
declaring SetLastError = true; ie:

[DllImport("CoreDll.DLL", EntryPoint = "PlaySound", SetLastError = true)]
public static extern int WCE_PlaySoundBytes(byte[] szSound, IntPtr hMod,
int flags);

Then call coredll.dll GetLastError().
 
Back
Top