I'm having trouble getting the 1.6.7 SDK working in .NET (C#). I've literally copied and pasted the sample code and am still having issues.
Specifically what is happening is that I get through everything just fine until signon. Here is the code in question from the sample:
try
{
// create control to allow invokes
CreateControl();
// create and init session
object o;
AccCreateSession(typeof(IAccSession).GUID, out o);
s = (AccSession)o;
// create our preference hook and then pass it
// to Open AIM
PrefsHook prefs = new PrefsHook();
s.PrefsHook = prefs;
// set up the listeners to AIM events. Visual Studio will help you with
// adding these functions by auto completing the functions.
s.OnStateChange += new DAccEvents_OnStateChangeEventHandler(s_OnStateChange);
s.OnUserChange += new DAccEvents_OnUserChangeEventHandler(s_OnUserChange);
s.OnSecondarySessionStateChange += new DAccEvents_OnSecondarySessionStateChangeEventHandler(s_OnSecondarySessionStateChange);
s.OnImReceived += new DAccEvents_OnImReceivedEventHandler(s_OnImReceived);
// we need to set up a listener for getting logged into the expressions web page
s.OnRequestServiceResult += new DAccEvents_OnRequestServiceResultEventHandler(s_OnRequestServiceResult);
// we need to set up a listener for getting a user's info
s.OnUserRequestPropertyResult += new DAccEvents_OnUserRequestPropertyResultEventHandler(s_OnUserRequestPropertyResult);
// here is where we put the name of our client and developer key.
// get your key at http://dev.aol.com/openaim
s.ClientInfo.set_Property(AccClientInfoProp.AccClientInfoProp_Description, "[MY DESCRIPTION] (key=[MY DEVELOPER KEY])");
// set the user name on the session
s.Identity = username;
// sign on to AIM
s.SignOn(password);
// start main loop
Application.Run();
}
catch (COMException e)
{
Console.WriteLine(e.Message);
}
Every time it fails on the "s.SignOn(password)" line. Here is the error:
Error Message: "Error HRESULT E_FAIL has been returned from a call to a COM component."
Source: Interop.AccCoreLib
Stack Trace:
"at AccCoreLib.IAccSession.SignOn(String password)\r\n at acshbuddy.AcshApp.Run(String username, String password) in D:\\Files\\VS2K5\\Projects\\OpenAIM\\TestAIMClient\\AcshBuddy.cs:line 103\r\n at acshbuddy.AcshApp.Main(String[] args) in D:\\Files\\VS2K5\\Projects\\OpenAIM\\TestAIMClient\\AcshBuddy.cs:line 61\r\n at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadHelper.ThreadStart()"
I'm not sure what else would be relevant, but any help would be appreciated. I've seen the error on VS 2005 and 2008, and on Vista 32-bit and 64-bit.
Thanks in advance.
Dennis

AOL address book on 9.0 Security isn't opening on 9.0 Optimized
I recently had to reinstall AOL 9.0 Optimized on my Laptop. I normally use AOL 9.0 Security on my Desktop.
Now I can't get any addresses with 9.0 Optimized when I am using my laptop.
Any ideas??