Using Remote Graphics Software

Basic Application Control Agents

Basic Windows monitoring agents must have the ability to monitor the HPRemote event log and interpret its events. When the number of primary user connections drops to zero, an agent should execute its actions tied to applications of interest running in the Desktop Session. Broader design issues for a control agent are covered in the next section.

This section outlines a simple fixed-polling Windows agent that reads and interprets a local HPRemote event log. The basic structure involves two simple core functions:

processEvent(eventServer, eventSource, dwEventNum)

oopen event log, read event dwEventNum, close event log

oif valid read, process recognized EventIDs, then return

monitorEvents(eventServer, eventSource, seconds)

ofor a finite number of seconds (or infinite if seconds <= 0) do

oopen event log, read log length, close event log

oif log has changed, processEvent(), else sleep for X mSec

97