The Window Dressing Application

My application The Window Dressing Application

Run the interactive demo of this application for an overview of my part of the project. Please note that the demo requires Flash 5.0 or higher.

Features

  • Client name set at run time.
  • Automatic Screen Captures.
  • Reliable connection i.e. mouse events are never dropped.
  • Modal popups prevent the user from swamping VCC.
  • Low processor toll - 1% usage at 20 fps (screens generated by separate test process) with every screen being written to disk.
  • Thin - minimum conceptual processing.

A Thin Client

The screen buffer is converted to a windows renderable form and optionally saved to disk. Windows mouse events are injected into the VCC model.
This is a minimum of processing and can be justified in it's exclusion from the VCC model.

The applications main tasks

Sending a Mouse Event

The 'OK' message box

The 'Retry' message box

The mouse events are stored in a FIFO queue implemented on a Win32 Pipe. The benefits of this include a minimum of blocks incurred by VCC and the Client application. The process of sending a mouse message looks like this: -

  • User clicks on virtual screen (while client connected).
  • Windows screen co-ordinate converted to the virtual screens co-ordinate system.
  • Attempt to queue this virtual mouse event made
    • If successful system ready for further events.
    • If unsuccessful and event was 'down' a modal OK message box appears informing the user, the event is discarded.
    • If unsuccessful and the event was 'up' a modal Retry message box appears, an attempt to queue the event is made each time the user selects retry.

The main code to accomplish this task is MousePipe, Cls_OnLButtonUp, Cls_OnLButtonUp and registerMouse.

Receiving a Screen Buffer

Two bitmap objects exist as a double buffer. The 'current' buffer is the bitmap available for read attempts. The buffers are protected by a single (serialised) writer, multiple reader guard, CSWRMG.
This enables the bitmap to be painted to screen, written to a file and to be updated simultaneously. The benefits of this include a minimum of blocks incurred by VCC and a responsive display. The process of receiving a screen buffer looks like this: -

  • Write lock on the other bitmap is obtained.
  • VCC sends screen buffer on Pipe.
  • Screen buffer converted and written to the write locked buffer.
  • Write lock released.
  • Once the read locks on the current buffer have been released the buffers are swapped.
  • If screen capture isn't required loop to beginning.
  • Read lock obtained on current buffer.
  • Bitmap written to disk.
  • Read lock released.
  • Loop back to the beginning.

The main code to accomplish this task is ScreenPipe, UpdateHandler, BitmapScreen and DIBitmap.

The Code

Documentation for all the Windows based code is available here, courtesy of the Doxygen documentation system.

next


Copyright © 2002 James Brown
Last Updated Fri, 3/5/02