Using the CDO Session Object

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Whether you build CDO applications by using ASP or by using some other development tool, the most important point to remember is you cannot create any other objects in the CDO library if you do not create a Session object successfully. In addition, you cannot access any data in Exchange Server unless you successfully log on to the server using the Session object.

The Session object is the top-level object in the CDO hierarchy. It contains session-wide settings and properties that return top-level objects. When using the CreateObject method in your applications, you use the ProgID of the Session object — Messaging Application Programming Interface (MAPI) Session — to create a CDO object. CDO does not make it possible for you to access any other objects in the library until you have logged on successfully using the Logon method of the Session object. The only exception to this is the SetLocaleIDs method, which sets the Locale and CodePage IDs for the user.

For additional information about the CDO Session Object, refer to http://msdn.microsoft.com/en-us/library/ms527464(EXCHG.10).aspx in the Microsoft® Developer Network (MSDN™) Library.

See Also

CDO Library | Overview of CDO | Using the Logon Method