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-10
All you need to do is register your callback function to an associated keypad with the function in
the format (unsigned int key, void* param). The argument param is used to transfer your private
data to the callback function.
#include <windows.h>
#include <moxa/devices.h>
FKEYHNDL(keyF2)
{
printf("keyF2 is pressed\n");
return 0;
}
FKEYHNDL(keyF3)
{
printf("keyF3 is pressed\n");
return 0;
}
int WINAPI WinMain( HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
HANDLE hEvent;
DWORD rtn;
if (mxfkey_init())
return 1;
rtn = mxfkey_register("F2", keyF2, 0);
if (rtn)
return 1;
rtn = mxfkey_register("F3", keyF3, 0);
if (rtn)
{
mxfkey_stop();
return 1;
}
hEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
WaitForSingleObject( hEvent,20000 );
mxfkey_stop();
return 0;