IPosNav::GetData

This method gets various types of data from a Positioning and Navigation device.

Syntax

HRESULT GetData ( hPNDevice hPN, LPVOID pBuffer, DWORD dwSize, PNData_t DataType );

Parameters

hPN
Handle to the Positioning and Navigation device to use
pBuffer
Pointer to the buffer that receives the data
dwSize
Specifies, in bytes, the size of pBuffer
DataType
Type of data to get from the Positioning and Navigation device. The following types of data can be requested.
Value
Description
Structure type
PN_DT_ACCURACY Accuracy data PNACCURACY
PN_DT_ALMANAC Almanac data PNALMANAC
PN_DT_CONFIG Configuration data PNCONFIG
PN_DT_DEVICE Device profile data PNDEVICE
PN_DT_DEVICESTATE Device state data PNDEVSTATE
PN_DT_POSITION Longitude, latitude, and altitude position data PNPOSITION
PN_DT_SETTINGS Settings data PNSETTINGS
PN_DT_STATION Station data PNSTATION
PN_DT_TIME Time data PNTIME
PN_DT_TM Time data PNTM
PN_DT_VELOCITY Velocity data PNVELOCITY

Return Values

One of the values described in the following table is returned.

Value
Description
S_OK Success
E_FAIL An unspecified error occurred.
E_INVALIDARG One or more arguments are invalid.
PNAPI_E_DEVICEUNAVAILABLE The Positioning and Navigation device is unavailable; it could be unplugged or dead.
PNAPI_E_NOCALLSTARTED No call has been started yet.
PNAPI_E_NODATAYET No data has been received from the Positioning and Navigation device yet.

Remarks

PNAPI enables various OEM-defined PNData_t enumerations to be passed through this method so that specific features can be made available. OEM vendors should provide details about how they have implemented their structures.

All data is received from the Positioning and Navigation device except PNCONFIG data, which is taken from the registry.

The almanac data is GPS-specific and provides system satellite position data.

See Also

IPosNav::SetData