Hello all,

I am using



string AppString = "deviceappid";
byte[] AppData = new byte[AppString.Length];
for (int count = 0; count < AppString.Length; count++)
AppData[count] = (byte)AppString[count];
int appDataSize = AppData.Length;
byte[] DeviceOutput = new byte[20];
uint SizeOut = 20;

GetDeviceUniqueID(AppData, appDataSize, 1,
DeviceOutput, out SizeOut);


----------------------------------
[DllImport("coredll.dll")]
private extern static int GetDeviceUniqueID([In, Out] byte[]
appdata,
int
cbApplictionData,
int
dwDeviceIDVersion,
[In, Out] byte[]
deviceIDOuput,
out uint
pcbDeviceIDOutput);
----------------------------------

to retrieve the device id in our application.

retrieving the device id works fine on the windows mobile emulator and
our windows mobile 5 devices. When I try to run it on our Windows CE
5.0 platform I get the following error.

Can't find an Entry Point 'GetDeviceUniqueID' in a PInvoke DLL
'coredll.dll'


any help would be great..


thanks in advanced.
Jay

Re: Problem with GetDeviceUniqueID on windows CE 5.0 by ctacke/>

ctacke/>
Thu May 17 15:32:50 CDT 2007

It's because that's a WM API. For generic CE you need to call
SystemParametersInfo with SPI_GETOEMINFO.


--

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


"Jay" <jderuyck@gmail.com> wrote in message
news:1179429245.436078.324450@e65g2000hsc.googlegroups.com...
> Hello all,
>
> I am using
>
>
>
> string AppString = "deviceappid";
> byte[] AppData = new byte[AppString.Length];
> for (int count = 0; count < AppString.Length; count++)
> AppData[count] = (byte)AppString[count];
> int appDataSize = AppData.Length;
> byte[] DeviceOutput = new byte[20];
> uint SizeOut = 20;
>
> GetDeviceUniqueID(AppData, appDataSize, 1,
> DeviceOutput, out SizeOut);
>
>
> ----------------------------------
> [DllImport("coredll.dll")]
> private extern static int GetDeviceUniqueID([In, Out] byte[]
> appdata,
> int
> cbApplictionData,
> int
> dwDeviceIDVersion,
> [In, Out] byte[]
> deviceIDOuput,
> out uint
> pcbDeviceIDOutput);
> ----------------------------------
>
> to retrieve the device id in our application.
>
> retrieving the device id works fine on the windows mobile emulator and
> our windows mobile 5 devices. When I try to run it on our Windows CE
> 5.0 platform I get the following error.
>
> Can't find an Entry Point 'GetDeviceUniqueID' in a PInvoke DLL
> 'coredll.dll'
>
>
> any help would be great..
>
>
> thanks in advanced.
> Jay
>