IPosNav::OpenDevice

This method opens a Positioning and Navigation device for communication.

Syntax

HRESULT OpenDevice ( phPNDevice phPN, pPNDEVICE pDevice );

Parameters

phPN
Pointer to a Positioning and Navigation device handle. The phPNDevice type is declared as LPVOID. If successful, a valid Positioning and Navigation handle is returned.
pDevice
Pointer to the PNDEVICE structure for the device to be opened. This structure is returned by FindDevices.

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.
E_OUTOFMEMORY The position and navigation API (PNAPI) has run out of memory.
REGDB_E_READREGDB A registry key could not be read.
PNAPI_E_REGDBCLOSEKEY A registry key could not be closed.
PNAPI_E_LOADDLL DLL could not be loaded.
PNAPI_E_DEVICEUNAVAILABLE The Positioning and Navigation device is unavailable; it could be unplugged or dead.

See Also

IPosNav::FindDevices, IPosNav::CloseDevice