we have on the LastError a substructure (IDispatch) who contains N elements. Wihle the “(….)” describes a collection of elements.
But when you look on the collection of LastError, you will see one element with value ‘’ = empty/blank and the value = 1.
My question is now how theLastError structure is build by design…or pointer to related documentation
Thank you
Hp
Subject: Re: Structure of LastError & substructure (IDispatch) Replied by: David Lender on 23-06-2008 04:05:55 PM This is a CTIOS Cil question not a CTI Server protocol question.
Further information on this can be found in the CTIOS Developer's Guide. Last error is an Integer per the Session properties in table 8-1.
if you require further assistance you will need open a Service Request for Developer Serivices and provide detailed logs and code snippets.
Subject: Re: Structure of LastError & substructure (IDispatch) Replied by: Hanspeter Widmer on 24-06-2008 11:01:05 AM Hi Again,
Further information on this can be found in the CTIOS Developer's Guide. Last error is an Integer per the Session properties in table 8-1.
OK, here it is documentet as an integer!
Using your Exercice3.exe at the event:
You can Login now!
Requesting SetAgent
OnSetAgentMode Event received Arguments contains 73 Args ............................................
InternalCallsRcvdTimeToday:0 InternalCallsRcvdSession:0 ClientAgentTemporaryID:agent.1214304569 ClassIdentifier:1 IsSupervisor:0 LastError:1) <<<<<<<<<<< NOT INTEGER! ...........................................
the last error comes as LastError:1) as an OLE IDispatch in other words as an Array type. Also the first member has no Key name only the first element of the array is an Integer with value "1".
If it is only an Integer LasterError would like this LastError:1 what is different to the real OnSetAgentMode event.
I hope the difference is now clear enough ?
Hp
Edited by: Hanspeter Widmer on Jun 24, 2008 7:02 AM
Subject: Re: Structure of LastError & substructure (IDispatch) Replied by: David Lender on 24-06-2008 02:58:28 PM LastError is an arguments array with key ""
To obtain the value
private void m_session_OnSetAgentModeEvent(Cisco.CTIOSCLIENTLib.Arguments pIArguments) { LogEvent("OnSetAgentModeEvent", pIArguments); // Pack up the arguments and perform an agent login Cisco.CTIOSCLIENTLib.Arguments m_Args = new Cisco.CTIOSCLIENTLib.Arguments(); int nRetVal; Cisco.CTIOSCLIENTLib.Arguments m_LEArgs = new Cisco.CTIOSCLIENTLib.Arguments(); Cisco.CTIOSARGUMENTSLib.Arg m_LEArg = new Cisco.CTIOSARGUMENTSLib.Arg(); string s; int i; s = pIArguments.GetValueString("AgentID"); m_LEArg = pIArguments.GetValue("LastError"); i = m_LEArg.GetType; if ((i == Cisco.CTIOSARGUMENTSLib.enumArgTypes.ARG_ARGARRAY)) { m_LEArgs = m_LEArg.GetValueArray; } i = m_LEArgs.GetValueInt(""); Log(("Last Error is " + i.ToString)); m_Args.AddItem("Agentid", agentid.Text); m_Args.AddItem("AgentPassword", agentpw.Text); m_Args.AddItem("AgentInstrument", instrument.Text); m_Args.AddItem("PeripheralID", peripheralid.Text); // send login request nRetVal = m_Agent.Login(m_Args); Log(("Login returns(" + (Str(nRetVal) + ")"))); m_Args = null; m_LEArgs = null; }
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: