MissingMethodException only on device, not in emulator

G

Guest

in the article:
http://www.codeproject.com/netcf/VBPocketPCBitmaps.asp
it explains how to load a c# project 'inside' of a VB project as a .dll and
call it from VB code. This example uses the C# code found in the MS
scribbler demo app to save a bitmap to a file . This method works great when
debugging to the 2003 emulator, but when deployed to an actual device, I
receive a 'Managed MissingMethodeException' error when I call the code. I
have verified that the '.dll is on the device in the application directory.
Must I register this .dll or something?
 
P

Peter Foot [MVP]

If you are calling into a native dll you have placed on the device, be aware
that the CPU architecture will be different to that of the Emulator. The
Emulator runs on X86 and a Pocket PC 2003 device will use the ARM
instruction set. You'll need to copy the ARM version of the dll to your
device - if the dll is present and you know it exports a specific function
then an incorrect CPU version of the dll is most likely cause.

Peter
 
G

Guest

Thanks Peter.... that was the problem. I have a custom .ini and .bat file
to create my final CABS with. I had copied the .dll that was created to my
main apps project directory, then referenced it in my custom .ini file.
Should have let VS do it's job the first time.
 

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