DLL PInvoke not found


G

Guest

Hi,
I'm trying to use a third party DLL (provided by the PDA manufacturer) in my
..net CF 2.0 application. I copy the dll on my device (Pocket PC Windows
mobile 2003) in \Windows directory and in my application directory. When I
run the program, I got error:

"System.MissingMethodException: DLL PInvoke 'thirdpartydll.dll' not found."

I enable loggin on compact framework and I found this message:

"Failed to find/load [thirdpartydll.DLL] (even in [\SDMMC Disk\myApp\])"

I read that it can be a memory problem. I only have 128M of memory. Since
the file exist, on device, what's the problem ?

Thanks.
 
Ad

Advertisements

P

Paul G. Tobey [eMVP]

Chances are it's just not in a place where the loader will find it.
\Windows is a good choice. If that doesn't work, I think it's something
other than the location, maybe your declaration of the P/Invoke call is
wrong, for example.

Paul T.
 
G

Guest

I don't have an explicit P/Invoke declaration in my code.
I only add a reference to the class in .net project.
According to documentation, I just have to copy the dll in windows
directory...


Paul G. Tobey said:
Chances are it's just not in a place where the loader will find it.
\Windows is a good choice. If that doesn't work, I think it's something
other than the location, maybe your declaration of the P/Invoke call is
wrong, for example.

Paul T.

shwac said:
Hi,
I'm trying to use a third party DLL (provided by the PDA manufacturer) in
my
.net CF 2.0 application. I copy the dll on my device (Pocket PC Windows
mobile 2003) in \Windows directory and in my application directory. When I
run the program, I got error:

"System.MissingMethodException: DLL PInvoke 'thirdpartydll.dll' not
found."

I enable loggin on compact framework and I found this message:

"Failed to find/load [thirdpartydll.DLL] (even in [\SDMMC Disk\myApp\])"

I read that it can be a memory problem. I only have 128M of memory. Since
the file exist, on device, what's the problem ?

Thanks.
 
P

Paul G. Tobey [eMVP]

You say that you're copying it two places in your first message. Are you?
Why? Other than telling you to follow the instructions from the software
vendor to the letter, I'm not sure what you can expect from a public forum.
If it didn't work for me, I'd call the software vendor!

Paul T.

shwac said:
I don't have an explicit P/Invoke declaration in my code.
I only add a reference to the class in .net project.
According to documentation, I just have to copy the dll in windows
directory...


Paul G. Tobey said:
Chances are it's just not in a place where the loader will find it.
\Windows is a good choice. If that doesn't work, I think it's something
other than the location, maybe your declaration of the P/Invoke call is
wrong, for example.

Paul T.

shwac said:
Hi,
I'm trying to use a third party DLL (provided by the PDA manufacturer)
in
my
.net CF 2.0 application. I copy the dll on my device (Pocket PC Windows
mobile 2003) in \Windows directory and in my application directory.
When I
run the program, I got error:

"System.MissingMethodException: DLL PInvoke 'thirdpartydll.dll' not
found."

I enable loggin on compact framework and I found this message:

"Failed to find/load [thirdpartydll.DLL] (even in [\SDMMC
Disk\myApp\])"

I read that it can be a memory problem. I only have 128M of memory.
Since
the file exist, on device, what's the problem ?

Thanks.
 
D

Dick Grier

Hi,

Is this a .NET dll? If it is a managed dll (assembly), then all that you
"should" need to do is to add a reference to it. However, you say PInvoke,
which to me implies a native dll, not managed code. If unmanaged, you would
need to add the correct declaration.

I just put managed dlls in the same location as the actual EXE that uses
them.

It sounds like some critical piece of information from the vendor is
missing.

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
G

Guest

I already requested information from vendor. I just want to have
complementary information from an other source while waiting for an answer...

It's not a .NET dll, this is why I find strange that I don't have to add
declaration (according to documentation and example I found ).

The dll controls bar code reader on the PDA.
 
Ad

Advertisements

D

Dick Grier

Is this a Symbol PPC? If so, then it is a managed dll. These DO have to be
deployed to the correct folder (and there are associated files that have to
be installed, too). In my experience, getting the steps just right is a
little painful, though I've had good success AFTER.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
G

Guest

No, it's an Intermec PCC.
In code, I refer to a dll to use method and event, and I must copy this dll
plus the problematic dll on PPC.
 
D

Dick Grier

Hi,

I suspect that Intermec may handle this in a similar fashion to that used by
Symbol. If so, then they should be able to walk you through the full
installation steps. Once installed properly, I (still suspect) that you
will be OK. Sorry, I don't have any hands-on experience with their
products.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
C

Chris Craft

