MAPI,
SAPI, and
TAPI Developer's Guide
by Michael C. Amundsen
C O N T E N T S
Introduction to MAPI, SAPI, and TAPI Developer's Guide
Chapter 1 Windows Communications Overview
- MAPI Message Services
- TAPI Telephony Services
- SAPI Speech Services
- MCI Multimedia Services
- Applications Covered in This Book
- Development Tools
- Hardware and Software Tools
- What's Not Covered in This Book
- How to Use This Book
Chapter 2 Introduction to Windows Open Services Architecture (WOSA)
Chapter 3 What is MAPI
Chapter 4 MAPI Architecture
Chapter 5 Using the Microsoft Exchange Forms Designer
- Introduction
- What Is the Microsoft Exchange Forms Designer?
- Using the Microsoft Exchange Forms Designer to Create a Custom Form
- Using the Microsoft Exchange Forms Designer Wizard
- Modifying the Job Request Form
- Completing the Job Request Form Fields
- Setting Form and Window Properties of the Job Request Form
- Adding Online Help to the Job Request Form
- Installing the Job Request Form
- Testing the Job Request Form
- More Forms Designing Techniques
- Designing Microsoft Exchange Folders
- Summary
Chapter 6 Creating MAPI-Aware Applications
Chapter 7 Creating a Simple MAPI Client with the MAPI Controls
Chapter 8 The OLE Messaging Library
- Introduction
- The Session Object
- The InfoStore Objects and Collections
- The Folder Objects and Collections
- The Message Objects and Collections
- The Recipient Objects and Collections and the Address Object
- The Attachment Objects and Collections
- Summary
Chapter 9 Creating a MAPI Mailing List Manager with the OLE Messaging Library
Chapter 10 Building a MAPI-Enabled Fourm Tool
- Discussion Groups versus E-Mail
- The Discuss Project
- The MAPIPost Code Library
- The Discuss and Msgs Forms
- Building the Other Forms
- Testing the Discuss Forum Tool
- Summary
Chapter 11 Creating a MAPI Email Agent
- Designing the Email Agent
- Coding the MAPI Email Agent Forms
- Coding the Support Routines
- Installing and Testing the MAPI Email Agent
- Summary
Chapter 12 Creating Windows Messaging Client Extensions
- What Are Exchange Client Extensions?
- Creating the Message Signing Extension
- Installing and Testing the Message Signing Extension
- Summary
Chapter 13 Part II Summary-The Messaging API
- Chapter 3, "What Is MAPI?"
- Chapter 4, "MAPI Architecture"
- Chapter 5, "Using the Microsoft Exchange Forms Designer"
- Chapter 6, "Creating MAPI-Aware Applications"
- Chapter 7, "Creating a Simple MAPI Client with the MAPI Controls"
- Chapter 8, "The OLE Messaging Library"
- Chapter 9, "Creating a MAPI Mailing List Manager with the OLE Messaging Library"
- Chapter 10, "Building a MAPI-Enabled Forum Tool"
- Chapter 11, "Creating a MAPI E-Mail Agent"
- Chapter 12, "Creating Microsoft Exchange Client Extensions"
Chapter 14 What Is SAPI
Chapter 15 SAPI Architecture
Chapter 16 SAPI Basics
- SAPI Hardware
- Technology Issues
- General SR Design Issues
- Voice Command Menu Design
- TTS Design Issues
- Summary
Chapter 17 SAPI Tools-Using SAPI Objects with Visual Basic 4.0
- OLE Voice Text Object
- Using the Visual Basic Object Browser
- Using the Register Method to Connect to the TTS Engine
- Using the Enable Property to Start and Stop the TTS Engine
- Using the Speak Method to Play Text
- Adjusting the Speed of Voice Playback
- Adding Playback Controls for TTS Services
- Getting TTS Status Reports with the IsSpeaking Property
- Establishing a TTS Callback in Visual Basic 4.0
- OLE Voice Command Objects
- Creating the Voice Command Menu Object
- Using the Register Method to Connect to the SR Engine
- Using the Awake Property to Start and Stop SR Processing
- Creating the Menu Object
- Adding Commands to the Voice Menu Object
- Using the CommandSpoken Property to Respond to Menu Commands
- Establishing an SR Callback in Visual Basic 4.0
- Creating List Commands for the Voice Menu Object
- Removing Commands from the Voice Menu Object
- Summary
Chapter 18 SAPI Behind the Scenes
Chapter 19 Creating SAPI Applications with C++
Chapter 20 Building the Voice-Activated Text Reader
- Designing the Application
- Coding the MDISpeech Module
- Modifying the MDINote Forms
- Testing the SAPI-Enabled MDI NotePad
- Summary
Chapter 21 Part III Summary - The Speech API
- Chapter 14, "What Is SAPI?"
- Chapter 15, "SAPI Architecture"
- Chapter 16, "SAPI Basics"
- Chapter 17, "SAPI Tools-Using SAPI Objects with Visual Basic 4.0"
- Chapter 18, "SAPI Behind the Scenes"
- Chapter 19, "Creating SAPI Applications.with C++"
- Chapter 20, "Building the Voice-Activated Text Reader"
- The Future of SAPI
Chapter 22 What Is TAPI?
- The Telephony API Model
- TAPI and the WOSA Model
- Typical Configurations
- Telephone Line Services
- Summary
Chapter 23 TAPI Architecture
- Assisted Telephony Services
- Basic Telephony Services
- Supplemental Telephony Services
- Extended Telephony Services
- Summary
Chapter 24 TAPI Basics
Chapter 25 TAPI Hardware Considerations
- Modems and the UniModem Drivers for Win95 and WinNT
- Basic Data Modems
- Data Modems with Voice
- Telephony Cards
- Summary
Chapter 26 TAPI Tools-Using the TAPILINE Control
- The TAPILINE Control
- The TAPILINE Test Project
- The TAPILine Function Module
- Laying Out the TAPILine Form
- Coding the TAPILine Form
- Summary
Chapter 27 TAPI Behind the Scenes--The TELEPHON.INIFile
- Building the TAPI Dialog Utility Program
- The TELEPHON.INI File
- TAPI Service Provider Information
- Handoff Priorities Information
- Dialing Location Information
- Credit Card Dialing Instructions
- Summary
Chapter 28 Using TAPI to Handle Incoming Calls
Chapter 29 Writing TAPI-Assisted Applications
- The Assisted Telephony API Calls
- Creating the QikDial Application Using Excel 95
- Writing the TeleBook Application Using Visual Basic 4.0
- Summary
Chapter 30 Creating TAPI-Enabled Applications
- Designing the TAPIFONE Application
- The libTAPI Module
- frmTAPI-The Main Form
- The Call and About Dialog Boxes
- Testing TAPIFONE
- Summary
Chapter 31 Third Party TAPI Tools
- The Visual Voice Telephony Toolkit for Windows
- Pronexus' VBVoice Development Kit
- Microsoft Phone
- Summary
Chapter 32 Part IV Summary-The Telephony API
- Chapter 22, "What Is TAPI?"
- Chapter 23, "TAPI Architecture"
- Chapter 24, "TAPI Basics"
- Chapter 25, "TAPI Hardware Considerations"
- Chapter 26, "TAPI Tools-Using the TAPILINE Control"
- Chapter 27, "TAPI Behind the Scenes-The TELEPHON.INI File"
- Chapter 28, "Using TAPI to Handle Incoming Calls"
- Chapter 29, "Writing TAPI-Assisted Applications"
- Chapter 30, "Creating TAPI-Enabled Applications"
- Chapter 31, "Third-Party TAPI Tools"
- The Future of Telephony and TAPI
Chapter 33 Design Considerations for Integrated Communications Applications
- Introduction
- General Considerations
- MAPI versus Comm API
- Assisted TAPI versus Full TAPI
- When to Use the Speech API
- Summary
Chapter 34 Building the FaxBack Application
- Introduction
- Project Resources
- Starting the FaxBack Project
- Coding the FaxBack Support Module
- The FaxBack Form
- The About Dialog Box
- Testing the FaxBack Application
- Summary
Chapter 35 Creating the Voice Phone Application
- Project Resources
- Coding the Library Modules
- Building the LibVPhone Module
- Laying Out the VPhone Form
- Coding the VPhone Form
- Laying Out the Support Forms
- Testing Voice Phone
- Summary
Chapter 36 The Talk Mail Project
- Design Considerations
- Coding the LibTalkMail Module
- The tmView Form
- The tmNew and tmRead Forms
- The tmAbout Box
- Testing Talk Mail
- Summary
Chapter 37 Integration Summary
- Design Issues
- The FaxBack Application
- The Voice Phone Application
- The Talk Mail Project
- Some Final Remarks
appendix A MAPI Resources
appendix B SAPI Resources
appendix C TAPI Resources
appendix D The CD-ROM Contents
|
Copyright © 1996 by Sams Publishing
FIRST EDITION
All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. For information, address Sams Publishing, 201 W. 103rd St., Indianapolis, IN 46290.
International Standard Book Number: 0-672-30928-9
HTML conversion by :
M/s. LeafWriters (India) Pvt. Ltd.
Website : http://leaf.stpn.soft.net
e-mail : leafwriters@leaf.stpn.soft.net
Trademarks
All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark.
President and Publisher | Richard K. Swadley |
Publishing Team Leader | Greg Wiegand |
Managing Editor | Cindy Morrow |
Director of Marketing | John Pierce |
Assistant Marketing Managers | Kristina Perry, Rachel Wolfe |
Acquisitions Editor | Sharon Cox | Development Editor | Tony Amico, Andrew Fritzinger |
Software Development Specialist | Steve Straiger | Production Editor | Mary Ann Faughnan |
Indexer | Chris Barrick | Technical Reviewer | John Charlesworth |
Editorial Coordinator | Bill Whitmer | Technical Edit Coordinator | Lynette Quinn |
Resource Coordinator | Deborah Frisby | Editorial Assistants | Carol Ackerman, Andi Richter, Rhonda Tinch-Mize |
Cover Designer | Tim Amrhein | Book Designer | Alyssa Yesh |
Copy Writer | Peter Fuller | Production Team Supervisor | Brad Chinn |
Production | Stephen Adams, Debra Bolhuis, Mona Brown, Michael Dietsch, Jason Hand, Daniel Harris, Susan Knose, Casey Price, Laura Robbins, Susan Van Ness |
Acknowledgments
Putting this book together took lots of help from many talented people. Although I can't list them all, I want to take a moment to single out a few of the individuals who made this work possible.
First, I want to thank Jefferson Schuler and Bill Zembrodt of Pioneer Solutions. They accepted my challenge to build a simple TAPI OCX tool that would allow Visual Basic programmers virtually the same access to Microsoft's Telephony API services as C++ programmers. The result is the TAPILINE.OCX that is included on the CD-ROM that accompanies this book. They spent several long days and late nights developing this handy tool and I thank them for all their work and assistance.
Next, I must thank all those in cyberspace who answered my queries about telephony, speech systems, and electronic mail. Many of the concepts that appear in this book were hashed out in extensive messages over the Internet, and I thank all those who assisted me in my efforts. I could name many who helped, but I will refrain from doing so lest they be blamed for any of my mistakes within these pages.
I also want to thank the people at Sams Publishing. It takes a great number of talented individuals to get a book from the idea stage to the store shelves, and I consider it a privilege to be able to work with the folks at Sams. Completing this book took more time and effort than any of us originally suspected and more than once it seemed like the book would never be done. I am especially indebted to Sharon Cox for her continued help and support. I doubt this book would be in your hands today were it not for her assistance.
Finally, I need to acknowledge the special contributions made by my family. Without their support, patience, and understanding, I could not have completed this book. (And now that I have completed it, I have a long list of promises that I must live up to!)
About the Author
Mike Amundsen works as an IS consulting and training specialist for Design-Synergy Corporation, a consulting and project management firm specializing in information technology services. He has earned Microsoft certifications for Windows operating systems, Visual Basic, SQL Server, and Microsoft Exchange Server. Mike's work takes him to various locations in the U.S. and Europe where he teaches Windows programming and helps companies develop and manage Windows-based client/server solutions.
He is co-author of Teach Yourself Database Programming with Visual Basic 4 in 21 Days, published by Sams, and was a contributing author for Visual Basic 4 Unleashed and Visual Basic 4 Developer's Guide from Sams Publishing. Mike is the contributing editor for Cobb's "Inside Visual Basic for Windows" newsletter, and his work has been published in "Visual Basic Programmer's Journal" magazine, "VB Tech" magazine, and "Access Developer's Journal."
When he's not busy writing or traveling to client sites, Mike spends time with his family at his home in Kentucky. You may write to Mike at his CompuServe address 102461,1267, at MikeAmundsen@msn.com on the Internet, or you can visit his Web site at www.iac.net/~mamund/.
Tell Us What You Think!
As a reader, you are the most important critic and commentator of our books. We value your opinion and want to know what we're doing right, what we could do better, what areas you'd like to see us publish in, and any other words of wisdom you're willing to pass our way. You can help us make strong books that meet your needs and give you the computer guidance you require.
Do you have access to CompuServe or the World Wide Web? Then check out our CompuServe forum by typing GO SAMS at any prompt. If you prefer the World Wide Web, check out our site at http://www.mcp.com.
Note |
If you have a technical question about this book, call the technical support line at (800) 571-5840, ext. 3668. |
As the team leader of the group that created this book, I welcome your comments. You can fax, e-mail, or write me directly to let me know what you did or didn't like about this book-as well as what we can do to make our books stronger. Here's the information:
FAX: | 317/581-4669 |
E-mail: | programming_mgr@sams.mcp.com |
Mail: | Greg Wiegand Comments Department Sams Publishing 201 W. 103rd Street Indianapolis, IN 46290 |
Introduction to MAPI, SAPI, and TAPI Developer's Guide
This book covers the three most exciting programming services available on the Microsoft Windows platform-messaging (MAPI), speech (SAPI), and telephony (TAPI). Each of these APIs provides a specialized set of services that expand the reach of the Windows operating system in a way that makes it easier to write programs that work without having to deal with the differences between hardware provided from third parties.
The addition of these services as part of the basic operating system not only is a boon to programmers-it is of great interest to users, too. Computers that can handle messages and telephones, and that can generate and understand simple speech, are computers that, ultimately, are easier to use. Learning how you add these vital features to your applications will give your software a greater reach and appeal that can make a real difference to your target audience.
This book is arranged in the following parts:
- Part I-Introduction covers some preliminary issues regarding the Windows Open Services Architecture (WOSA) upon which all three of the API sets are based.
- Part II-The Messaging API (MAPI) contains chapters that describe the MAPI service model, review existing client and server software that implements the MAPI model, and show you how to use common developer tools for building MAPI-compliant applications. There are also several chapters devoted to creating commonly used MAPI-based programs, including e-mail clients, a broadcast mailing list manager, an e-mail-based discussion forum tool, and an e-mail agent. You'll also learn how to use the Microsoft Exchange Forms designer and discover how you can use C++ to create built-in extensions to the Windows Messaging client interface.
- Part III-The Speech API (SAPI) covers the Microsoft Voice product available for Windows 95. You'll learn the details of the API model and how you can use it to create applications that use Text-to-Speech (TTS) and Speech Recognition (SR) engines to add a voice to your pc applications. You'll use both C++ and Visual Basic to build programs that respond to voice commands and read printed text back to users.
- Part IV-The Telephony API (TAPI) outlines the API set that allows Windows programmers to add inbound and outbound telephony features to their applications. You'll learn about the telephony object model, and how to build simple dialing applications and basic inbound call handlers. Along the way you'll learn how to select telephony hardware and third-party TAPI development tools that will make it easier to build and maintain TAPI-compliant applications.
- Part V-Creating Integrated Applications covers design issues you need to keep in mind when designing Windows applications that combine messaging, telephony, and speech services. You'll learn how to build a FaxBack service using MAPI and TAPI; an integrated voice response system that uses TAPI to allow users to call in and request data from the computer and have the results spoken over the phone; and an application that combines all three extension services to create an integrated voice and telephony application that uses voice commands to place outbound telephone calls.
- Part VI-appendixes contains lists of third-party vendors for each of the three API sets and pointers to printed and online documentation sources, along with a handful of e-mail and Web addresses that you can use to keep current on these three technologies.
I encourage you to contact me via the Internet or through my Web site. I hope you enjoy this book, and I look forward to hearing from you soon.
Mike Amundsen
MikeAmundsen@msn.com
www.iac.net/~mamund/