This method closes a Positioning and Navigation device.
HRESULT CloseDevice( hPNDevice hPN, );
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_MEMFREE | The memory or resource cannot be freed. |
If this method is not called upon exiting, position and navigation API (PNAPI) resources are not deleted.
This method must wait for pending calls to finish before stopping calls to a Positioning and Navigation device. It may pause briefly before returning.