User`s manual
Table Of Contents
- 1. Introduction
- 2. Getting Started
- Starting Your UC-7400-CE Computer
- Resetting Your UC-7400-CE Computer
- Operating UC-7400-CE Computer Via Serial Console
- Changing the Network Settings
- Operating Your UC-7400-CE Computer Via Telnet Client
- User/Group Management
- Adjusting System Time and RTC Time
- Starting and Stopping Services
- Troubleshooting Network Connectivity
- Simple Network Management Protocol (SNMP)
- 3. Web-based Management System
- 4. Application Development
- 5. Programming Examples
- A. Operating Programmable Function Keys and LCM
- B. Firmware Upgrade Procedure
- C. Service Information

UC-7400-CE User’s Manual Programming Examples
5-3
CloseHandle(hCom);
return NULL;
}
return hCom;
}
//=================================================================
static DWORD comReadThread(LPVOID param)
{
HANDLE hCom = (HANDLE)param ;
DWORD rtn;
unsigned char buffer[MAX_DATA_LEN+1];
while(1)
{
if (ReadFile(hCom, buffer, MAX_DATA_LEN, &rtn, NULL)==0)
{
printf("read data fail\n");
return 0;
}
buffer[rtn] = '\0';
printf("Data = %s\n", buffer);
}
CloseHandle(hCom);
}
int
comPair(WCHAR *wComPort, WCHAR *rComPort, unsigned int baudrate)
{
HANDLE wCom, rCom;
WCHAR sPort[64];
DWORD rtn, i, loop=0;
unsigned char buffer[MAX_DATA_LEN];
HANDLE waitH = CreateEvent(NULL, FALSE, FALSE, NULL);
if (waitH==NULL)
return 99;
/* create a handle to port "COM3" for transmitting data */
wsprintf(sPort, L"$device\\%s\0", wComPort);
wCom = createComHandle(sPort, baudrate);
if (wCom==NULL)
{
printf("Fail to create write port\n" );
return 1;
}
/* create a handle to port "COM3" for receiving data */
wsprintf(sPort, L"$device\\%s\0", rComPort);