Doc. # 1-18895601
Date Updated 08-26-2004 Date Created 12-18-2002
Document Type Knowledge Base Related OS WinCE
Related Product TPC-642/ TPC-642S-CE/ TPC-642SE-CE
How to identify TPC-642S and TPC-642SE by programming?
Solution:
There are two methods to identify the TPC-642SE and TPC642S. First is to call the driver interface to get the the product's ID. The codes are following: #define IOCTL_GET_TPCVER 0x1012 TCHAR szClassName[60]; wsprintf(szClassName, TEXT("WDT1:")); g_hWDT = CreateFile(szClassName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if ( g_hWDT == INVALID_HANDLE_VALUE ) { MessageBox(NULL,_T(" *** Open WDT driver failed!"),_T("Error"),MB_OK); } DWORD dwTemp; DeviceIoControl(g_hWDT, IOCTL_GET_TPCVER, NULL, 0, &g_dwVer, 4, &dwTemp, NULL); if (g_dwVer==642)..... =====>TPC 642S if (g_dwVer==644)..... =====>TPC 642SE Second is to check the version.txt on \Windows. In the TPC-642S, the contents of version.txt as follows: TPC642 .... In the TPC-642SE, the contents of version.txt as follows: TPC642SE ...