PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Compact Framework Problems reading DeviceID on Intermec

Reply

Problems reading DeviceID on Intermec

 
Thread Tools Rate Thread
Old 08-03-2007, 08:57 AM   #1
Rob
Guest
 
Posts: n/a
Default Problems reading DeviceID on Intermec


Hi all,
I tried the code showed here in order to get the DeviceID of several devices
(WindowsCE and PPC):
http://blogs.msdn.com/jehance/archi.../12/181116.aspx

In all the devices but one, an Intermec with Windows Mobile 2003, it worked
correctly.
In the Intermec, I get this error:

This platform may not support DeviceIDs -> System.DllNotFoundException:
unable to load DLL 'coredll.dll'

I also tried a c++ application that should return the deviceID, and it
didn't work too.

Is it possibile that on Intermec that API is not implemented? In other
Windows Mobile devices (both real and emulator), it worked correctly.
Isn't it a standard API? How can I know if a particular device implements it
or not?

I also found some documents, such as this
http://groups.google.it/group/micro...4e5183e45b24389

but there aren't enough information.

  Reply With Quote
Old 08-03-2007, 12:53 PM   #2
Guest
 
Posts: n/a
Default Re: Problems reading DeviceID on Intermec

I don't believe it was required for device OEMs to implement it until PPC
2003SE.


--
Chris Tacke - Embedded MVP
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--



"Rob" <a@a.com> wrote in message
news:uncPe$VYHHA.3272@TK2MSFTNGP03.phx.gbl...
> Hi all,
> I tried the code showed here in order to get the DeviceID of several
> devices (WindowsCE and PPC):
> http://blogs.msdn.com/jehance/archi.../12/181116.aspx
>
> In all the devices but one, an Intermec with Windows Mobile 2003, it
> worked correctly.
> In the Intermec, I get this error:
>
> This platform may not support DeviceIDs -> System.DllNotFoundException:
> unable to load DLL 'coredll.dll'
>
> I also tried a c++ application that should return the deviceID, and it
> didn't work too.
>
> Is it possibile that on Intermec that API is not implemented? In other
> Windows Mobile devices (both real and emulator), it worked correctly.
> Isn't it a standard API? How can I know if a particular device implements
> it or not?
>
> I also found some documents, such as this
> http://groups.google.it/group/micro...4e5183e45b24389
>
> but there aren't enough information.



  Reply With Quote
Old 08-03-2007, 01:13 PM   #3
Peter van Rees
Guest
 
Posts: n/a
Default Re: Problems reading DeviceID on Intermec


I too had problems with intermec devices.

I solved it by adjusting the buffersize in the call to
KernelIoControl. It had to be set to 39 instead of 20 for me to get it
working. Since this does not interfere with operation on 'normal'
devices, I just set my initial buffersize to 39 in all cases.

Hope this helps.

Peter




On Mar 8, 9:57 am, "Rob" <a...@a.com> wrote:
> Hi all,
> I tried the code showed here in order to get the DeviceID of several devices
> (WindowsCE and PPC):http://blogs.msdn.com/jehance/archi.../12/181116.aspx
>
> In all the devices but one, an Intermec with Windows Mobile 2003, it worked
> correctly.
> In the Intermec, I get this error:
>
> This platform may not support DeviceIDs -> System.DllNotFoundException:
> unable to load DLL 'coredll.dll'
>
> I also tried a c++ application that should return the deviceID, and it
> didn't work too.
>
> Is it possibile that on Intermec that API is not implemented? In other
> Windows Mobile devices (both real and emulator), it worked correctly.
> Isn't it a standard API? How can I know if a particular device implements it
> or not?
>
> I also found some documents, such as thishttp://groups.google.it/group/microsoft.public.dotnet.framework.compa...
>
> but there aren't enough information.



  Reply With Quote
Old 08-03-2007, 01:50 PM   #4
chris-s@mailcity.com
Guest
 
Posts: n/a
Default Re: Problems reading DeviceID on Intermec

Are you referring to the device serial number? If so, this is the code
I use....

[System.Runtime.InteropServices.DllImport("psuuid0c.dll",
EntryPoint="?GetSerNum@@YAHPAGK@Z")]
private static extern int GetSerNum(System.Text.StringBuilder
SerNum, int len);

public static string GetSerialNumber()
{
System.Text.StringBuilder serNum = new
System.Text.StringBuilder(new string('\0', 12));
int result = GetSerNum(serNum, 12);
return serNum.ToString();
}

Chris

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off