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. C / C++ / MFC
  4. trying to find the status of contacts from Office Communicator

trying to find the status of contacts from Office Communicator

Scheduled Pinned Locked Moved C / C++ / MFC
help
1 Posts 1 Posters 1 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.
  • T Offline
    T Offline
    tasumisra
    wrote on last edited by
    #1

    Hi Guys, I am trying to find status of may contacts but not able to find appropriate function here is the sample for that

    #include #include #include "c:\program files\Microsoft Office Communicator\SDK\msgrua.h"

    const GUID IID_IMessenger =
    {0xD50C3186,0x0F89,0x48f8,{0xB2,0x04,0x36,0x04,0x62,0x9D,0xEE,0x10}};

    const GUID CLSID_Messenger =
    {0x8885370D,0xB33E,0x44b7,{0x87,0x5D,0x28,0xE4,0x03,0xCF,0x92,0x70}};

    const GUID IID_MessengerContacts =
    {0xE7479A0F,0xBB19,0x44a5,{0x96,0x8F,0x6F,0x41,0xD9,0x3E,0xE0,0xBC}};

    IMessenger* m_pIMessenger;
    int _tmain(int argc, _TCHAR* argv[])
    {
    CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
    HRESULT hr = CoCreateInstance(CLSID_Messenger,NULL,CLSCTX_LOCAL_SERVER,
    IID_IMessenger, (LPVOID *)&m_pIMessenger);

    BSTR myName;
    MISTATUS sMyStatus;
    
    hr = m\_pIMessenger->get\_MyFriendlyName(&myName);
    hr = m\_pIMessenger->get\_MyStatus(&sMyStatus);
    
    BSTR serviceId;
    m\_pIMessenger->get\_MyServiceId(&serviceId);
    
    IDispatch \*pContacts;
    IMessengerContacts \*pCon;
    
    m\_pIMessenger->get\_MyContacts(&pContacts);
    pContacts->QueryInterface(\_\_uuidof(IMessengerContacts),(void\*\*)&pCon);
    
    IDispatch \*pDispatch;
    
    hr=pCon->Item(1,&pDispatch);
    long lCount=0;
    pCon->get\_Count(&lCount);
    
        //here lCount is total number of contacts 
        //now i am not getting appropriate method to iterate through
    CoUninitialize();
    
    return 0;
    

    }

    Please help me in finding appropriate function to get information about each contact.

    vikas da

    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