The phoneGetHookSwitch function returns the current hookswitch mode of the specified open phone device.
LONG phoneGetHookSwitch(
HPHONE hPhone,
LPDWORD lpdwHookSwitchDevs
);
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_INVALPHONESTATE, PHONEERR_OPERATIONFAILED, PHONEERR_OPERATIONUNAVAIL, PHONEERR_UNINITIALIZED.
After the hookswitch state of a device changes, and if hookswitch monitoring is enabled, the application is sent a PHONE_STATE message.
Version: Use TAPI version 1.4 and later.
Header: Declared in tapi.h.
Import Library: Link with tapi32.lib.
TAPI Reference Overview, Supplementary Phone Services Functions, PHONE_STATE, phoneGetStatus