Seitenleiste


Access to information is restricted depending on your login. Request login-information through our contact form.

service:wince:drvlib:get_deviceid

Get_DeviceID

The function Get_DeviceID gets the unique DeviceID of the Trizeps-Module .

unsigned long Get_DeviceID(      
  int devid_type
  void* dest
); 
unsigned long GetDeviceID(      
  int devid_type
  void* dest
); 

Parameters

devid_type
Allowed values are: DEVICE_ID_TYPE_KUK and DEVICE_ID_TYPE_MICROSOFT

dest
Pointer to a KUKDEVICE or MSDEVICE structure (view drvlib_app.h):

#define DEVICE_ID_TYPE_MICROSOFT  0
#define DEVICE_ID_TYPE_KUK        1

typedef struct _DEVICE_ID {
  DWORD dwSize;
  DWORD dwPresetIDOffset;
  DWORD dwPresetIDBytes;
  DWORD dwPlatformIDOffset;
  DWORD dwPlatformIDBytes;
} DEVICE_ID, *PDEVICE_ID;

typedef struct mydevid
{
	DEVICE_ID ddesc;
	unsigned long devid[4];
} KUKDEVICE, *PKUKDEVICE;

typedef struct _msdevid
{
  BYTE devid[16];  
} MSDEVICE, *PMSDEVICE;

Note: In case *dest = ptr to KUKDEVICE set KuKID.ddesc.dwSize=sizeof(KUKDEVICE); Samples:

  unsigned long ret;
  KUKDEVICE KuKID;
  KuKID.ddesc.dwSize=sizeof(KUKDEVICE);
  ret = GetDeviceID( DEVICE_ID_TYPE_KUK, (char*)(&KuKID));
 
or:

  MSDEVICE  MsID;
  ret = GetDeviceID( DEVICE_ID_TYPE_MICROSOFT, (char*)(&MsID));

Return Values

If the function succeeds, the return value is the number of bytes filled into struct.

If the function fails, the return value is negative.

Remarks

Requirements

OS Versions: Windows CE 4.2 and later.
Header: drvlib_app.h
Link Library: drvlib_app.lib

See Also

Cookies helfen bei der Bereitstellung von Inhalten. Durch die Nutzung dieser Seiten erklären Sie sich damit einverstanden, dass Cookies auf Ihrem Rechner gespeichert werden. Weitere Information
service/wince/drvlib/get_deviceid.txt · Zuletzt geändert: 2012/03/23 12:21 von