Problem with GetDeviceUniqueID on windows CE 5.0

J

Jay

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
 
G

Guest

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
 

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