IPosNav::StartCall

This method starts a call to get data from the Positioning and Navigation device.

Syntax

HRESULT StartCall ( hPNDevice hPN, PNData_t Call, DWORD dwPeriod );

Parameters

hPN
Handle to the Positioning and Navigation device to use.
Call
Type of data to retrieve from Positioning and Navigation device. All PNData_t calls valid for the GetData function can be used for Call.
dwPeriod
Specifies, in milliseconds, the time period between updates of data. If dwPeriod equals 0, only one call is made, and you do not need to stop the call with IPosNav::StopCall. If dwPeriod equals 1, the call can be made as rapidly as the device permits. If dwPeriod equals any other value, the StartCall method interprets that value as a period of time.

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_DATAUNAVAILABLE The data is unavailable.
PNAPI_S_CALLALREADYSTARTED A warning that indicates a call was already started.
PNAPI_S_PERIODTOOSMALL A Positioning and Navigation device is unable to support a call period at the requested speed.

Remarks

This method instructs the device to update its associated data structures at specified intervals. Through the GetData method, a user can obtain current data from the Positioning and Navigation device’s data structures within the position and navigation API (PNAPI) as often as needed.

See Also

IPosNav::GetData, IPosNav::StopCall