Microsoft KB Archive/239785

From BetaArchive Wiki

Article ID: 239785

Article Last Modified on 2/12/2007



APPLIES TO

  • Microsoft Outlook 97 Standard Edition
  • Microsoft Collaboration Data Objects 1.21
  • Microsoft Exchange Client 4.0
  • Microsoft Exchange Client 5.0



This article was previously published under Q239785

SYMPTOMS

A CDO 1.21 application running as a Windows NT service fails with the following error message during user logon if the computer has Microsoft Outlook 97 or any version of the Exchange client as the default mail client:

"Collaboration Data Objects - [MAPI_E_UNKNOWN_FLAGS(80040106)]"

NOTE: The application runs fine interactively.

CDO code that runs in an Active Server Pages (ASP) page under Internet Information Server (IIS) can also return the error MAPI_E_UNKNOWN_FLAGS because ASP pages effectively run as an NT service.

CAUSE

With Microsoft Exchange 5.5 SP2, CDO 1.21 adds a MAPI_NO_COINIT flag to MAPIInitialize (a call made to MAPI subsystem during user logon) whenever CDO 1.21 runs as a service application. Before the Microsoft Exchange 5.5 SP2 builds of MAPI, such as the one that comes with Microsoft Outlook 97, this flag was not recognized and returned the MAPI_E_UNKNOWN_FLAGS flag.

CDO 1.21 does not ship with Outlook 97 or the Exchange clients. It must be obtained and installed separately. See the "References" section of this article for more information.

RESOLUTION

Remove or rename the CDO.dll and upgrade to Outlook 98 or Outlook 2000, or install the MAPI subsystem that ships with Windows 2000. This last option is not suited for Windows 9x systems.

MORE INFORMATION

Steps to Reproduce Behavior

  1. On a computer that only has Microsoft Outlook 97 installed, install CDO, which can be acquired from:

    171440 INFO: Where to Acquire the Collaboration Data Objects Libraries.

  2. To create a VB project which runs as a service and logs on to a Mailbox using CDO folllow the instructions in the following article:

    177851 HOWTO: Build a VB/Messaging Application to Run from a Service

  3. Run your service.
  4. The following error will appear:

    "Collaboration Data Objects - [MAPI_E_UNKNOWN_FLAGS(80040106)]".


REFERENCES

For additional information about where to acquire the various versions of CDO (all versions), please click the article number(s) below to view the article(s) in the Microsoft Knowledge Base:

171440 INFO: Where to Acquire the Collaboration Data Objects Libraries


239853 MAPI_NO_COINIT Flag To Prevent MAPIInitialize From Calling CoInit



Additional query words: MAPI_E_UNKNOWN_FLAGS E_INVALID_FLAGS 0x80010106

Keywords: kbmsg kbnofix kbprb KB239785