phoneGetStatusW function (tapi.h)
The phoneGetStatus function enables an application to query the specified open phone device for its overall status.
Syntax
LONG phoneGetStatusW(
HPHONE hPhone,
LPPHONESTATUS lpPhoneStatus
);
Parameters
hPhone
Handle to the open phone device to be queried.
lpPhoneStatus
Pointer to a variably sized data structure of type PHONESTATUS, which is loaded with the returned information about the phone's status.
Return value
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.
Note
The tapi.h header defines phoneGetStatus as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | tapi.h |
Library | Tapi32.lib |
DLL | Tapi32.dll |
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for