MAPI application crashes when new Hotmail message received.

  • Thread starter Thread starter Mike LeDuc
  • Start date Start date
M

Mike LeDuc

I have written an application that monitors MAPI notifications using
Advise and UnAdvise on the IMsgStore interface provided by MAPI. This
thing works great, except when receiving new emails in Outlook 2002
from a Hotmail account. Then it crashes on a call to HrGetOneProp.

It appears that this problem is related to the actual body of the
email not being brought down until you click on the email to view it.
Here is the actual call that I am making to HrGetOneProp:

hr = HrGetOneProp(lpMAPIProp, PR_MESSAGE_CLASS, &lpsPropValue);

I have verified that lpMAPIProp interface is good and supports at a
minimum the IMAPIProp interface.

Like I said earlier, this exact code has no problems on a regular
email received from an SMTP server.

I am looking for any help that anyone can provide me on this, as I
have an impending deadline for my project, and I have already spent a
lot of time trying to track this down.

Thanks,
Mike LeDuc
 
Mike LeDuc said:
I have written an application that monitors MAPI notifications using
Advise and UnAdvise on the IMsgStore interface provided by MAPI. This
thing works great, except when receiving new emails in Outlook 2002
from a Hotmail account. Then it crashes on a call to HrGetOneProp.

is it crashing inside HrGetOneProp() ?

also have you tried changing HrGetOneProp() call to lpMAPIProp->GetProps()
and see if it is crashing still ?

what is the crash address and instruction ?
 
abc5594def said:
is it crashing inside HrGetOneProp() ?

also have you tried changing HrGetOneProp() call to lpMAPIProp->GetProps()
and see if it is crashing still ?

what is the crash address and instruction ?

Yes, I have tried using lpMAPIProp->GetProps(), and it also crashes.
It appears to crash in HrGetOneProp itself. I do not get a real crash
address when this crash occurs. I get the infamous WinXP GPF dialog.
From the dump information provided, I am able to determine that it is
an Access Violation that is occuring, and it looks like it is telling
me the AV is occuring at a NULL address. I have verified that I am NOT
passing in any NULL parameters, so I don't know where to go from here.

Thanks,
Mike
 
are you able to retrieve any other property from lpMAPIProp or call any
other method on the lpMAPIProp before the call to GetProps() ?

have you released lpMAPIProp already did not make it null elsewhere ?

how did you get this lpMAPIProp ? did you copy the pointer without
addreffing it ?

it is hard to help unless you post some code or give more details.
 
Back
Top