TSPI_phoneGetLamp function (tspi.h)

The TSPI_phoneGetLamp function returns the current lamp mode of the specified lamp.

Syntax

LONG TSPIAPI TSPI_phoneGetLamp(
  HDRVPHONE hdPhone,
  DWORD     dwButtonLampID,
  LPDWORD   lpdwLampMode
);

Parameters

hdPhone

The handle to the phone whose lamp mode is to be retrieved.

dwButtonLampID

The identifier of the lamp to be queried.

lpdwLampMode

A pointer to a memory location into which the service provider writes the lamp mode status of the given lamp. This parameter can have at most one of the PHONELAMPMODE_ constants.

Return value

Returns zero if the function succeeds, or an error number if an error occurs. Possible return values are as follows:

PHONEERR_INVALBUTTONLAMPID, PHONEERR_RESOURCEUNAVAIL, PHONEERR_INVALPHONEHANDLE, PHONEERR_OPERATIONFAILED, PHONEERR_INVALPHONESTATE, PHONEERR_OPERATIONUNAVAIL, PHONEERR_NOMEM.

Remarks

Phone sets that have multiple lamps per button should be modeled using multiple button/lamps pairs. Each additional button/lamp pair should use a DUMMY button.

Requirements

Requirement Value
Target Platform Windows
Header tspi.h

See also

PHONECAPS

PHONELAMPMODE_ Constants

TSPI_phoneGetDevCaps

TSPI_phoneSetLamp