PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Cant find Pinvoke DLL
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Cant find Pinvoke DLL
![]() |
Cant find Pinvoke DLL |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
I have an an existing VC++ code for Windows Mobile 5.0 and we are able to call this dll properly over Windows Mobile 5.0 device using [DllImport("sample.dll")]. I had to use the same functionality of this dll in PocketPC 2003. I have changed the Target platform to Pocket PC 2003 using Configuration manager in VS2005. Initially I ended with linker errors which i was able to resolve by one of the suggestions from MSDN asking me to add "ccrtrtti.lib" library after which I did not get any compiler or Linker errors. However, when I try to access any of the methods, I am ending up with "Can't find PInvoke dll" error. I used dumpbin to check if methods are really exported using Dumpbin /exports and I can see all the methods I want to use as exported. I have ensured that the dll is placed in \Windows folder. I have configured loader in registry and could see the below message "Failed to find/load [sample.dll] (even in [\Windows\])" I have run out of options and need some hints on where to start troubleshooting. Thanks, Naresh |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Try writing a test app using VC++. Just do a loadlibrary call and verify
that the call returns a valid handle. If not then call GetLastError. This should give you an indication why the dll is not loading in 2003. Rick D. Contractor "Naresh Mirkhelkar" wrote: > Hi, > > I have an an existing VC++ code for Windows Mobile 5.0 and we are able to > call this dll properly over Windows Mobile 5.0 device using > [DllImport("sample.dll")]. > I had to use the same functionality of this dll in PocketPC 2003. I have > changed the Target platform to Pocket PC 2003 using Configuration manager in > VS2005. Initially I ended with linker errors which i was able to resolve by > one of the suggestions from MSDN asking me to add "ccrtrtti.lib" library > after which I did not get any compiler or Linker errors. > However, when I try to access any of the methods, I am ending up with "Can't > find PInvoke dll" error. > > I used dumpbin to check if methods are really exported using Dumpbin > /exports and I can see all the methods I want to use as exported. > > I have ensured that the dll is placed in \Windows folder. > > I have configured loader in registry and could see the below message > > "Failed to find/load [sample.dll] (even in [\Windows\])" > > I have run out of options and need some hints on where to start > troubleshooting. > > Thanks, > Naresh |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

