D.A.M.E. Source Code

Since Microsoft Press has allowed D.A.M.E. to fall out of print, I am releasing all of the book's source code (to which I providently retained all rights) for the world's free perusal.

Caveats

I offer these source code samples completely without warranty or support. If you can't figure out how to build, run, or modify them, I don't want to hear about it. Go chase down a remaindered copy of D.A.M.E. and stare at Appendix A for a while.

Many of these examples will make little or no sense without the accompanying text. Unfortunately, I don't have the rights to release the book's text here.

Remember that these are tutorial examples. I expect you to have better sense than to release production code with this kind of sloppy exception handling (e.g. ASSERT(SUCCEEDED(hr))).

(Time out for a war story. It is an ancyent Developere, / And he stoppeth one of three: If you page back through Deja News, you will see a rash of reports where nontechnical users reported upgrading to Outlook 97 or 98 and seeing Outlook halt with an ASSERT(FALSE) message; those all stemmed from a single ancient version of inetxidm, released in 1995, which tested for a supposedly impossible condition in just such an unprofessional fashion. Had I known that inetxidm would replicate so widely and quickly, I never would have released it in such an incomplete state.)

I wrote these examples in 1995 and 1996 for the old Exchange 4.0 client (a.k.a. "Windows Messaging"). Some of them will work unmodified on the Outlook 97 or 98 clients, while others won't. You may wish to review the pertinent sections of my MAPI development FAQ while puzzling out why a particular sample isn't doing what you hoped.

Unlike samples copied from the CD-ROM accompanying D.A.M.E., the texts of these samples have never seen the enlightened hand of an editor, having been copied directly from my private archives. They may very well contain violent or offensive language (or so my editor once indicated to me). On the other hand, they are more likely to compile correctly than code edited for political correctness. If you will be offended by a /* Kill 'em all */ comment, please go away.

Finally, all of these sources released herein remain Copyright 1998 Ben Goetter, all rights reserved. You are forbidden to sell these sources to others, or in any other way to claim them as your own work. I here grant you license to read, copy, or make your own derivative works from them, all without further fee, royalty, or acknowledgement. Have fun with them.

Contents

msess | mfetch | mlogon | eeminim | eestub | eetrans | mtwb | rtfguard | inetxidm | frminf | poststub | sendstub | catform | msgopen | fwdasatt | vwinst

Chapter 2

Msess is a standalone MAPI application that either creates a shareable session using the specified profile or inherits the shareable session if that session has already been created. The application runs until the user closes its window or until another application signals to end the shared session. When the application ends, it signals that any other application using the shared session must end as well.

Mfetch (also known as MAPI Download) is a standalone MAPI application that logs onto a specified profile to download pending messages from any transport providers named in that profile. This is version 0.1.6, whereas D.A.M.E. contained version 0.1.4.

Mlogon (also known as MAPI Logon) is a standalone MAPI application that creates a shareable session using the specified profile and then launches the Exchange client. (This application is specific to the Exchange client.) This is version 0.2.5, whereas D.A.M.E. contained version 0.2.3.

Chapter 4

Eeminim is the simplest possible Exchange client extension, one that does nothing more than let itself be loaded by Exchange.

Eestub is an Exchange client extension equivalent to the inetxidm sample, but pruned of all functionality to reveal the structure of the underlying client extension framework.

Eetrans is another skeletal Exchange client extension, demonstrating how to implement a command that works on the current selection in the Exchange client.

Mtwb (also known as Janitor in a DLL) is an Exchange client extension that implements a new command in the Exchange viewer window, File/Expunge Deleted Items. This is version 0.2.2, whereas D.A.M.E. contained version 0.1.7.

Rtfguard (also known as Rich Text Sentry) is an Exchange client extension that strips the rich text from outgoing messages. This is version 0.1.5, whereas D.A.M.E. contained version 0.1.3.

Inetxidm (also known as Internet Idioms) is an Exchange client extension that manipulates the text of incoming and outgoing messages in various manners. (This application is specific to the Exchange client.) This is version 0.4.8, whereas D.A.M.E. contained version 0.3.2.

Chapter 5

Frminf is an Exchange client extension that examines the currently selected message in the viewer and displays a number of attributes of the message pertinent to form authors.

Chapter 6

(Before using any of these form server samples, please review their errata of 26 March and 1 July 1997, as well as my brief notes on form servers hosted within the Outlook 97 client.)

Poststub implements the server for a simple post form.

Sendstub implements the server for a simple send form.

Catform implements a form for a custom folder application.

Chapter 7

Msgopen is an Exchange client extension that opens messages in an instance of a modal form.

Fwdasatt (also known as Forward As Attachment) is an Exchange client extension that implements a pair of new Compose commands, Forward as Attachment and Forward as Link. (The Forward as Link command is specific to the Exchange client.) This is version 0.2.2, whereas D.A.M.E. contained version 0.1.2.

Chapter 8

Vwinst is an Exchange client extension implementing the Folder View Import/Export Utility, saving named folder views as files or restoring those views to folders.


Other destinations

Book
Go to the main page for this book
Ben Goetter
Go to the author's personal home page
Site Map
Find your way around this site

Last modified: 13 August 1998

Ben Goetter (contact information)

Copyright 1998, Ben Goetter. All rights reserved.