Fieldpine Logo Documentation Home  

PosService Application


Overview

The PosService program is a small stub that can be used to start Fieldpine POS as a Windows Service. It simply loads fpos.dll and transfers control to it. fpos.dll contains all the application logic.

Stopping PosService on a running system may have the following side effects:

Command Line

/RegServer or /Service
This command is deprecated. Registers the service into the Windows SCM database. Typically requires administrator privileges.
/UnregServer
This command is deprecated. De registers the service

To register the service, you can use the following Windows Commands.

	sc delete PosService
	sc create "PosService" binPath= "C:\Fieldpine\Pos\PosService.exe"
	sc config PosService start= "delayed-auto"
	sc failure PosService reset= 1800 actions= restart/30000/restart/60000/restart/180000
Note, the spacing in the above commands is important. You can also issue QuickCode F72058 from a PosLane to perform the commands shown. The SC command may require administrator rights.

Application Start Logic

  1. Set Service status "Start Pending"
  2. Initialise Windows environment (COM etc)
  3. Perform any code updates pending. Code updates are simply applied and must already be present, this program does not directly download updates
  4. Load fpos.dll from the same folder as PosService.exe
  5. Set Service status "Started"
  6. Initialise the DLL and transfer control to it. fpos.dll is started in "service" mode, which primarily indicates that it is running in background mode.

As services do not have consoles to display error messages, fpos.dll will typically write error messages into the file CoreError.log

Notes

PosService requires a valid, current licence code. It will not start without a licence. Licences should be placed in fpos.ctl using the form licence:YYYYZZZZAAAABBBBCCCC where the actual licence string is used in place of YYYYZZZZAAAABBBBCCCC.

If you need to record a trace file for the PosService, you need to pre-enable this in the fpos.ctl file with cmdline:debug=4 This instructs the POS at startup to enable tracing as soon as possible. The trace file will be called trace.out and if you start the Pos interactively (eg for selling), it will also use this setting and overwrite the trace file. If tracing the service, be sure to only run the service

If the PosService has errors to report it will typically write these to the file CoreError.log