Cannot Uninitialize Advise sink

0

I'm trying to properly close my MAPI session and I noticed it could not be closed properly. I tried moving my MAPIUnintialize() function where the problem occurs and I noticed that my lpMAPISession->Unadvise() function fails with error 0x8004010f. Even when I tried unadvising right after my lpMDB-> Advise() instance.
This is my function:

hRes = HrGetOneProp(lpFolder, PR_ENTRYID, &prop);  
hRes = lpMDB-> Advise(prop->Value.bin.cb, (LPENTRYID)prop->Value.bin.lpb,fnevObjecCreated,
 *lpAdviseSink, &ulConnection);  
...  
...  

lpAdviseSink ->Release();  
lpMAPISession -> UnAdvise(ulConnection);  
c++
exchangewebservices
mapi
asked on Stack Overflow Dec 3, 2020 by Roee Ziv

1 Answer

0

You are calling UnAdvise on IMAPISession. But your advise sink is on IMsgSTore object.


User contributions licensed under CC BY-SA 3.0