Refreshing GPS Intermediate Driver Configuration using IOCTL_SERVICE_REFRESH

Send Feedback

The GPS Intermediate Driver loads and runs when a device starts. If you change the configuration information in the registry, you must use the IOCTL_SERVICE_REFRESH IOCTL to notify the GPS Intermediate Driver so that it can update its internal state to reflect the new configuration information, as well as provide any necessary notifications to applications using the GPS Intermediate Driver.

Note   While the GPS Intermediate Driver runs on startup, this does not mean that GPS hardware is automatically turned on when a device starts. Instead, GPS hardware stays off until an application requests location information. For more information about power management with the GPS Intermediate Driver, see GPS Intermediate Driver Power Management.

To send an IOCTL_SERVICE_REFRESH message, use the instructions in Controlling GPS Intermediate Driver Execution.

When the GPS Intermediate Driver processes this IOCTL, it updates its internal state so that it uses the new configuration settings. It also, if necessary, invalidates any existing handles or connections to the GPS Intermediate Driver.

The specific notifications or changes the GPS Intermediate Driver makes depend on the items that have changed. For example, if the baud rate used to connect to the GPS hardware changes, the handles used by applications can stay the same, because the baud rate change is transparent to these applications. In contrast, if, say, the multiplexer interface has changed from GPD1 to COM4, the GPS Intermediate Driver must return errors when a device uses ReadFile with the old GPD1 handle. Applications should take this eventuality into account by re-reading the multiplexer connection information and re-opening a connection using the new multiplexer configuration data.

If an application provides a Windows CE event using the hDeviceStateChange parameter of the GPSOpenDevice call, then the GPS Intermediate Driver notifies an application of GPS hardware state changes by signaling the provided event.

See Also

Configuring the GPS Intermediate Driver

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.