Refreshing GPS Intermediate Driver Configuration using IOCTL_SERVICE_REFRESH

Windows Mobile 6.5
A version of this page is also available for

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

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 can receive notification of the event using the GPSOpenDevice hDeviceStateChange parameter. They can process the notification by re-reading their connection information and re-opening a connection using the new configuration data.

Community Additions