Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. using MessengerAPI

using MessengerAPI

Scheduled Pinned Locked Moved Managed C++/CLI
c++csharpjsonhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asad Hussain
    wrote on last edited by
    #1

    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();
    }
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups