3.1.7.4 TSPI_phoneGetData

Syntax

LONG TSPI_phoneGetData(dwRequestID, hdPhone, dwDataID, lpData, dwSize)
This function uploads the information from the specified location in the open phone device to the specified buffer.

Parameters

DRV_REQUESTID dwRequestID
Specifies the identifier of the asynchronous request. The Service Provider returns this value if the function completes asynchronously.

HDRVPHONE hdPhone
Specifies the Service Provider's opaque handle to the phone to be queried.

DWORD dwDataID
Specifies where in the phone device the buffer is to be uploaded from.

LPVOID lpData
Specifies a far pointer to the memory buffer where the data is to be uploaded to.

DWORD dwSize
Specifies the size of the data buffer in bytes.

Return Value

Returns zero if the function is successful, the (positive) dwRequestID value if the function will be completed asynchronously, or a negative error number if an error has occurred. Possible error returns are:

PHONEERR_INVALPHONEHANDLE
The specified device handle is invalid.

PHONEERR_INVALPOINTER
The specified pointer parameter is invalid.

PHONEERR_INVALPHONESTATE
The phone device is not in a valid state for the requested operation.

PHONEERR_INVALDATAID
The specified data ID is invalid.

PHONEERR_OPERATIONUNAVAIL
The specified operation is not available.

PHONEERR_OPERATIONFAILED
The specified operation failed for unspecified reasons.

Comments

The function uploads a maximum of dwSize bytes from the phone device into lpData. If dwSize is zero, nothing is copied. The size of each data area is listed in the phone's device capabilities.

See Also

Functions: TSPI_phoneGetDevCaps, TSPI_phoneSetData
Data Types: PHONECAPS