ITAgent::CreateSessionWithPIN 方法 (tapi3cc.h)
CreateSessionWithPIN 方法會為輸入 ACD 群組和位址建立新的代理程式會話,並使用個人標識碼 (PIN) 。
語法
HRESULT CreateSessionWithPIN(
[in] ITACDGroup *pACDGroup,
[in] ITAddress *pAddress,
[in] BSTR pPIN,
[out] ITAgentSession **ppAgentSession
);
參數
[in] pACDGroup
ITACDGroup 介面的指標。
[in] pAddress
可用於接收 ACD 呼叫之物件的 ITAddress 介面指標。
[in] pPIN
代理程式 PIN 的 BSTR 表示法指標。
[out] ppAgentSession
已建立會話的指標。
傳回值
這個方法可以傳回其中一個值。
值 | 意義 |
---|---|
|
方法成功。 |
|
CreateAgentWithID 未建立的代理程式。 |
|
作業失敗,因為 TAPI 3 DLL 已逾時。逾時間隔為兩分鐘。 |
|
pPIN 為 NULL。 |
|
pPIN 或ppAgentSession 參數不是有效的指標。 |
|
記憶體不足,無法執行作業。 |
備註
應用程式必須使用 SysAllocString 為 pPIN 配置記憶體,並使用 SysFreeString 在不再需要變數時釋放記憶體。
TAPI 會在 ITAgent::CreateSessionWithPIN 所傳回的 ITAgentSession 介面上呼叫 AddRef 方法。 應用程式必須在 ITAgentSession 介面上呼叫 Release,以釋放與其相關聯的資源。
規格需求
需求 | 值 |
---|---|
目標平台 | Windows |
標頭 | tapi3cc.h (包含Tapi3.h) |
程式庫 | Uuid.lib |
Dll | Tapi3.dll |