Hi bholland,
After few weeks suffering I was able to full interface SalesForce with Aspect, including other features like retrieving information like email from SF and save them onto Aspect custom edit fields... but that took a lot of work as I really couldnt find a good (or even superficial but clear enough) documentation.
My code might not be suitable for others as I had to implement both SalesForce (uses ATL library) and Aspect (using the OCX) in a single one... anyway, the first step is to put the ocx into the dialog... then grab the events. (What would really be great is if we could send commands directly to Aspect through sockets without using an OCX or whatever... that would make be suitable for many kind of implementations.)
Assuming that you already done that (created a dialog experimental app and added the OCX control on it), the most important part is to implement the OnStateChange to grab the events that signals when something happens (Login, Logout, Incoming Calling,Wrapup, etc) You might also need to implement OnAgentLoggedIn event so you can load the reason codes for NotReady and LoggedOut (if you ever use them). As documentation were pretty superficial I implemented all events and put a call to a log on each one so I could follow what happens on every attempt..
If you are going to use ATL you might need to import the OCX like I did:
#import <CCProagent.ocx> named_guids
using namespace CCPROAgentCtl;
But if you are going to work directly with a dialog you can handle the events directly and with the help of wizard which reduces a lot of typing...
The following would be an example of how to perform a login issue:
CString m_UserID(_T("gkarlos")),
m_Password(_T("123@lab")),
m_Extension(_T("9187"));
//Login method uses bstr instead of string.
BSTR m_bstrUSER = m_UserID.AllocSysString(),
m_bstrPASS = m_Password.AllocSysString(),
m_bstrEXT = m_Extension.AllocSysString();
nReturn = m_AspectOCXCtrl.Login(&m_bstrUSER,&m_bstrPASS,&m_bstrEXT);
::SysFreeString(m_bstrUSER);
::SysFreeString(m_bstrPASS);
::SysFreeString(m_bstrEXT);
//nReturn fails if different from CCPROAgentCtl::ccpSuccess;
Remember that you must set Portal prior issuing a login command.
Not sure if this enlights you a bit or made you confused... let me know. Cant put the code here as I had to sign a NDA with client, so only small pieces of code wont bring me problems.