Platform SDK: TAPI

phoneGetStatus

The phoneGetStatus function enables an application to query the specified open phone device for its overall status.

LONG WINAPI phoneGetStatus(
  HPHONE hPhone,               
  LPPHONESTATUS lpPhoneStatus  
);

Parameters

hPhone
A handle to the open phone device to be queried.
lpPhoneStatus
A pointer to a variably sized data structure of type PHONESTATUS, which is loaded with the returned information about the phone's status.

Return Values

Returns zero if the request succeeds or a negative error number if an error occurs. Possible return values are:

PHONEERR_INVALPHONEHANDLE, PHONEERR_NOMEM, PHONEERR_INVALPOINTER, PHONEERR_RESOURCEUNAVAIL, PHONEERR_OPERATIONFAILED, PHONEERR_STRUCTURETOOSMALL, PHONEERR_OPERATIONUNAVAIL, PHONEERR_UNINITIALIZED.

Remarks

An application 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.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later.
  Version: Requires TAPI 1.3 or later.
  Header: Declared in Tapi.h.
  Library: Use Tapi32.lib.
  Unicode: Implemented as Unicode and ANSI versions on all platforms.

See Also

TAPI 2.2 Reference Overview, Supplementary Phone Service Functions, PHONESTATUS