GPS Intermediate Driver Architecture

Send Feedback

The GPS Intermediate Driver works by injecting itself between applications and GPS hardware. To an application, the GPS Intermediate Driver appears like GPS hardware. To GPS hardware, the GPS Intermediate Driver appears like a single client - it requests GPS information. This abstraction layer provides multiple benefits to developers. For more information about these benefits, as well as a brief comparison between the model used by the GPS Intermediate Driver and a model where an application interacts directly with GPS hardware, see GPS Intermediate Driver Benefits.

The GPS Intermediate Driver is implemented as a normal Windows CE device driver. It is loaded into the device.exe process like all device drivers, even though it doesn't interact with device hardware directly. Instead, it uses another device driver - the one provided with or used by the GPS hardware - which then interacts with the actual hardware.

For example, suppose that, without the GPS Intermediate Driver, an application interacts with GPS hardware by calling CreateFile and passing "COM1:" as the first parameter. With the GPS Intermediate Driver, the application no longer connects directly to the GPS hardware. For the application to retrieve data using the GPS Intermediate Driver, it must first configure the GPS Intermediate Driver to connect to the GPS hardware using COM1. You can do this using the GPS Intermediate Driver Control Panel application (if present on your target device), or by manipulating the registry. For detailed information about configuring the GPS Intermediate Driver, see Configuring the GPS Intermediate Driver.

Once the GPS Intermediate Driver knows where to find the actual GPS hardware, applications can use the GPS hardware through either of two interfaces:

  • Parsed mode, using the GPS Intermediate Driver API. This interface enables developers to retrieve GPS data without calling CreateFile and ReadFile. Instead, they call GPSOpenDevice, GPSGetLocation, and GPSCloseDevice. For more information about this interface, see Accessing Parsed GPS Data.
  • Raw mode, using the Windows CE stream device driver interface (CreateFile/ReadFile/CloseHandle). The information provided by each ReadFile call is the data as it was retrieved from the GPS hardware. Applications are responsible for parsing the NMEA strings themselves. This interface provides backward compatibility by supporting applications that expect to interact with GPS hardware directly through a stream interface. For more information about this interface, see Accessing Raw GPS Data.

Internally, the GPS Intermediate Driver reads location data from the GPS hardware and provides it to application developers that call either GPSGetLocation or ReadFile. It tracks which data has been provided to each client, so that the act of one client obtaining location information does not mean that another client cannot obtain the same data. The fact that the GPS Intermediate Driver may be handling multiple connections is completely transparent to the applications using the GPS Intermediate Driver.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.