Table of Contents

Acknowledgements ix
Introduction xi
 

Architecture

 

1. The Microsoft Component Object Model

3

A Component World

3

Consistency in a component world

4

Messaging in a component world

5

Microsoft and OLE, the seeds of a component world

6

Justification and Functionality of COM

7

The requirements for COM

7

Objects and interfaces

8

Object naming

14

Object lifespan

15

Object encapsulation

18

Implementation within COM

21

Common standards

21
The binary interface standard
The error return standard
The memory management standard

As a client

28
How a client uses an interface
How a client gets an object
How a client gets an interface
What are the rules for reference counting?
How can I automate reference counting?

As a server

50
Implementing an interface
Implementing a component object
Complex component objects
Implementing a class object in-process
Implementing an in-process server
Implementing an out-of-process server
Alternate class object designs
 

2. The Win32 Messaging API

63

MAPI: The Architecture of Messaging Applications

63

Standardization of messaging architecture

64

Extensible component architecture

64

Separation of application and messaging system

65

Rich API

65

The user features of the WMS

65

The MAPI Architecture

66

Component model

66
Transport providers
Store providers
Address book providers
Sets of providers
Available API sets

Process Model

74
The spooler
The client applications
Form servers
The OLE/Messaging server

Object model

81
Differences from COM
Session, the root object
Properties
Tables
Containers
Additional objects implemented by clients

The applications within the MAPI architecture

93

A taxonomy of applications

93
A system application
A report application
A mailbox-centric application
A folder-centric application
None of the above
All of the above

An example application

95
Source for the program
Checking for MAPI
Starting and stopping MAPI
Managing a session
Managing notifications
The default message store
The spooler
The results
 

3. Exchange Server: The Messaging System

111

Component and Process/Data Model of Exchange Server

111

The NT Domain Controller

114

The Exchange Server Information Store

114

The Exchange Server directory

115

Components Invisible to Applications

116
The message transfer agent
The system attendant
The directory synchronizer
The key manager
The connectors and gateways

The Clients

117

RPC in Exchange

118

Exchange Server as seen by MAPI

120

Address book provider

125

Transport provider

126

Message store provider

126

Client UI extensions

128

An Exchange Application as a MAPI Application

128

The Application as MAPI client

129

The Exchange Client as an Application

130

Transcending the Exchange Client

131
 

Application

 

4. Extending the Exchange Client

135

The client and its extensions

135

The client

135
Gross anatomy of the client
Viewers
Forms
Child windows
Client described as a MAPI application
Viewers within MAPI
Forms within MAPI

Client extensions

143
The extension as component
Its differences from COM
The simplest extension object
Its offered interfaces
IExchExtCommands
IExchExtUserEvents
IExchExtSessionEvents
IExchExtMessageEvents
IExchExtAttachedFileEvents
IExchExtPropertySheets
IExchExtAdvancedCriteria
Life within the client

How the client calls extensions

155
How Extensions Appear in the Registry
Contents of an extension registry entry
Identifying an extension registry entry
How the client reads entries
Registering the simplest extension, revisited
Different Extensibility contexts
EECONTEXT_TASK
EECONTEXT_SESSION
EECONTEXT_VIEWER
EECONTEXT_REMOTEVIEWER
EECONTEXT_SEARCHVIEWER
EECONTEXT_ADDRBOOK
EECONTEXT_READNOTEMESSAGE
EECONTEXT_SENDNOTEMESSAGE
EECONTEXT_READPOSTMESSAGE
EECONTEXT_SENDPOSTMESSAGE
EECONTEXT_READREPORTMESSAGE
EECONTEXT_READRESENDMESSAGE
EECONTEXT_PROPERTYSHEETS
EECONTEXT_ADVANCEDCRITERIA
Interface offered to the extension
Use at installation
Other uses of the callback

Creating new commands

Extending the menu and toolbar

170
Extend the menu
Vtable management
Installing the commands
Supporting the menu command
Extend the toolbar
Adding the button
Supporting the button
Enable the command
Invoke the command

Getting input from Exchange

184
Get the current selection
Currently open item
Set of selected items
Enabling and disabling menu items
Extending a property sheet
Vtable management
Indicating interest
Defining the property sheet
Implementing the property sheet
Releasing the property sheet
Prompt the user for input
Modal versus modeless UI in Exchange extensions

Changing client behavior

204

Changing existing menu commands

204
Redefining existing commands
Disabling existing commands

Enhancing the standard forms

206
Altering the form menu
Altering a read message
Altering a sent message
Automatically processing attached files
 

5. Forms: Theory and Environment

219

Forms and Messages

219

The Role of Forms in MAPI

220
Send versus Post forms
221
Send forms
Post forms
Some standard Exchange forms
222
IPM.Note
IPM.Post
IPM.Document
Report
IPM.Resend
Standard Application-defined Forms
225
Microsoft Office 95
Microsoft Schedule+ 7.0
Microsoft Exchange Server
Microsoft Exchange Forms Designer

Form as Component Object

226
Analogy Between Forms and OLE Server Applications
227
CLSID versus message class
229
Scope of a valid CLSID
230
Convergence with Compound Documents
230
Viewers
Verbs

Creating Structured Messages with Forms

