-
14 Get Device ID
In HT6xx/PA96x, an 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.
15 Get OEM Info
In HT6xx/PA96x, an OEM ID had been burnt into terminal, user can check it by pressing
“Func”+”9”.
The sample code for read OEM ID as follow,
////////////////////////////////////////////////////////////////
{
TCHAR
szBuff[500];
ZeroMemory(szBuff,
sizeof(szBuff));
SystemParametersInfo(SPI_GETOEMINFO, 500, (LPVOID)szBuff, 0);
MessageBox(szBuff);
}
/////////////////////////////////////////////////////////
16 Get firmware and bootloader version info
////////////////////////////////////////////////////////////////
{
DEVICE_CONFIG
cfg;
if
(KernelIoControl(IOCTL_GET_DEVICE_CONFIG, NULL, 0, &cfg, sizeof(cfg), NULL))
{
//Get OS Version
mbstowcs(stringBuffer, cfg.swVersion, strlen(cfg.swVersion));
swprintf(szProductID, _T("OS version : %s"), stringBuffer);
Show(szProductID);
//Get Bootloader Version
memset (stringBuffer, 0, sizeof(stringBuffer));
mbstowcs(stringBuffer, cfg.bootloadversion, strlen(cfg.bootloadversion));
wsprintf(szProductID, _T("Bootloader version : %s"), stringBuffer);
Show(szProductID);
}
}
/////////////////////////////////////////////////////////