-
10. Get Device ID
In MR650, a unique ID had been burnt into terminal, user can check it by pressing "Func"+"9".
The sample code for read device ID as follow,
////////////////////////////////////////////////////////////////
HWND hDeviceId = GetDlgItem(hWnd, IDC_DEVICEID);
PDEVICE_ID pDeviceID = NULL;
TCHAR outBuf[512], deviceID[200];
DWORD bytesReturned;
char platformID[64];
pDeviceID = (PDEVICE_ID)outBuf;
pDeviceID->dwSize = sizeof(outBuf);
if (KernelIoControl(IOCTL_HAL_GET_DEVICEID, NULL, 0, outBuf, sizeof(outBuf),
&bytesReturned))
{
// Platform ID
memcpy((PBYTE)platformID, (PBYTE)pDe pDeviceID->dwPlatformIDOffset,
pDeviceID->dwPlatformIDBytes);
// Device ID
memcpy((PBYTE)deviceID, (PBYTE)pDe pDeviceID->dwPresetIDOffset,
pDeviceID->dwPresetIDBytes);
}
/////////////////////////////////////////////////////////
The code will have platformID holds Platform ID, and deviceID holds Device ID.
The follow is the API to get UUID in MR650.
KernelIoControl(IOCTL_HAL_GET_UUID, NULL, 0, theGUID, sizeof(_GUID), &sizeRead);
You can download this sample program about how to get UUID from the link.
http://w3.tw.ute.com/pub/cs/software/sample_program/mr650/MR650_Sample_source.zip
Содержание MR650
Страница 1: ...MR650 Programming Manual V 1 12 1 16 2008 ...
Страница 7: ... 7 13 FUNCTION KEY SETTING ON REGISTRY 65 14 UPDATE NOTES 66 ...
Страница 16: ... it is for internal use send messages ...
Страница 33: ... Be aware to release handles when program ends ...