Skip to Content
0
Apr 21, 2009 at 11:51 AM

Export to MAPI (email) from multi-threaded application

75 Views

We're using Crystal Reports XI Release 2 SP5 on Windows 2003 Server SP2 (x64).

We have a multi-threaded application that exports reports using MAPI destination (crEDTEMailMAPI) and Crystal format (crEFTCrystalReport) that is crashing / locking-up randomly every few days. Multiple threads are exporting reports concurrently and this appears to be the cause of the crashes / lock-ups.

Does the Crystal runtime call the MAPIInitialize() function with MAPI_MULTITHREAD_NOTIFICATIONS flag? MSDN says this is required for multi-threaded applications - see http://msdn.microsoft.com/en-gb/library/cc842343.aspx.

According to the following page there are rules that must be followed for multi-threaded applications that use MAPI:

http://blogs.msdn.com/stephen_griffin/archive/2004/09/24/mapi-multithreading-rules.aspx

Does the Crystal runtime follows these rules so that it can be used within a multi-threaded application?

Thanks

Andrew Scott