232
Description of Message Classes
232
Properties of a Message Class
234
Property Sets in MAPI
235

The MAPI Forms Manager

237

Interface to the Forms Manager

238

Information about a Form

238
Properties of a Form
239
Message class
Form CLSID
Display name
Comment
Icon and mini-icon
Version
Contact name
Designer name and GUID
Category and subcategory
Hidden
Host map
Message behavior
Extensions
Example of Viewing Form Properties
244
Published properties
248
Example of viewing published properties
Over multiple forms
Published verbs
253
Example of viewing published verbs

Storage for a Form

255
Local (Application) Forms Library
256
Folder Forms Library
258
Personal Forms Library
260
Exchange Server Organization Form Library
261

Resolution of a form

265
Steps of resolution
265
Message superclassing
266
Making a form local to the client
267
 

6. Implementing and Installing the Form

269

Form as Component Object, Revisited

269

The interfaces of the object

269
IPersistMessage
Uninitialized state
Normal state
No Scribble state
Hands Off From Normal state
Hands Off After Save state
State diagram
Message site
Compare with IPersistStorage
IMAPIForm
Avtivation with a verb
View contexts
View advise sinks
How to shut down a form
Compare with IOleObject
IMAPIFormAdviseSink
Synthesis

The server hosting the Form object

295
Process model
Performance implications
Server caching
The form factory

Implementing a Form Server

299

First questions

299
Class identifier (CLSID)
Example

Common scaffolding

303
Entry point
MAPI initialization
Class object
Message pump

Implementing a basic send form

317
Object creating
Managing vtables
Implementing IPersistMessage
IPersistMessage::GetLastError
IPersistMessage::GetClassID
IPersistMessage::IsDirty
IPersistMessage::InitNew
IPersistMessage::Load
IPersistMessage::Save
IPersistMessage::SaveCompleted
IPersistMessage::HandsOffMessage
Recycling this implementation
Implementing IMAPIForm
IMAPIForm::GetLastError
IMAPIForm::SetViewContext
IMAPIForm::GetViewContext
IMAPIForm::ShutdownForm
IMAPIForm::DoVerb
IMAPIForm::Advise
IMAPIForm::Unadvise
Recycling this implementation
Implementing IMAPIFormAdviseSink
IMAPIFormAdviseSink::OnChange
IMAPIFormAdviseSink::OnActivateNext
Implementing form commands
How to reply to the current message
How to inherit the implementation of the Exchange client's standard form verbs
How to support printing from the Exchange client
How to support saving to a file from the Exchange client
How to save a message, sent or unsent
How to submit a message for delivery
How to address a message for delivery

Implementing a basic post form

374
Obvious differences from the send form
How to post a message
Posting a new message
Saving an existing message
Adding the properties ordinarily set by the message spooler
Distinctive post form verbs

Implementing a richer post form

383
Named properties
Obtaining the property tags
Reading the named properties
Writing the named properties
How to support systems that won't recognize a custom form

Installation of the Completed Server

394

Specifying the configuration of the form

394
Description
Platforms
Properties
Verbs
Extensions
 

7. Manipulating and Containing Forms

403

Clients of Form Objects

403

The interfaces of the form's environment

404
Form interfaces
Host interfaces
Advise sinks
Viewers and forms and sinks, Oh My

To launch a form

409
Getting a message and client objects
410
Reading an existing message
Composing a new message
Wrapping the message in a message site
Creating the view context
Acquiring a form object
IMAPIFormMgr::LoadForm
IMAPIFormMgr::CreateForm
IClassFactory::CreateInstance
Initializing the form object
With the message site
With the default view context
Activating the form
Registering a view advise sink
Igniting the form with a verb

Managing the open form

427
Reactivating the form
Releasing the form
Forcibly closing the form

Implementing Form Clients

428

Deferring all the work to MAPI

429
Getting the information from Exchange
Additional information not available from the callback
Preparing the form
Showing the form

Composing a form from an Exchange extension

436
The extension from a view context
The extension from a note form context
A class definition, and safe interfaces
Getting an instance of the form
Launching that form instance
The source of the host interfaces
Attaching the original message

Creating a response form within a form server

454
Creating the form
Addressing the form
 

8. Designing a Folder

459

About Folder Applications

Components of a Designed Folder

460
Views
460
Forms
461
Comment
461
Exchange Server-Specific Components
461
Security
Rules
Replication
Folder Installation
464
Per-client Setup
464

Installing Folder Applications

465

Genesis and Comment

465

Forms

466
Effects of the set of folder forms
Installing forms into the folder form library

Views

468
Brief definition of a view descriptor
Extracting a view from a folder
Installing a view into a folder
Setting the default view to use on a folder

Exchange Server Attributes

482
 

Appendices

 

A. Guide to Sample Applications

485

msess

485

mfetch

488

mlogon

490

eeminim

492

eestub

494

eetrans

496

mtwb

498

rtfguard

500

inetxidm

503

frminf

505

poststub

508

sendstub

511

catform

514

msgopen

516

fwdasatt

518

vwinst

520
 

B. For More Information

523

In Print, On Disk

523

On the World Wide Web

523

Microsoft Corporation

524

The Author's Site

524
 
Glossary 525
Index 547

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 1996-1998 Ben Goetter. All rights reserved.