Hilco

Hello,

Does anybody know how to uptain a machine code or cpu id with the Compact Framework.. in C#. I found an article for Windows Mobile 5 but this smartphone is running on Windows Mobile 2003 SE with Compact Framework 2.0

Or perhaps an other way to identify a smartphone

Regards,

Hilco Kleene

The Netherlands



Re: Smart Devices VB and C# Projects CPU ID or Machine Code Poc Windows Mobile 2003

Ilya Tumanov

Not sure what do you mean by "machine code", but closest thing to the ˇ°CPU IDˇ± is QueryInstructionSet().






Re: Smart Devices VB and C# Projects CPU ID or Machine Code Poc Windows Mobile 2003

Hilco

The only problem is that i am developing Smart Device app for the Pocket PC 2003 and not for Windows Mobile 5....

for example:

[DllImport("coredll.dll")]

private extern static int GetDeviceUniqueID([In, Out] byte[] appdata,

int cbApplictionData,

int dwDeviceIDVersion,

[In, Out] byte[] deviceIDOuput,

out uint pcbDeviceIDOutput);

This doesn't work because of this error: Can't find an Entry Point 'GetDeviceUniqueID' in a PInvoke DLL 'coredll.dll'.





Re: Smart Devices VB and C# Projects CPU ID or Machine Code Poc Windows Mobile 2003

Ilya Tumanov

So you need unique ID, not ˇ°CPU IDˇ± or "machine code". See this for older device. Keep in mind it might be device specific.






Re: Smart Devices VB and C# Projects CPU ID or Machine Code Poc Windows Mobile 2003

Hilco

Ilya,

thanks for the replies... I used your example and it works fine now. Thanks!

Regards,

Hilco Kleene