PRB: CDO Will Not Run in an NT Service with Outlook 97 Installed

ID: Q239785


The information in this article applies to:
  • Microsoft Outlook 97
  • Collaboration Data Objects (CDO), version 1.21


SYMPTOMS

A CDO application running as an Windows NT Service fails with the following error message during Logon if the computer has Microsoft Outlook 97 as the default mail client:

"Collaboration Data Objects - [MAPI_E_UNKNOWN_FLAGS(80040106)]"
NOTE: The application runs fine interactively.


CAUSE

As of Microsoft Exchange 5.5 SP2, CDO adds a MAPI_NO_COINIT flag to MAPIInitialize (a call made to MAPI subsystem during Logon) whenever CDO runs as a service application. Before the Microsoft 5.5 SP2 builds of MAPI, such as the one that comes with Microsoft Outlook 97, do not recognize this flag and return MAPI_E_UNKNOWN_FLAGS.

CDO does not ship with Outlook 97. It must be obtained and installed separately. See the REFERENCES section of this article.


RESOLUTION

Remove or rename the CDO.dll and upgrade to Outlook 98 or Outlook 2000.


MORE INFORMATION

Steps to Reproduce Behavior

  1. On a computer that only has Microsoft Outlook 97 installed, install CDO, which can be acquired from:
    Q171440 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:
    Q177851 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, please click the article number(s) below to view the article(s) in the Microsoft Knowledge Base:

Q171440 INFO: Where to Acquire the Collaboration Data Objects Libraries

Additional query words:

Keywords : kbCDO kbCDO121 kbMAPI kbMsg kbOutlook kbOutlook800 kbOutlook801 kbOutlook802 kbOutlook803 kbGrpMsg kbDSupport
Version : WINDOWS:1.21,97
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: September 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.