using MessengerAPI
Managed C++/CLI
1
Posts
1
Posters
0
Views
1
Watching
-
I want to be able to get buddy lists from MSN Messenger. I wrote a little bit of code in C# that does that but I need to rewrite this in C++. I made a new new MFC dll project ( its supposed to be that way ) and added a reference to MessengerAPI. I cant seem to access the API in the same was as the C# code. I am completely new to C++ so any help will be appreciated.
public ArrayList GetBuddyList() { MessengerAPI.Messenger msgr = new Messenger(); IMessengerContacts contacts; ArrayList retlist = new ArrayList(); int i, j; i = 1; j = 1; msgr.AutoSignin(); groups = msgr.MyGroups; foreach (IMessengerGroup group in groups) { contacts = group.Contacts; foreach (IMessengerContact contact in contacts) { if ( contact.Status == 2 ) { ContactItem item = new ContactItem( contact.SigninName, contact.FriendlyName ); retlist.Add( item ); } } } msgr.Signout(); }