Platform SDK: TAPI

lineSetAgentSessionState

The lineSetAgentSessionState function sets the agent session state associated with a particular agent session handle. It generates a LINE_PROXYREQUEST message to be sent to a registered proxy function handler, referencing a LINEPROXYREQUEST structure of type LINEPROXYREQUEST_SETAGENTSESSIONSTATE.

LONG lineSetAgentSessionState( 
  HLINE hLine,                 
  HAGENTSESSION hAgentSession, 
  DWORD dwAgentSessionState,        
  DWORD dwNextAgentSessionState     
);

Parameters

hLine
A handle to the line device.
hAgentSession
The identifier of the agent session whose information is to be changed.
dwAgentSessionState
The new agent session state. Must be one of the LINEAGENTSESSIONSTATE_ constants or zero to leave the agent session state unchanged and modify only the next state.
dwNextAgentSessionState
The next agent session state. Must be one of the LINEAGENTSESSIONSTATE_ constants or zero.

Return Values

Returns a request identifier if the asynchronous operation starts; otherwise, the function returns one of the following error values:

LINEERR_INVALAGENTSTATE
LINEERR_INVALLINEHANDLE
LINEERR_INVALPARAM
LINEERR_NOMEM
LINEERR_OPERATIONFAILED
LINEERR_OPERATIONUNAVAIL
LINEERR_RESOURCEUNAVAIL
LINEERR_UNINITIALIZED

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Version: Requires TAPI 2.2 or later.
  Header: Declared in Tapi.h.
  Library: Use Tapi32.lib.

See Also

About TAPI 3.0 Call Center Controls, LINEAGENTSESSIONSTATE_ constants, LINEPROXYREQUEST, LINE_PROXYREQUEST