locked
How to know contacts had been changed? RRS feed

  • Question

  • when contacts changed, we can get WM_DBNOTIFICATION.  But when I connect an outgoing call  or send sms later in contact edit window,that also can receive the WM_DBNOTIFICATION notification.

    I also try to use the way like sample: \PocketPC\CPP\win32\CalendarView.   The situation is the same.

    • Edited by Jone0592 Wednesday, June 2, 2010 2:26 AM
    Tuesday, June 1, 2010 7:51 AM

Answers

All replies

  • Hello,

     

    Try out this:-

     

     

     

           HRESULT 	     hr				= 0;
    IFolder *pFolder = NULL;
    IItem *pItem = NULL;
    CEPROPVAL propval = {0};
    IPOutlookApp2* g_polApp ; // POOM OBject
    if (SUCCEEDED(CoCreateInstance(CLSID_Application, NULL, CLSCTX_INPROC_SERVER, IID_IPOutlookApp, reinterpret_cast<DV_VOID **>(&g_polApp)))) { bSuccess = SUCCEEDED(g_polApp->Logon((long)hWnd)); } hr = g_polApp->GetDefaultFolder(olFolderContacts, &pFolder); // Get the IItem interface for the IFolder. hr = pFolder->QueryInterface(IID_IItem, (LPVOID*)&pItem); // Set the props on the folder. propval.propid = PIMPR_FOLDERNOTIFICATIONS; propval.val.ulVal = PIMFOLDERNOTIFICATION_ALL; hr = pItem->SetProps(0, 1, &propval);

    Thanks

    Arpit Pradhan

     


    WinCE CODER (If you think my solution help you in some sense do mark my Reply as Answer)
    Tuesday, June 1, 2010 11:48 AM
  • I had tried it. The situation is the same.

    when I out call or send sms later in contact edit window,that also can receive the  PIM_ITEM_CHANGED_LOCALnotification.

    case PIM_ITEM_CREATED_LOCAL:
           
    case PIM_ITEM_DELETED_LOCAL:
           
    case PIM_ITEM_CHANGED_LOCAL:
           
    case PIM_ITEM_CREATED_REMOTE:
    case PIM_ITEM_DELETED_REMOTE:
           
    case PIM_ITEM_CHANGED_REMOTE:

    Wednesday, June 2, 2010 1:08 AM
  • Nobody????????????????????
    Thursday, June 3, 2010 1:17 AM
  • Hi ahao266,

    I can reprodue the issue and I have reported it on MS Connect Website:

    https://connect.microsoft.com/VisualStudio/feedback/details/565419/get-pim-item-changed-remote-or-wm-dbnotification-message-while-connecting-an-outgoing-call-or-sending-sms-later-in-contact-edit-window#details

     

    You can check it to get answer there. I will also check it and notify you in this thead if I get answer there.

     

    Best regards,
    Guang-Ming Bian - MSFT


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, June 7, 2010 7:30 AM
  • ok,Thank very much.
    Monday, June 7, 2010 7:37 AM
  • Nobody to fix the problem,  how can i do?
    Monday, July 5, 2010 1:51 AM