I register a window class and create a window for this purpose. I also set notification properties of the contacts folder as described in POOM documentation. All calls returns successfully. WM_CREATE and WM_DESTROY messages are sent to my window proc. But I do not receive any notification messages when contacts are changed, added or deleted from the contacts folder. Does anybody can give me some advises on this issue.
Fragments of my code are:
- Code: Select all
WNDCLASS wndClass;
ZeroMemory(&wndClass, sizeof(wndClass));
wndClass.lpfnWndProc = m_fnNotifyWindowProc;
wndClass.lpszClassName = L"PhoneBookNotifyWindowClass";
wndClass.hInstance = g_hInstance;
ATOM aResult = RegisterClass(&wndClass);
m_hNotifyWnd = CreateWindow(L"PhoneBookNotifyWindowClass", L"PhoneBookNotifyWindow", 0, 0, 0, 0, 0, NULL, NULL, wndClass.hInstance, 0);
- Code: Select all
hResult = m_spContactsFolder->QueryInterface(IID_IItem, (LPVOID*)&m_spItem);
// Set the folder's properties.
CEPROPVAL propval = {0};
propval.propid = PIMPR_FOLDERNOTIFICATIONS;
propval.val.ulVal = PIMFOLDERNOTIFICATION_REMOTE;
hResult = m_spItem->SetProps(0, 1, &propval);
Testing for errors was removed to improve readability.
g_hInstance is valid.
I have already tried PIMFOLDERNOTIFICATION_LOCAL and PIMFOLDERNOTIFICATION_ALL flags. Everything's in vain. Notifications aren't sent even for inproc contacts changes.
Any help on the topic will be appreciated. Thanks in advance
