Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function closes the specified open phone device after completing or aborting all outstanding asynchronous operations on the device.
Syntax
long TSPIAPI TSPI_phoneClose( HDRVPHONE hdPhone ); |
Parameters
- hdPhone
-
Service provider's opaque handle to the phone to be closed. After the phone is successfully closed, this handle is no longer valid.
Return Value
Returns zero if the function succeeds, or an error number if an error occurs. The following table shows the return values for this method.
Value | Description |
---|---|
PHONEERR_INVALPHONEHANDLE |
The handle to the phone is invalid. |
PHONEERR_OPERATIONFAILED |
The operation failed. |
PHONEERR_NOMEM |
Not enough memory is available. |
PHONEERR_OPERATIONUNAVAIL |
The operation is unavailable. |
PHONEERR_RESOURCEUNAVAIL |
The resource is unavailable. |
Remarks
The service provider must report completion for every asynchronous operation. If this procedure is called for a phone on which there are outstanding asynchronous operations, the operations should be reported complete with an appropriate result or error code before this procedure returns. Generally, TAPI waits for these to complete in an orderly fashion. However, the service provider should be prepared to handle an early call to TSPI_phoneClosein "abort" or "emergency shutdown" situations.
After this procedure returns the service provider must report no further events on the phone. The service provider's opaque handle for the phone becomes invalid.
The service provider must relinquish nonsharable resources it reserves while the phone is open. For example, closing a phone accessed through a COM port and modem should result in closing the COM port, making it available for use by other applications.
This function should always succeed except in extraordinary circumstances. Most callers will probably ignore the return code because they will be unable to compensate for any error that occurs. The specified return values are more advisory for development diagnostic purposes than anything else.
Requirements
Header | tapicomn.h |
Library | coredll.lib |
Windows Embedded CE | Windows CE 3.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |