|

Home Page

|

Reviews and Comments

| Table of Contents |

Order On-Line

| Contact

|

 

Table of Contents

 

TABLE OF CONTENTS

Introduction  xix

P a r t   I :  The MAPI Components

Chapter ONE

The MAPI Architecture 3

What Is MAPI? 3

Email and Electronic Messaging—
The Historical Motivation for MAPI
5

Messaging Applications Today 6

Architectural Overview 10

Benefits of the MAPI Architecture 12

MAPI Components 13

The Layered Model 14

Chapter TWO

MAPI Properties 27

MAPI and COM 27

IMAPIProp 28

Transacted and Nontransacted Objects 31

A Closer Look at MAPI Properties 34

Standard Properties vs. Custom Properties 37

Object Identification: Entry Identifiers 39

Miscellaneous Identity Properties 41

Manipulating the Object Properties: IMAPIProp Details 42

How MAPI Returns Errors 42

The GetLastError Method 44

The MAPI Memory Management Model 46

Properties Available in an Object 49

Requesting Properties from an Object 50

Setting Properties on an Object 55

Deleting Properties in an Object 59

Copying the Contents of an Object 61

Saving the Object Changes Permanently 64

A Look Ahead 66

Chapter THREE

MAPI Containers 67

The Standard Container Interface 69

Data Tables of Containers 70

Opening Objects in a Container 74

Access Level 75

Search Containers 76

Chapter FOUR

MAPI Tables and Notifications 81

The Rationale for MAPI Tables 81

MAPI Table Basics 83

SRowSet and SRow 84

Abstract Table Operations 86

Views and Queries 88

Defining Queries 88

Selecting: SetColumns 89

Filtering: Restrict 90

Sorting: SortTable 99

Querying: QueryRows, HrQueryAllRows 100

Positioning: SeekRow, FindRow 101

Miscellaneous Table Methods 105

Notifications 106

The MAPI Notification Engine 107

A Look Ahead 111

Chapter FIVE

MAPI Client Applications 113

What Is a Client? 113

Common Client Attributes 116

Client Access to the Messaging System 116

The MAPI Session 117

Basic Client Operations 118

Client Interaction with Providers 120

Important Client-Side Properties Accessed in HelloMAPI 129

HelloMAPI: A Minimal MAPI Mail Client 135

Program Description 135

Classes and Data Structures 136

User Interface 137

HelloMAPI.CPP: Implementation Details 144

P a r t  I I :  WINDS Case Study
and Implementations

Chapter SIX

MAPI Service Providers 197

What to Consider When Designing a Specific Provider 198

How Service Providers Are Implemented 200

How MAPI Interfaces Are Implemented 203

General Guidelines for Implementation 205

How Providers Are Installed, Registered, and Configured 213

The MAPI Spooler 225

Message Paths During Sending and Receiving 226

Message Submission (Outbound) 227

Message Reception (Inbound) 229

A Look Ahead 231

Chapter SEVEN

Implementing Service Providers: A Case Study 233

The WINDS Mail System 233

The WINDS Server 234

The WINDS Administrator 235

The WINDS Message Service 237

MSLMS: A Personal Message Store Provider 241

CDataBase 242

ABPAB: A Personal Address Book Provider 243

Chapter EIGHT

Message Transport Providers 245

How Transports Interact with the MAPI Subsystem 246

Outbound Logic 247

Inbound Logic 248

How Transports Interact with Message
Store Providers and Address Book Providers
249

General Requirements for All Message Transports 249

Using TNEF for Message Data Encapsulation 254

Client Access to Message Transports 255

Developing a Message Transport:
The WINDS Transport (XPWDS)
256

Implementing Stub Interfaces 257

Editing the MAPISVC.INF File 258

Implementing ServiceEntry 259

Implementing XPProviderInit 268

Implementing IXPProvider 269

Implementing IXPLogon 278

Implementing IMAPIStatus 311

Remote Transports 314

General Requirements 315

Our Remote Transport Implementation: XPWDSR 316

Implementing IMAPIFolder 322

Implementing IMAPIStatus on Remote Transports 327

Chapter NINE

Developing Address Book Providers 335

General Requirements 336

Address Book Provider Interfaces 337

The Provider-to-Database Interface 338

Writable Address Book Providers 340

Entry IDs 341

Case Study of Two Implementations: ABPAB and ABWDS 343

Common Design Features 344

Logging On to an Address Book Provider 345

Service Configuration 346

Provider Logon 350

Editing the MAPISVC.INF File 354

Address Book Provider Properties 355

Returning the Root Hierarchy 359

Database Primitives 360

Returning Recipient Entries 370

Implementing IMAPIProp 370

Derived Classes 381

IABLogon::OpenEntry, Revisited 383

Viewing an Entry 391

Display Tables 391

Resolving Names 398

PR_ANR 404

IABLogon::PrepareRecips 405

One-offs and the Session One-off Table 408

Writable Address Book Providers 415

IABContainer::CreateEntry 416

Notifications 429

DeleteEntries 433

SaveChanges 437

CopyEntries 440

Server-Based Address Book Providers 442

The Design of ABWDS 442

Chapter TEN

Developing Message Store Providers 475

What Is a Message Store Provider? 475

How Message Store Providers
Interact with the MAPI Subsystem
476

Logging On to a Message Store Provider 477

How Message Store Providers Interact with Address Book
Providers and Message Transport Providers 478

Client Access to Message Store Providers 478

Requirements of All Message Store Providers 479

Store Providers Must Support Opening a Root Folder and
Getting a Hierarchy and Contents Table on It 479

Store Providers Must Register at Least One UID 479

Store Providers Must Support the Interfaces Required to
Interact with Client Applications and the MAPI Subsystem 480

Store Providers Must Support the Opening of Their Objects
Through IMsgStore::OpenEntry and IMSLogon::OpenEntry 481

All Store Provider Interfaces Must Be Thread-Safe 481

Store Providers Must Expose Their
Capabilities in PR_STORE_SUPPORT_MASK 482

Support for Notifications 485

Store Providers with Unique Requirements 485

Default Message Store Providers 485

Public Folder Store Providers 488

Read-Only Store Providers 488

Developing a Message Store Provider 490

Implementing Stub Interfaces 490

Adding the Entries of Your Store Provider to MAPISVC.INF 491

Implementing ServiceEntry 492

Implementing MSProviderInit 496

Debugging Message Store Providers 497

Implementing MSLMS and MSWDS 497

Common Design Features 498

Implementing IMSProvider 508

Implementing IMsgStore 515

IMsgStore::SaveChanges 518

IMsgStore::SetProps 518

Unsupported Methods 519

Opening Objects in the Store Provider 519

Support for Setting the Receive Folder 524

The Message Store Provider Outgoing Queue Table 524

Methods Called Only by the MAPI Spooler 525

Aborting Submitted Messages 526

Logging Off from a Store Provider 526

Implementing IMSLogon 527

Implementing IMAPIFolder 528

Folder Tables 532

Opening Objects in a Folder 532

Managing Folder Messages 532

CMAPIFolder::CopyMessages 535

CMAPIFolder::DeleteMessages 535

CMAPIFolder::SetReadFlags 535

CMAPIFolder::Get/SetMessageStatus 535

Managing Subfolders 536

Unsupported Methods in Our IMAPIFolder Implementation 541

Implementing IMessage 541

Getting Properties 544

Setting Properties 544

Opening Interfaces on Properties 545

Deleting Properties 546

Copying the Object and Its Properties 546

Named Property Support 546

Managing Recipients 546

Managing Attachments 548

Submitting Messages 550

Modifying the Message Read State 555

Saving Changes on a Message 556

Implementing IAttach 556

Opening Interfaces on Properties 558

Committing Changes in Attachments 559

Conclusion 560

 

P a r t   I I I :  Appendixes

Appendix A

Named Properties 563

Getting the List of Named Properties in an Object 564

Setting Named Properties 566

Some Idiosyncrasies of IMAPIProp::GetIDsFromNames 568

Appendix B

Multivalue Properties 569

Index 571