I've done some work with Intermec dll's, which ones are you trying to get to
work? Barcode scanner? Printer? Did you get it off the Intermec site? Do you
have the exact link? I may be on an older version.

hope that helps,
Chris Craft
http://www.cjcraft.com/blog/
 
G

Guest

I try to use barcode scanner and Imager in same project.
If I use only barcode, it's ok. If I use only Imager, it's ok.
But, it seems that there is a conflict using both objects. When I close
Imager on form2, barcode reader stop working on form1.

I download Intermec SDK to get all library and .NET classes.
Intermec send me a new dll for Imager (test to resolve my issue), but when I
copy the dll in Windows directory, I get a Pinvoke error.
 
Ad

Advertisements

G

Guest

Hi shwac~
If you are doing right in your app to import the dll.
Then try think about :
Is the dll manufacturer built the dll based on VS2005 that has been
updated with .NET CF SP1? If so, but your VS2005 is without the
update....then the problem will be occurred, and vice versa...

Hope this is helpful for you. Try check it out.

Best Regards,
 
G

Guest

I installed .NET CF SP2.
It should be compatible with SP1, isn't it ?

I will ask for the DLL version from manufacturer to be sure.

thanks.

Josh Chang said:
Hi shwac~
If you are doing right in your app to import the dll.
Then try think about :
Is the dll manufacturer built the dll based on VS2005 that has been
updated with .NET CF SP1? If so, but your VS2005 is without the
update....then the problem will be occurred, and vice versa...

Hope this is helpful for you. Try check it out.

Best Regards,


shwac said:
Hi,
I'm trying to use a third party DLL (provided by the PDA manufacturer) in my
.net CF 2.0 application. I copy the dll on my device (Pocket PC Windows
mobile 2003) in \Windows directory and in my application directory. When I
run the program, I got error:

"System.MissingMethodException: DLL PInvoke 'thirdpartydll.dll' not found."

I enable loggin on compact framework and I found this message:

"Failed to find/load [thirdpartydll.DLL] (even in [\SDMMC Disk\myApp\])"

I read that it can be a memory problem. I only have 128M of memory. Since
the file exist, on device, what's the problem ?

Thanks.
 
G

Guest

Use reflector and look at it. You either have a versioning problem or a
dependency missing. Reflector will allow you to determine which.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Managed Code in an Embedded World
www.OpenNETCF.com


shwac said:
I installed .NET CF SP2.
It should be compatible with SP1, isn't it ?

I will ask for the DLL version from manufacturer to be sure.

thanks.

Josh Chang said:
Hi shwac~
If you are doing right in your app to import the dll.
Then try think about :
Is the dll manufacturer built the dll based on VS2005 that has been
updated with .NET CF SP1? If so, but your VS2005 is without the
update....then the problem will be occurred, and vice versa...

Hope this is helpful for you. Try check it out.

Best Regards,


shwac said:
Hi,
I'm trying to use a third party DLL (provided by the PDA manufacturer)
in my
.net CF 2.0 application. I copy the dll on my device (Pocket PC Windows
mobile 2003) in \Windows directory and in my application directory.
When I
run the program, I got error:

"System.MissingMethodException: DLL PInvoke 'thirdpartydll.dll' not
found."

I enable loggin on compact framework and I found this message:

"Failed to find/load [thirdpartydll.DLL] (even in [\SDMMC
Disk\myApp\])"

I read that it can be a memory problem. I only have 128M of memory.
Since
the file exist, on device, what's the problem ?

Thanks.
 
Ad

Advertisements

G

Guest

Hi shwac,

I strongly suggest you installing .NET CF SP1......And try again.

shwac said:
I installed .NET CF SP2.
It should be compatible with SP1, isn't it ?

I will ask for the DLL version from manufacturer to be sure.

thanks.

Josh Chang said:
Hi shwac~
If you are doing right in your app to import the dll.
Then try think about :
Is the dll manufacturer built the dll based on VS2005 that has been
updated with .NET CF SP1? If so, but your VS2005 is without the
update....then the problem will be occurred, and vice versa...

Hope this is helpful for you. Try check it out.

Best Regards,


shwac said:
Hi,
I'm trying to use a third party DLL (provided by the PDA manufacturer) in my
.net CF 2.0 application. I copy the dll on my device (Pocket PC Windows
mobile 2003) in \Windows directory and in my application directory. When I
run the program, I got error:

"System.MissingMethodException: DLL PInvoke 'thirdpartydll.dll' not found."

I enable loggin on compact framework and I found this message:

"Failed to find/load [thirdpartydll.DLL] (even in [\SDMMC Disk\myApp\])"

I read that it can be a memory problem. I only have 128M of memory. Since
the file exist, on device, what's the problem ?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top