IOCTL_GPS_READ_ASSISTED (Compact 2013)

3/26/2014

This I/O control message returns data used by the GPS hardware to more quickly obtain a GPS fix. For example, GPS hardware in a mobile phone may have the ability to more quickly obtain a GPS fix using information about the current mobile phone tower(s) used by a mobile phone. Applications can read this data from the GPS hardware using this I/O control. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,           // handle to device
    DWORD dwIoControlCode,    // use IOCTL_GPS_READ_ASSISTED
    LPVOID lpInBuffer,        // pointer to input buffer
    DWORD nInBufferSize,      // input buffer size
    LPVOID lpOutBuffer,       // pointer to output buffer
    DWORD nOutBufferSize,     // output buffer size
    LPDWORD lpBytesReturned,  // number of bytes returned
    OVERLAPPED lpOverlapped   // pointer to OVERLAPPED structure
);

Parameters

  • hDevice
  • dwIoControlCode
    [in] Control code for the operation. Use IOCTL_GPS_READ_ASSISTED for this operation.
  • lpInBuffer
  • nInBufferSize
  • lpOutBuffer
    [in][out] Pointer that can hold data.
  • nOutBufferSize
  • lpBytesReturned
  • lpOverlapped

Return Values

GPS hardware manufacturers may return TRUE if the hardware device driver was able to provide this data, and FALSE otherwise. However, this is not required and applications should not rely on the return value obtained when using this I/O control.

Remarks

An application using the GPS Intermediate Driver can save the data retrieved by calling this I/O control, for example on shutdown, and then provide the results to the GPS hardware at startup, by calling IOCTL_GPS_WRITE_ASSISTED. This data may provide enough information to the GPS hardware to enable the hardware to obtain a GPS fix more quickly than it would without additional data.

Note

Almanac data that can be used to enable faster GPS fixes should be retrieved using IOCTL_GPS_READ_ALMANAC.

It is important to note that this data is only meaningful to the GPS hardware. The data is completely opaque to an application using the GPS Intermediate Driver. The degree to which applications can interact with this information is limited to saving the results of IOCTL_GPS_READ_ASSISTED and then providing the saved results to the GPS hardware using IOCTL_GPS_WRITE_ASSISTED.

Requirements

Header

gpsdev.h

See Also

Reference

GPS Intermediate Driver IOCTLs
DeviceIoControl
IOCTL_GPS_READ_ALMANAC
IOCTL_GPS_WRITE_ASSISTED