Login to post  Page: « < 1 of 1 > »
25 Aug 2009 - 01:544862
c# set_Identity error
Hey guys,
I'm trying to integrate an AIM client into my current existing application in C#.
I can get the sample to run perfectly fine once I hooked up the working directory to dist\release.
So I basically tried to merge just the sign in feature of the sample with my application.
I first did two things:
1. I placed the 9 .dll files into my working directory
2. I added the 8 references to my working directory and added them into my project references in Visual Studio (i.e. AccCoreLib.dll,...)

I complied and tried to run and I get this error:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

at AccCoreLib.IAccSession.set_Identity(String pIdentity)
at awshbuddy.SessionManager.SignOn(String userName, String password) in C:\Documents and Settings\\...\AIM\SessionManager.cs:line 746

So on the set_Identity command its failing. Now I know the SessionManager is not null, the AccSession is not null, these have been properly setup as shown in the examples. I am sending a valid username and password, I even hardcoded it in for the time being.

Once I couldn't fix this error, I literally inserted the entire sample into my program in hopes that it was a mistake on my part, but its still giving me the same error.

I've come to the conclusion that it has to be a configuration thing for Visual Studio (2008 Pro). Anyone have any ideas what this problem could be?
Thanks alot for your time.

- Aaron



Last edited by quubie (25 Aug 2009 - 01:56)
25 Aug 2009 - 08:094863
c# set_Identity error
I believe that the problem you are experiencing is because a Windows Form
Application uses a different message loop that COM. There is an article at
Microsoft that discusses this issue.

http://support.microsoft.com/kb/839076/

Also, note that the AccSession can only be accessed from within the Thread
that it is started in.

Thanks


25 Aug 2009 - 18:594865
thanks for your response.
I was sort of hoping for a simple solution without having to drastically alter my program. Unfortunately, I'm dealing with a very large program and its just not feasible for me to do any of those solutions. I'm not very familiar with COM client applications, and the AIM C# sample was not really what I was looking for originally. To your knowledge, is there any way to set up a POST/GET relationship with the AIM servers? I only want to perform 3 actions, not the entire client so any simple access to the AIM servers would be great.


26 Aug 2009 - 06:584866
c# set_Identity error
Sure, take a look at WIM: http://dev.aol.com/aim/web/serverapi_reference.
There are some basic WIM code samples at the bottom of this page also:
http://dev.aol.com/aim/code

Thanks


Login to post  Page: « < 1 of 1 > »