Platform SDK: TAPI

ITAgentHandler::CreateAgentWithID

Creates an Agent object based on an agent identifier. This identifier is a string identifying the agent on a legacy ACD system. If the system also requires a PIN or password for logging into groups, you use this method to set the PIN or password.

HRESULT CreateAgentWithID(
  BSTR pID,
  BSTR pPIN,
  ITAgent **ppAgent
);

Parameters

pID
[in] Pointer to BSTR containing the agent identifier.
pPIN
[in] Pointer to BSTR containing the agent PIN.
ppAgent
[out, retval] Pointer to ITAgent interface.

Return Values

Value Meaning
S_OK Method succeeded.
E_INVALIDARG The pPIN parameter is NULL.
E_POINTER The ppAgent parameter is not a valid pointer.
E_OUTOFMEMORY Insufficient memory exists to perform the operation.
TAPI_E_TIMEOUT The operation failed because the TAPI 3.0 DLL timed it out. The timeout interval is two minutes.

Remarks

The application must use SysAllocString to allocate memory for the pID and pPIN parameters, and use SysFreeString to free the memory when the variables are no longer needed.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Version: Requires TAPI 3.0 or later.
  Header: Declared in Tapi3.h.
  Library: Use T3iid.lib.

See Also

ITAgentHandler, CreateAgent