Mr Speaker

Getting a reference to cdoex.dll

monkey boy13 work-hours ago I needed to switch development machines, on which I had been developing a custom .net application for a remote Exchange server.

Reloading the project on the new machine broke references to the CDO for Exchange dll. I went to add it again, but this computer only had CDO for Windows (cdo.dll, or cdosys.dll) - no cdoex.dll. I embarked on a mission to find it...

...An OS upgrade, and what seems like an enternity on MSDN, later all I had turned up was:

CDOEX can only be run on a computer where Exchange has been installed.

and

Collaboration Data Objects for Exchange 2000 (CDOEX) is installed by Microsoft SharePoint Portal Server 2001 (SPS) server and client, and all versions of Microsoft Office XP

I really didn't want to install any of those things. Especially Exchange - that had more dependencies than my linux box. In the end (thank goodness there was an end), all I had to do was copy the dll file from the original computer and put it in the same place on the new computer:

c:\Program Files\Common Files\Microsoft Shared\CDO

The from the command prompt, navigate to that directory and register the dll with: regsvr32 cdoex.dll

Which, thankfully, did the trick. I believe that registering the codex.dll then replaces all the functions of cdosys.dll. So anything relying on codsys.dll may be affected. For instance, after I loaded Outlook it popped up a warning about the changed dll. However, as cdoex is a superset of cdosys everything still works. Your millage may vary. It may destroy your entire computer. I dunno.

Anyway, back to programming. Now all I have to do is to wait for the hair I pulled out of my head to regrow, and I'm back to where I started.

6 Comments

  1. I so hope this work, going to try it now…

    Saturday, May 14, 2005 at 9:01 am | Permalink
  2. Yep, worked. Thanks.

    Saturday, May 14, 2005 at 9:15 am | Permalink
  3. ahhh… interesting… i will give this a go now

    Wednesday, September 27, 2006 at 6:19 pm | Permalink
  4. will try this. I have had enough.

    Thursday, February 8, 2007 at 2:21 pm | Permalink
  5. Hi, this post is interesting, as it is the only one on the net I can find that hints at being able to use CDOEX on a client without Exchange for development.

    CDOEX documentation says it has to be used on the server :(

    Could you help me set this up? I am having problems (probably issues with adodb versions) running the sample code at http://support.microsoft.com/default.aspx?id=310200, with an interop error (invalid class string).

    Friday, June 1, 2007 at 6:49 pm | Permalink
  6. Actually, I believe another source of CDOEX.dll might be Office XP.

    Recently we updated Office XP to Office 2003 on our build server.

    After rebooting, we were no longer able to get email notifications when running nant. It would finish up and give us the following error.

    [mail] Sending mail to user@bogus.com;.
    [call] c:\program files\nant\Common\NAntHeader.build(78,6):
    [call] Error sending mail:
    [call] Error enountered while sending mail message.
    [call] Make sure that mailhost=mailhost.local.bogus.com is valid
    [call]
    [call] Retrieving the COM class factory for component with CLSID {CD000001-8B95-11D1-82DB-00C04FB1625D} failed due to the following error: 8007007e.

    Locating the CLSID in the registry it pointed to CDOEX.dll. The file and the containing folder were missing on the machine.

    I suspect that the file was removed with the OXP->O2003 upgrade. Fortunately I had OXP on another machine and it provided the %ProgramFiles%\Common Files\Microsoft Shared\CDO\cdoex.dll. I copied it as you suggested and I am now back in business. Thanks

    Thursday, July 3, 2008 at 10:42 pm | Permalink