Compartilhar via


TSPI_phoneClose (Windows CE 5.0)

Send Feedback

This function closes the specified open phone device after completing or aborting all outstanding asynchronous operations on the device.

long TSPIAPI TSPI_phoneClose(HDRVPHONEhdPhone );

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 Values

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_phoneClose in "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

OS Versions: Windows CE 3.0 and later.
Header: Tapicomn.h.
Link Library: Coredll.lib.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.