Microsoft KB Archive/179116

= FIX: MAPIInitialize Fails with MAPI_E_INVALID_FLAGS =

Article ID: 179116

Article Last Modified on 8/18/2005

-

APPLIES TO


 * Microsoft Messaging Application Programming Interface

-



This article was previously published under Q179116



SYMPTOMS
After initializing COM with CoInitializeEx as a multi-threaded application, MAPIInitialize fails with error 0x80010106, MAPI_E_INVALID_FLAGS.



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft Exchange version 5.5, Service Pack 1.



Steps to Reproduce Behavior
  Create a Visual C++ program with the following code: HRESULT hRes = CoInitialzeEx ( NULL, COINIT_MULTITHREADED ); hRes = MAPIInitialize ( NULL );  Set a break point on the second line of the code sample in step 1. Run the program on a computer with Exchange version 5.5 without a Service Pack or an earlier version and evaluate hRes after the MAPIInitalize call to see that it is 80010106 or MAPI_E_INVALID_FLAGS.

