In pocket pc 2002,we can use core.dll to get it.(see
http://www.pocketpcdn.com/articles/serial_number2002.html)
But in pocket pc 2003 no this dll.How to implement it??

Re: how get pocket pc 2003 device id or serial no? by Gernot

Gernot
Tue Jun 21 05:12:34 CDT 2005


"Robin Tan" <fivegg@163.com> schrieb im Newsbeitrag
news:eiKm0kkdFHA.2420@TK2MSFTNGP12.phx.gbl...
> In pocket pc 2002,we can use core.dll to get it.(see
> http://www.pocketpcdn.com/articles/serial_number2002.html)
> But in pocket pc 2003 no this dll.How to implement it??

A PocketPC with no core.dll would be quite useless I think. Try this
method it works on PPC2003 for me.

-Gernot



Re: how get pocket pc 2003 device id or serial no? by Gernot

Gernot
Tue Jun 21 05:13:52 CDT 2005


"Robin Tan" <fivegg@163.com> schrieb im Newsbeitrag
news:eiKm0kkdFHA.2420@TK2MSFTNGP12.phx.gbl...
> In pocket pc 2002,we can use core.dll to get it.(see
> http://www.pocketpcdn.com/articles/serial_number2002.html)
> But in pocket pc 2003 no this dll.How to implement it??

#define IOCTL_HAL_GET_DEVICEID 0x01010054

unsigned char buffer[512];
DWORD bytesReturned=0;
// extern BOOL __stdcall KernelIoControl(DWORD dwIoControlCode,
LPVOID lpInBuf, DWORD nInBufSize, LPVOID lpOutBuf, DWORD nOutBufSize,
LPDWORD lpBytesReturned);
HINSTANCE hi = LoadLibrary(TEXT("coredll.dll"));
if(hi)
{
typedef BOOL (*KernelIoControlptr)(DWORD, LPVOID, DWORD, LPVOID,
DWORD, LPDWORD);
KernelIoControlptr KernelIoControl = (KernelIoControlptr)
GetProcAddress(hi, TEXT("KernelIoControl"));
if(KernelIoControl)
{
if(!KernelIoControl(IOCTL_HAL_GET_DEVICEID, NULL, 0,
(void*)buffer, 512, &bytesReturned))
{
// Some older PPC devices only return the ID if the buffer == 16
bytes long
if(!KernelIoControl(IOCTL_HAL_GET_DEVICEID, 0, 0, (void*)buffer,
16, &bytesReturned)) return DGStr("FA17ED");
}
return __Bytes2Hex(buffer, bytesReturned);
}
}



Re: how get pocket pc 2003 device id or serial no? by ctacke/>

ctacke/>
Tue Jun 21 06:13:54 CDT 2005

The mechanism is the same. And coredll.dll exists on every CE device.

-Chris


"Robin Tan" <fivegg@163.com> wrote in message
news:eiKm0kkdFHA.2420@TK2MSFTNGP12.phx.gbl...
> In pocket pc 2002,we can use core.dll to get it.(see
> http://www.pocketpcdn.com/articles/serial_number2002.html)
> But in pocket pc 2003 no this dll.How to implement it??
>