📄 vcg21.htm
字号:
<HTML>
<HEAD>
<TITLE>vcg21.htm </TITLE>
<LINK REL="ToC" HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/index.htm">
<LINK REL="Index" HREF="htindex.htm" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/htindex.htm">
<LINK REL="Next" HREF="vcgp6.htm" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/vcgp6.htm">
<LINK REL="Previous" HREF="vcg20.htm" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/vcg20.htm"></HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">
<A NAME="I0"></A><P ALIGN=CENTER>
<A HREF="vcg20.htm" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/vcg20.htm" TARGET="_self"><IMG SRC="blanprev.gif" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/blanprev.gif" WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="Previous Page"></A>
<A HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/index.htm" TARGET="_self"><IMG SRC="blantoc.gif" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/blantoc.gif" WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="TOC"></A>
<A HREF="vcgp6.htm" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/vcgp6.htm" TARGET="_self"><IMG SRC="blannext.gif" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/blannext.gif" WIDTH = 37 HEIGHT = 37 BORDER = 0 ALT="Next Page"></A>
<HR ALIGN=CENTER>
<P>
<UL>
<UL>
<UL>
<LI>
<A HREF="#E68E107" >Understanding Microsoft Mail</A>
<UL>
<LI>
<A HREF="#E69E260" >Workgroup Mailboxes, Postoffices, and Administration</A>
<LI>
<A HREF="#E69E261" >Sending Faxes with AtWork Fax</A>
<LI>
<A HREF="#E69E262" >The Microsoft Messaging API (MAPI)</A></UL>
<LI>
<A HREF="#E68E108" >Creating Workflow Applications with Visual C++</A>
<UL>
<LI>
<A HREF="#E69E263" >Looking to the Future of Workflow Applications</A>
<LI>
<A HREF="#E69E264" >Considering MAPI for Database Applications</A>
<LI>
<A HREF="#E69E265" >Creating a New MAPI-Compliant Application</A></UL>
<LI>
<A HREF="#E68E109" >Obtaining and Using the Schedule+ Libraries</A>
<UL>
<LI>
<A HREF="#E69E266" >The Schedule+ Libraries for C</A>
<LI>
<A HREF="#E69E267" >The SALAPP Sample Application</A>
<LI>
<A HREF="#E69E268" >Visual C++ Database Applications and Schedule+</A></UL>
<LI>
<A HREF="#E68E110" >The Windows Telephony API (TAPI) and Visual C++</A>
<UL>
<LI>
<A HREF="#E69E269" >TAPI Devices</A>
<LI>
<A HREF="#E69E270" >Windows Telephony Interfaces</A>
<LI>
<A HREF="#E69E271" >Simple TAPI and Extended TAPI</A>
<LI>
<A HREF="#E69E272" >Visual C++ Database Applications and TAPI</A>
<UL>
<LI>
<A HREF="#E70E117" >Database Applications That Use Inbound Caller ID Services</A>
<LI>
<A HREF="#E70E118" >Integrated Messaging Systems</A></UL></UL>
<LI>
<A HREF="#E68E111" >MSComm Services</A>
<LI>
<A HREF="#E68E112" >Summary</A></UL></UL></UL>
<HR ALIGN=CENTER>
<A NAME="E66E53"></A>
<H1 ALIGN=CENTER>
<CENTER>
<FONT SIZE=6 COLOR="#FF0000"><B>- 21 -</B>
<BR><B>Interacting with Microsoft Mail, MAPI, and TAPI</B></FONT></CENTER></H1>
<BR>
<P>Microsoft Mail is one of the leading contenders in the e-mail application market. With Windows 95, Exchange is the new e-mail client that is gaining popularity with users. When Windows NT is given the Windows 95 user interface, it too will offer an Exchange client. According to BIS Strategic Decisions, a consulting firm in Massachusetts, there were about 2.5 million Microsoft Mail users at the time this book was written. Many Windows 95 users also are connected to some form of e-mail, including internal systems, Microsoft Network (MSN), Internet connections, and other services such as CompuServe, Prodigy, and America Online. Windows NT includes a workgroup version of Microsoft Mail, and future versions of Windows NT will include Exchange. Windows 95's Exchange client supports a wide array of mail types, including the Internet, fax, and MSN. Windows NT's new Exchange Server will be most useful in implementing custom interuser communications.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE><B>NOTE</B>
<BR>
<BR>Microsoft has announced its Exchange Server product. This system, which will run under Windows NT Server, lets larger organizations manage mail, Schedule+, Internet mail, and other information-based services. This product should be released in early 1996.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE><B>NOTE</B>
<BR>
<BR>It can be expected that eventually Microsoft Mail will be totally replaced with the Microsoft Exchange products. However, at this time it's still as common to see Microsoft Exchange as it is to see Microsoft Mail. Actually, the Microsoft Exchange Server replaces the Microsoft Mail Server.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Applications such as Excel, Word for Windows, and Project, which provide Send and Add Routing Slip menu choices on the File menu, are called <I>mail-aware applications</I>. A <I>mail-aware</I> <I>application</I> (MAA) lets you send an object created by the application to one or more users as an attachment to a Microsoft Mail message.
<BR>
<P>Schedule+ is a simple appointment scheduling and to-do list application that is closely coupled with Microsoft Mail. Schedule+ 7 is included with Microsoft Office 95. Schedule+ is a workgroup scheduling tool that lets you or your designee set up appointments and schedule meetings with other members of your workgroup. Schedule+ checks the appointment calendar of prospective attendees and notifies you of conflicts. You can let Schedule+ find a date and time when all attendees have an open schedule. This can save a substantial amount of time when your meeting involves a large number of people.
<BR>
<P>Developers who are migrating their consulting practice from DOS to Windows are likely to find that clients are interested in database applications that interact with Microsoft Mail and Microsoft Exchange. This chapter describes how you might create mail-aware Visual C++ database applications. It also shows you how to obtain and use the Schedule+ Libraries (version 1.0a2), which lets you duplicate the functions contained in the Schedule+ application within a 16-bit Visual C++ application. A brief description of the Windows Telephony API (TAPI), which is part of the Windows Telephony SDK, appears near the end of this chapter.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE><B>NOTE</B>
<BR>
<BR>The Schedule+ Libraries are available only in a 16-bit version (as of January 1996). The 32-bit version of these libraries is currently not available from Microsoft. Schedule+ 7 is a 32-bit application.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Creating mail-aware database applications with Visual C++ 4 is as simple as selecting the correct option when creating your project using Visual C++ 4's AppWizard. Making an existing application mail-aware is a much more complex topic, one that is beyond the scope of this book. It would probably be easier to create a new mail-aware application shell, grafting on the working parts of an existing application, than to try to add mail-awareness to an existing application. This book's space limitations restrict the discussion of mail-aware Visual C++ applications to an overview of how MFC 4 implements the transfer of documents using Mail and Microsoft Exchange. Sources of additional background information for mail-aware applications, as well as sample applications, are also included in this chapter.
<BR>
<BR>
<A NAME="E68E107"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Understanding Microsoft Mail</B></FONT></CENTER></H3>
<BR>
<P>Microsoft Mail 3.5 for PC Networks was the current version of the full implementation of Microsoft Mail at the time this book was written. The competitive upgrade retail version of Microsoft Mail 3.5 includes one server license and licenses for 10 client workstations. Microsoft Mail 3.5 is designed for enterprise-wide e-mail applications using client-server methodology. Microsoft Mail 3.5 isn't a Windows application. It runs under DOS on a network-connected system.
<BR>
<P>A variety of mail gateways to networks other than Windows NT Server (NTS) and LAN Manager are available. Novell Corporation has an upgrade to NetWare's <I>Global Message Handling Service (MHS)</I> that lets Microsoft Mail 3.5 users connect directly to MHS. Direct connection to NetWare's directory management system eliminates the need for a NetWare gateway to read the NetWare bindery that provides user mail addresses. An optional application, <I>Microsoft Mail Remote</I> for Windows (also known as <I>Remote</I>), lets modem-equipped computers dial in to the Microsoft Mail 3.5 server. Remote also includes gateways for online e-mail services, such as CompuServe and AT&T's EasyLink. Windows 95 includes Microsoft Exchange, a comprehensive mail system that lets users use Microsoft AtWork Fax, Microsoft Mail, and Internet E-Mail. Microsoft Exchange also may be use to access other services such as CompuServe. Both Windows 95 and Windows NT allow dial-in/dial-out connections, using Microsoft's RAS (remote access server) technology.
<BR>
<P>MAPI also supports X.400, an international messaging standard developed by the Consultative Committee for International Telephone and Telegraph (CCITT). The X.400 standard is used for wide-area messaging systems and is the standard messaging protocol in most countries outside North America. X.400 deals with messages that are transmitted by the switched telephone network, as well as dedicated telephone lines, satellite links, and other communication services provided by public and private carriers. X.400 compatibility isn't included in Mail.
<BR>
<P>The following sections provide a brief introduction to Microsoft Exchange, which is included with Windows 95, and a discussion of the Microsoft Messaging API (MAPI) on which Microsoft Mail 3.5 and Microsoft Exchange are based.
<BR>
<BR>
<A NAME="E69E260"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Workgroup Mailboxes, Postoffices, and Administration</B></FONT></CENTER></H4>
<BR>
<P>Windows for Workgroups, Windows 95, Windows NT Workstation (NTW), and Windows NT Server (NTS) include a workgroup version of Microsoft Mail (also known as Mail). Windows 95 includes Microsoft Exchange, a comprehensive mail system that will be moved to Windows NT with the next release of Windows NT. Microsoft Exchange (called Exchange hereafter) lets the user interface with Microsoft Mail, Internet mail, the Microsoft Network, AtWork Fax, and other mail systems including CompuServe. Exchange is a flexible, powerful system.
<BR>
<P>User e-mail accounts (called <I>mailboxes</I>) are maintained in a group of files that are collectively called a <I>postoffice</I>. Mail uses the \WGPO0000 folder and a collection of folders in the \WGPO0000 folder to store postoffice files. (There are more than 100 items in an initial set of postoffice folders and files.)
<BR>
<P>Windows 95's and Windows NT's Mail are limited to communication with users whose e-mail accounts are maintained in a single workgroup postoffice. This postoffice can reside on either a Windows NT Server or a Windows 95 machine. If you're using NTS and all Windows 95 and Windows NT users log on to one Windows NT Server domain, you can maintain a single Mail postoffice for the entire domain. You can create additional postoffices for individual workgroups, but you need to duplicate the e-mail accounts in each workgroup postoffice manually. This could be an administrative nightmare if your system has many users. The examples in this chapter use the Windows 95 version of Mail. Figure 21.1 shows the information that is contained in an individual e-mail account record.
<BR>
<P><B><A HREF="21vcg01.gif" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/21vcg01.gif">Figure 21.1. An account record for a workgroup postoffice.</A></B>
<BR>
<P>The person who creates a workgroup postoffice directory structure is the administrator of the postoffice. Only the postoffice administrator can add, delete, or edit e-mail accounts. Figure 21.2 shows an example of the Postoffice Manager window with a three-member workgroup. The administrator of the postoffice usually maintains a separate account for administrative messages. In this case, the account <U>sa</U> is for system messages.
<BR>
<P><B><A HREF="21vcg02.gif" tppabs="http://202.113.16.101/%7eeb%7e/Database%20Developer's%20Guide%20with%20Visual%20C++%204,%20Second%20Edition/21vcg02.gif">Figure 21.2. The Postoffice Manager window.</A></B>
<BR>
<P>Information pertaining to the administrator's and/or user's mailbox is stored in MSMAIL32.INI and in Windows' registration database. The private profile file in the \WINDOWS directory contains only a few entries. Most of the information is stored in the registry. Following is an example of the MSMAIL32.INI file for the postoffice administrator shown in Figure 21.2:
<BR>
<PRE>
<FONT COLOR="#000080"><U>[Microsoft Mail]</U>
<U>ServerPath=E:\wgpo0000</U>
<U>Login=GayDeciev</U></FONT></PRE>
<P>Microsoft designed Mail to be extensible with add-in applications such as AtWork Fax and Microsoft Electronic Forms (MEF), Microsoft Voice (a voice mail system for Windows 95), and applications provided by independent software vendors (ISVs). The registration database is used to notify Mail of the presence of add-in applications and to provide menu choices to launch the add-ins.
<BR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -