Ready for review
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