PA-2400WC Library Manual(Version 1.00)CASIO Computer Co., Ltd.Copyright ©1999. All rights reserved.July 1999
103. System Library3.1 OverviewThis System Library functions can provide you with various dedicated functions such as backlight control,power OFF s
113.2 Details of FunctionTitle FunctionCA_BacklightOnTurns on the backlight. If this function is called while the backlight is already on, nothing
12Title FunctionCA_BacklightOffTurns off the backlight.C Language InterfaceCalling SequenceBOOL CA_BacklightOff()ParametersNoneReturn ValuesTRUE : Nor
13Title FunctionCA_BacklightCheckAcquires the status of the backlight if it is set to on or off.C Language InterfaceCalling SequenceBOOL CA_BacklightC
14Title FunctionSyncPowerOffTurns off the power after access to an installed card is complete.C Language InterfaceCalling SequenceBOOL SyncPowerOff()P
15Title FunctionDisablePowerOffDisables power-off with the power button. This setting is cleared when the power is turned on.C Language InterfaceCalli
16Title FunctionEnablePowerOffEnables the power to be turned off with the power button.C Language InterfaceCalling SequenceBOOL EnablePowerOff()Parame
17Title FunctionStatusPowerOffAcquires the status of “enable/disable the power to be turned off with the power button”.C Language InterfaceCalling Seq
18Title FunctionApoCountResetResets the counter of APO time.By calling this function before elapse of the APO time set at the control panel, APO can b
19Title FunctionSoftResetResets the system. After this function is called, a worm-bootup is performed.C Language InterfaceCalling Sequencevoid SoftRes
2Table of ContentsPreface 4Chapter 1 Supported Files 51.1 Dedicated Library and Utility 71.1.1 System Library 71.1.2 SIPanel Library 71.1.3 I/O Bootup
20Title FunctionSetPowerOnAlarmEnables or disables “the automatic power-on to be activated with the alarm”.C Language InterfaceCalling SequenceBOOL Se
21Title FunctionGetPowerOnAlarmAcquires the status of “automatic power-on with the alarm” if it is disabled or enabled.C Language InterfaceCalling Seq
22Title FunctionSetPowerEventStatSets “power-on event notification” enabled or disabled.C Language InterfaceCalling SequenceBOOL SetPowerEventStat( BO
23Sample program to acquire power-on event notification#include <windows.h>static HANDLE hEventOn = NULL;static HANDLE hThreadOn = NULL ;DWORD W
24Title FunctionGetPowerEventStatAcquires the status of “power-on event notification” if it is enabled or disabled.C Language InterfaceCalling Sequenc
254. SIPanel Library4.1 OverviewIn this chapter, the SIPanel which is executed on the Windows CE Ver.2.11 (on PA-2400W), and the DLL(Dynamic Link Li
264.2 Use of SIPanel LibraryProgram for starting up the libraryBefore use of the SIPanel library, a dedicated program must be created to start up t
274.4 Details of FunctionTitle FunctionSIP_ExecutePanelInitiation of the SIPanelInitiates the SIPanel in the non-display mode. If it has already be
28 Title FunctionSIP_ShowPanelDisplay/Non-display of the SIPanelSets the SIPanel to display mode or non-display mode.C Language InterfaceCalling Sequ
29Sample program to start up the SIPanelThis is a source program of SipTsr.exe which must be used together with “CallSip.exe”.// SipTsr.cpp : Defines
37.7 Method of Describing Pathname 487.8 Conditions at Communication Partner 507.8.1 Rules of Naming File and Directory Pathname 507.9 Setting Up Regi
30if (hWnd == 0) // Check whether values returned by CreateWindow() are valid.return (FALSE);if (lsWindow(hWnd) != TRUE)return (FA
31Sample program of application software for business useInstall “SipTsr.exe”, and execute the following program.// CallSip.cpp : Defines the entry po
32wc.style = CS_HREDRAW | CS_VREDRAW;wc.lpfnWndProc = WndProc;wc.cbClsExtra = 0;wc.cbWndExtra = DLGWINDOWEXTRA;wc.hInstance = hInstance;wc.hIcon = NUL
33BOOL CallSip( HWND hWnd, WPARAM wId){HWND hSip;UINT CmdMessage = WM_USER;hSip = FindWindow( ClassName_TSR, NULL); // Fin
344.5 SIPANEL.EXE4.5.1 OverviewInitiate SIPANEL.EXE and call SIPANEL.DLL to control the SIPanel. The SIPanel will be initiated in thenon-display mod
355. I/O Bootup Library5.1 OverviewThe I/O bootup library monitors the connection status of dedicated I/O Box and notifies user of the status.5.2
365.3 Details of FunctionTitle Functioniobox_chkThis function monitors the connection and mounting status of PA-2400W terminal on I/O Box for aspec
375.4 Use of iobox_chkInternally, this function creates an event object of I/O Box and waits for the object for a specified time.During the wait time
385.5 Sample ProgramThis sample program is created with the method of “Multiple-Thread Mode” under developmentenvironment of Visual C++ 5.0 plus and W
39InitCommonControls(); // Initialize common controls - command barhInst = hInstance; // Save handle to create command barhWnd = Cre
4PrefaceThis manual describes the C language-dedicated library functions and utilities that run on the CASIOPA-2400W (hereinafter referred to as "
40case WM_PAINT:hdc = BeginPaint(hWnd, &ps);GetClientRect(hWnd, &rect);rect.top += CommandBar_Height(hWndCB);DrawText(hdc, TEXT("Hello Wi
41default:return (DefWindowProc(hWnd, message, uParam, lParam));}return (0);}VOID ioProc(){int ret;// ret=iobox_chk( INFINITE); // Wait for infinitere
426. Registry of LibrariesIn this chapter, registries which are used by the libraries of System and SIPanel are described. The I/OStartup Library d
437. File Transfer Utility7.1 OverviewThis file utility performs file transfer either between a host PC and PA-2400W or between two PA-2400Wtermin
447.2 List of Supported CommandsAmong file transmission protocol, this file transfer utility (FLCE) can support the following specificcommands.Tabl
457.3 Use of FLCEThe FLCE is an execution program, and there are two methods for the use. FLCE individually FLCE as child-process in user applica
467.5 RestrictionsThe file transfer utility (FLCE) is subject to the following restrictions: The FLCE does not support communication with a 3-pin
477.6 Communication CommandsOperational specifications for the FLCE should be made by initiating an appropriate command together withthe following
487.7 Method of Describing Pathname Enclose every pathname in a pair of parentheses. A pathname must have a length of 255 characters orless includin
49Reference:Windows CE has no concept of a drive letter. Accordingly, an additional drive is assigned a directory directlyunder the root directory.Exa
51. Supported FilesThe following files will be supported by the C-library functions and utilities described in this manual.Table 1.1File Function Des
507.8 Conditions at Communication Partner7.8.1 Rules of Naming File and Directory PathnameSpecify the pathname of file or directory at the communi
517.9 Setting Up RegistryBy rewriting values in the registry it is possible to modify the default values of commands’ parameters forcommunication e
527.9.2 Setting Up Registry with User ApplicationModify the registry as required from your application while referencing the following sample progr
53err=FALSE;}else {err=FALSE;}if( err==TRUE)MessageBox( NULL, TEXT( "Success setting registry!") , TEXT( "This is MessageBox"),MB_
547.10 Termination CodesThe FLCE returns one of the codes listed in Table 7.6 as the termination code when communication iscomplete. Upper-level pr
55Table 7.6 List of termination codesError CodeCategorycodeDetailcodeMeaning Possible Cause Remedy00h 00h Normally terminated Normal. -DCh toF5h00h N
567.11 Log FileThe FLCE will create a log file to record communication logs.Log File NameThe current log file name is fixed to "FLCE.LOG"
577.12 Precautions Under the state where the file transfer utility is operating, if a file is transmitted out or received in afolder that is opened
587.13 Details of Command and OptionTitle CommandFLCE /YThis command sets up the device, baud rate, and communication mode used for communication.
59Title CommandFLCE /SThis command transfers a file on the PA-2400W to the communication partner side of PA-2400W. If an identical file name exists i
6Notes:1. Since the “SIPanel.dll” and “SIPanel.exe” in English version are pre-installed in the ROM, you do notneed to install it every time you use
60Title CommandFLCE /RThis command uses a pathname request to specify file that exists on the communication partner side, then receivethe file. If an
61Title CommandFLCE /AThis command transfers the contents of file that exists on the PA-2400W and specified by the append file pathname tothe communic
62Title CommandFLCE /DThis command deletes a specified file or directory that exists on the communication partner side. For all other operations whic
63Title CommandFLCE /NThis command moves a file that is specified by the move source pathname and that exists on the communicationpartner side to the
64Title CommandFLCE /TThis command transfers the system date and time of the PA-2400W to the communication partner side for setting. Transmitted date
65Title CommandFLCE (Idle Start)This command passes the request right to the communication partner side and operates according to a command thatis req
667.14 Command and StatusTable 7.8StatusNo. Commands of the protocolSpecificationby FLCERequest bypartnerRemarks1 File transmission C C2 File recepti
677.15 Retry Process When Downloading FileIn this chapter, retry process for downloading files by the FLCE at time of a communication error isexpla
68Preparation at PA-2400WThe flow of retry operation is as follows. The operation is recommended only if such error as 0x0100protocol error (data erro
698. File Check Utility8.1 OverviewThe file check utility is used to check if an objective file has been successfully installed on thecommunicatio
71.1 Dedicated Library and Utility1.1.1 System LibraryTable 1.2No. Function Description Page1CA_BacklightOnTurns on the backlight. 112CA_Backlig
708.3 Operation MethodThis File Check Utility is to check if a file has been correctly copied to other PA-2400W or not.In this chapter, operating met
71Copying file with PC card (from PA-2400W to PA-2400W)Fig. 8.2Operation:1) Set a file correctly at the transmission side of PA-2400W.2) Specify a f
728.4 Describing Method8.4.1 Pathname Always enclose a pathname in a pair of quotation marks. One pathname must be 255 characters or lessincludin
738.5 Details about Command and Option The total number of characters must be 255 characters or less including "FCHKCE". If at least on
748.6 Command of FCHKCE8.6.1 Generation of List File If the names of files to be transferred (copied) from PA-2400W are specified, this command
758.6.2 Comparison by List FileWith this command the following comparison will be made: Comparison between the file information transferred (copie
768.7 Format of List FileThe format of list file to be generated with the file check utility is shown below.<FCHKLOG> :: = <FILENO> <
778.8 Syntax Analysis of Script FileIf a script file name is specified when generating a list file, the syntax of the script file is analyzed as fo
78<PATHNAME_PAIR> :: = <PATHNAME> <DELM> <PATHNAME><CMD_PARAMETER> :: = <CMD_NAME> <STRING><CMD_NAME>
798.9 Error Messages/CodesTable 8.3Code Message Meaning RemedyThe making of list file completed.00The contents of list file agreed.Normal terminatio
8 1.1.4 File Transfer UtilityTable 1.5 File transfer utilityNo. Command Description Page1 FLCE /Y Communication environment setup/Idle start 58
808.10 RestrictionBecause of the limitation from Windows CE some of the files contained in the “\Windows\” folder cannotbe duplicated. As a result, t
818.11 Details of Command and OptionTitle CommandFCHKCE /GIf the names of files to be transferred (copied) from the PA-2400W are specified, this c
82Destination directory name Specify the destination directory name of the file transmission (copy). Specify the directory name
83Title CommandFCHKCE /CThis command will perform the following comparisons; a comparison between the file information transferred(copied) from the p
92. Development EnvironmentYour own application program can be developed by implementing the CASIO’s dedicated library functionsand utility commands
Comments to this Manuals