Sai
Wed Jan 21 23:54:30 CST 2004
This is a multi-part message in MIME format.
------=_NextPart_000_001D_01C3E0DA.4DB8E0C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi=20
I ve tried calling KernelIoControl with a reallocated buffer,
extern "C" __declspec(dllimport)=20
BOOL KernelIoControl(
DWORD dwIoControlCode, LPVOID lpInBuf, DWORD nInBufSize,=20
LPVOID lpOutBuf, DWORD nOutBufSize, LPDWORD lpBytesReturned
);
BOOL bRes =3D KernelIoControl(IOCTL_HAL_GET_DEVICEID, 0, 0, =
arrOutBuff, nBuffSize, &dwOutBytes);
//returns False
int z=3DGetLastError(); //Get 122 here as Amir Khan has suggested
memcpy((void *)&nBuffSize,arrOutBuff,dwOutBytes);
serialid=3D new BYTE[nBuffSize];
memset(serialid,0,nBuffSize);
bRes =3D KernelIoControl(IOCTL_HAL_GET_DEVICEID, 0, 0, serialid, =
nBuffSize, &dwOutBytes);
//returns False
In both the calls to KernelIoControl i get the same values in the =
buffer, (it returns the size of the buffer in both cases!!)
Any ideas why?
Thanks=20
sai
"Andrey Yatsyk" <andrew_NO_SPAM_@softspb.com> wrote in message =
news:#7FpzW03DHA.3216@TK2MSFTNGP11.phx.gbl...
> Take a look at message by Amir Khan in this thread:
>
http://www.pocketpcdn.com/forum/viewtopic.php?t=3D119
>=20
> Andrey Yatsyk
>=20
> "Sai Krishnan" <sai.jagannathan@honeywell.com> wrote in message
> news:uOBXXsx3DHA.360@TK2MSFTNGP12.phx.gbl...
> > Hi,
> > I are trying to get an id which can uniquely identify a pocket pc. =
I tried
> > using KernelIoControl, but it works only in HP iPAQ but not in =
DELL AXIM.
> >
> > Is there any function which can be used to get an unique id for a =
pocket
> pc
> > ?
> >
> > Thanks
> > sai
> >
> >
> >
>=20
>=20
------=_NextPart_000_001D_01C3E0DA.4DB8E0C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2462.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY style=3D"COLOR: #000000; FONT-FAMILY: ">
<BLOCKQUOTE id=3D0><LABEL id=3DHbSession =
SessionId=3D"1151551653"></LABEL>
<DIV><FONT face=3D"Comic Sans MS" size=3D2>Hi </FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" size=3D2>I ve tried calling =
KernelIoControl with=20
a reallocated buffer,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3D"Comic Sans MS" size=3D2><STRONG>extern "C"=20
__declspec(dllimport) <BR>BOOL KernelIoControl(<BR> DWORD=20
dwIoControlCode, LPVOID lpInBuf, DWORD nInBufSize, <BR> LPVOID =
lpOutBuf,=20
DWORD nOutBufSize, LPDWORD lpBytesReturned</STRONG></FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" size=3D2><STRONG> =
);</STRONG></FONT></DIV>
<DIV><STRONG><FONT face=3D"Comic Sans MS" =
size=3D2></FONT></STRONG> </DIV>
<DIV><FONT size=3D2><FONT face=3D"Comic Sans MS"><STRONG>BOOL bRes =3D =
KernelIoControl(IOCTL_HAL_GET_DEVICEID, 0, 0, arrOutBuff, =
nBuffSize,=20
&dwOutBytes);</STRONG></FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3D"Comic Sans MS"><STRONG>//returns=20
False</STRONG><BR><STRONG> int z=3DGetLastError()</STRONG>; //Get =
122 here=20
as Amir Khan has suggested<BR> memcpy((void=20
*)&nBuffSize,arrOutBuff,dwOutBytes);<BR> serialid=3D new=20
=
BYTE[nBuffSize];<BR> memset(serialid,0,nBuffSize);</FONT></FONT></DI=
V>
<DIV><FONT face=3D"Comic Sans MS" size=3D2><STRONG> bRes =3D=20
KernelIoControl(IOCTL_HAL_GET_DEVICEID, 0, 0, serialid, =
nBuffSize,=20
&dwOutBytes);</STRONG></FONT></DIV>
<DIV><STRONG><FONT face=3D"Comic Sans MS" size=3D2>//returns=20
False</FONT></STRONG></DIV>
<DIV><FONT face=3D"Comic Sans MS" size=3D2>In both the calls to =
KernelIoControl i=20
get the same values in the buffer, (it returns the size of the buffer =
in both=20
cases!!)</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" size=3D2>Any ideas why?</FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" size=3D2></FONT> </DIV>
<DIV><FONT face=3D"Comic Sans MS" size=3D2>Thanks </FONT></DIV>
<DIV><FONT face=3D"Comic Sans MS" size=3D2>sai</FONT></DIV>
<DIV><STRONG><FONT face=3DArial size=3D2></FONT></STRONG> </DIV>
<DIV><FONT face=3DArial size=3D2>"Andrey Yatsyk" <</FONT><A=20
href=3D"mailto:andrew_NO_SPAM_@softspb.com"><FONT face=3DArial=20
size=3D2>andrew_NO_SPAM_@softspb.com</FONT></A><FONT face=3DArial =
size=3D2>>=20
wrote in message </FONT><A=20
href=3D"news:#7FpzW03DHA.3216@TK2MSFTNGP11.phx.gbl"><FONT face=3DArial =
size=3D2>news:#7FpzW03DHA.3216@TK2MSFTNGP11.phx.gbl</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> Take a look =
at message by=20
Amir Khan in this thread:<BR>> </FONT><A=20
href=3D"
http://www.pocketpcdn.com/forum/viewtopic.php?t=3D119"><FONT =
face=3DArial=20
=
size=3D2>
http://www.pocketpcdn.com/forum/viewtopic.php?t=3D119</FONT></A>=
<BR><FONT=20
face=3DArial size=3D2>> <BR>> Andrey Yatsyk<BR>> <BR>> =
"Sai Krishnan"=20
<</FONT><A href=3D"mailto:sai.jagannathan@honeywell.com"><FONT =
face=3DArial=20
size=3D2>sai.jagannathan@honeywell.com</FONT></A><FONT face=3DArial =
size=3D2>>=20
wrote in message<BR>> </FONT><A=20
href=3D"news:uOBXXsx3DHA.360@TK2MSFTNGP12.phx.gbl"><FONT face=3DArial=20
size=3D2>news:uOBXXsx3DHA.360@TK2MSFTNGP12.phx.gbl</FONT></A><FONT =
face=3DArial=20
size=3D2>...<BR>> > Hi,<BR>> > I are trying to get an id =
which can=20
uniquely identify a pocket pc. I tried<BR>> > using =
KernelIoControl, but=20
it works only in HP iPAQ but not in DELL AXIM.<BR>> ><BR>> =
> Is=20
there any function which can be used to get an unique id for a =
pocket<BR>>=20
pc<BR>> > ?<BR>> ><BR>> > Thanks<BR>> > =
sai<BR>>=20
><BR>> ><BR>> ><BR>> <BR>> </FONT></BLOCKQUOTE>
<P></P></BODY></HTML>
------=_NextPart_000_001D_01C3E0DA.4DB8E0C0--