Hello i use MAPI API in Visual studio 2010.

when i use some operation in my custom MAPI class and my some few operations completed after when end program execution(debug mode) then outlook close automatically.

create session flag as below

MAPI_EXTENDED | MAPI_USE_DEFAULT | MAPI_NEW_SESSION

how to stop close outlook automatically ?

有帮助吗?

解决方案

Outlook will close when either all references to OOM objects are released or when a user closes the last Outlook window 9even if there are still references to Outlook objects). There is nothing you can do about that. The only workaround is to avoid using OOM and/or avoid keeping MAPI/Outlook objects referenced for any prolonged periods of time.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top