Getting MAPI_E_NOT_ENOUGH_MEMORY, 0x8007000E when processing large PSTs through CPP+COM application

0

We are processing large PST file programmatically, making few changes in emails and then storing back into the PST. We are kind of doing it for each and every mail in PST. But after certain number of emails processing(around 13922-13924) we start getting MAPI_E_NOT_ENOUGH_MEMORY( 0x8007000E) error and we can not open PST objects/mails afterwards. We have to stop our exe and then rerun it. It then starts processing next remaining mails from PST and again starts giving same error after processing next batch of 13922 around mails. Our process's memory consumption goes max 130MB when we start getting error. There is enough RAM(12gb) and disc space(30gb+) available. Are we missing to release anything which could be related to MAPI which does not come under memory, handle or thread utilization? Also please help us to understand reason behind this type of errors and possible solution.

Thanks in advance.

c++
outlook
exchange-server
mapi
pst
asked on Stack Overflow Jan 29, 2021 by Omkar

1 Answer

1

That sure sounds like you are leaking MAPI object references. Hard to be more precise - try to comment out most of your code and bring it back a few lines/methods at a time until the problem comes back.


User contributions licensed under CC BY-SA 3.0