ITAgentHandler::CreateAgentWithID method (tapi3.h)

The CreateAgentWithID method 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.

Syntax

HRESULT CreateAgentWithID(
  [in]  BSTR    pID,
  [in]  BSTR    pPIN,
  [out] ITAgent **ppAgent
);

Parameters

[in] pID

Pointer to BSTR containing the agent identifier.

[in] pPIN

Pointer to BSTR containing the agent PIN.

[out] ppAgent

Pointer to ITAgent interface.

Return value

This method can return one of these 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 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.

TAPI calls the AddRef method on the ITAgent interface returned by ITAgentHandler::CreateAgentWithID. The application must call Release on the ITAgent interface to free resources associated with it.

Requirements

Requirement Value
Target Platform Windows
Header tapi3.h (include Tapi3.h)
Library Uuid.lib
DLL Tapi3.dll

See also

CreateAgent

ITAgent

ITAgentHandler