This method gets various types of data from a Positioning and Navigation device.
HRESULT GetData ( hPNDevice hPN, LPVOID pBuffer, DWORD dwSize, PNData_t DataType );
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 |
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. |
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.