3.1.7.1 TSPI_phoneClose

Syntax

void TSPI_phoneClose(hdPhone)
This function closes the specified open phone device after completing or aborting all outstanding asynchronous operations on the device.

Parameters

HDRVPHONE hdPhone
Specifies the Service Provider's opaque handle to the phone to be closed. After the phone has been successfully closed, this handle is no longer valid.

Return Value

None. This function is presumed to complete successfully and synchronously.

Comments

The Service Provider has the responsibility to (eventually) report completion for every operation it decides to execute asynchronously. 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 the TAPI DLL would wait 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" situtations.

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 non-sharable resources it reserves while the phone is open. For example, closing a phone accessed through a comm port and modem should result in closing the comm port, making it once available for use by other applications.

Comparison

This operation is strictly synchronous with presumed success in contrast to the phoneClose function defined at the TAPI level which allows for failure and asynchronous operation.

See Also

Messages: PHONE_CLOSE