The TSPI_phoneGetStatus function queries the specified open phone device for its overall status.
LONG TSPI_phoneGetStatus(
HDRVPHONE hdPhone,
LPPHONESTATUS lpPhoneStatus
);
Returns zero if the function succeeds, or an error number if an error occurs. Possible return values are as follows:
PHONEERR_INVALPHONEHANDLE, PHONEERR_OPERATIONFAILED, PHONEERR_NOMEM, PHONEERR_OPERATIONUNAVAIL, PHONEERR_RESOURCEUNAVAIL.
The following table indicates which members of the PHONESTATUS data structure are filled in by TAPI and which members are filled in by the service provider. The service provider must not overwrite the values filled in by TAPI.
Member | TAPI | Service Provider |
---|---|---|
dwTotalSize; | X | |
dwNeededSize; | X | |
dwUsedSize; | X | |
dwStatusFlags; | X | |
dwNumOwners; | X | |
dwNumMonitors; | X | |
dwRingMode; | X | |
dwRingVolume; | X | |
dwHandsetHookSwitchMode; | X | |
dwHandsetVolume; | X | |
dwHandsetGain; | X | |
dwSpeakerHookSwitchMode; | X | |
dwSpeakerVolume; | X | |
dwSpeakerGain; | X | |
dwHeadsetHookSwitchMode; | X | |
dwHeadsetVolume; | X | |
dwHeadsetGain; | X | |
dwDisplaySize; | X | |
dwDisplayOffset; | X | |
dwLampModesSize; | X | |
dwLampModesOffset; | X | |
dwOwnerNameSize; | X | |
dwOwnerNameOffset; | X | |
dwDevSpecificSize; | X | |
dwDevSpecificOffset; | X |
TAPI can use this function to determine the current state of an open phone device. The status information describes information about the phone device's hookswitch devices, ringer, volume, display, and lamps of the open phone.