⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vcg21.htm

📁 Visual C++与数据库的连接经典实例
💻 HTM
📖 第 1 页 / 共 5 页
字号:
<BR>

<A NAME="E69E261"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Sending Faxes with AtWork Fax</B></FONT></CENTER></H4>

<BR>

<P>Windows 95 provides the capability to send faxes from within Microsoft Exchange; this capability isn't included with the Windows NT version of Mail that was current when this book was written. The fax subsystem of Windows 95 is called AtWork Fax, a reference to the Microsoft AtWork API designed to manage compatible office equipment, such as a stand-alone fax machine, over a network. Windows 95 also lets you share a fax modem with other members of your workgroup. If you send the fax with a Class 1 fax modem (Class 1 modems have high-speed data-transmission capability) to another Microsoft Exchange user with a Class 1 fax modem, the fax is transmitted as an e-mail message rather than as a .TIF (bitmap) file. AtWork Fax uses the .DCX format, a modification of the .TIF format that provides multiple fax pages in a single file.

<BR>

<P>All messages, regardless of their type, are stored in the same mail database. For example, users of Microsoft Voice have their voice mail messages stored in the same postoffice as e-mail documents and faxes.

<BR>

<BR>

<A NAME="E69E262"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>The Microsoft Messaging API (MAPI)</B></FONT></CENTER></H4>

<BR>

<P>Microsoft Mail is based on the <I>Microsoft Messaging API (MAPI)</I>, one of the components of <I>Microsoft Windows Open Services Architecture (WOSA)</I>. MAPI consists of the following three categories of functions:

<BR>

<UL>

<LI><I>Simple MAPI</I> is a set of 12 basic functions that you can use to create simple mail-aware applications. Simple MAPI was the first API used to implement Microsoft Mail. Visual C++'s MAPI custom controls, MEF, and Schedule+ Libraries use Simple MAPI. Simple MAPI is limited to receiving, transmitting, and forwarding messages. Complex message-routing features aren't included in Simple MAPI. Table 21.1 lists the 12 basic MAPI functions, sometimes referred to as the simple MAPI functions.

<BR>

</UL>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 21.1. The 12 basic MAPI functions.</B></FONT></CENTER>

<BR>



<CENTER><TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 CELLPADDING=3 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Function</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Description</I>

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPIAddress</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Creates and modifies address lists.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPIDeleteMail</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Deletes mail messages.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPIDetails</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Provides details on a specific address.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPIFindNext</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Enumerates messages of a given type.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPIFreeBuffer</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Frees memory allocated for the messaging system.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPILogoff</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Ends the session with the messaging system.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPILogon</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Initiates a session with the messaging system.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPIReadMail</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Reads mail messages.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPIResolveName</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Resolves a recipient's name (as entered by the user) to a unique mail address.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPISaveMail</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Saves mail messages.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPISendDocuments</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Sends a standard mail message attachment.

</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<U>MAPISendMail</U>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Sends a standard mail message.</FONT>

</TABLE></CENTER><UL>

<LI><I>Common mail call (CMC)</I> functions implement Simple MAPI in a standardized format that provides an interface to mail APIs of other software publishers. CMC is the preferred format for creating new mail-aware applications because you can also access messages from other e-mail systems that provide an interface to CMC.

<BR>

<LI><I>Extended MAPI</I> is a set of object-oriented functions that let you create <I>mail-enabled applications (MEAs)</I>. Extended MAPI lets Visual C++ applications manage creating and manipulating large numbers of complex messages, as well as structured addressing and routing information. Extended MAPI is particularly well suited to developing workflow applications, the subject of the following section.

<BR>

</UL>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE><B>NOTE</B>

<BR>

<BR>You can download the current version (which was 1.08 at the time this book was written) of the entire MAPI specification in the form of a PostScript file (MAPIPS.ZIP) or a Windows help file (MAPIHL.ZIP) from Microsoft's Internet FTP site at <U>ftp://ftp.microsoft.com/bussys/mail/pcmail-docs</U>. You need a PostScript or TrueImage printer to use the expanded version of MAPIPS.ZIP. Another file in the same library, MAPIWP.ZIP, provides detailed information on the client side of MAPI 1.0 in the form of multiple Word for Windows 2.0 .DOC files.

<BR>

<BR>Microsoft also is documenting MAPI in the Win32 SDK. Another source to check is the MSDN CDs, both Level I and Level II. Another source of MAPI documentation is the Visual C++ 4 CD. Look in Books Online, SDKs | WIN32 Extensions | MAPI.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>A variety of e-mail applications compete with Microsoft Mail, such as Lotus cc:Mail, DaVinci Mail, and the e-mail component of Corel's Perfect Office. Lotus cc:Mail, for example, includes both the e-mail function and a scheduling application similar to Schedule+. Lotus has proposed another industry standard, <I>Vendor-Independent Messaging (VIM)</I>, for e-mail applications. Lotus Notes, the most successful of the workgroup productivity tools to date, uses VIM as its messaging protocol. ORACLE Corp. also has introduced an e-mail system, Oracle Mail, that uses the Oracle RDBMS to maintain user accounts on an enterprise-wide scale.

<BR>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE><B>NOTE</B>

<BR>

<BR>Most e-mail applications for Windows include bridges or &quot;glue&quot; that enable the interchange of messages with Microsoft Mail. Conversely, it's likely that future versions of Microsoft products will provide some form of connectivity to the Lotus Notes database. If and when the capability to manipulate the Notes database with a future version of Visual C++ becomes a reality, a variety of new opportunities will be opened to Visual C++ database developers.

<BR>

<BR>Lotus has developed a Notes ODBC driver, which is available from Lotus's forum on CompuServe. This driver might be available from other sources as well. Check <U>http://www.lotus.com/</U> for information if you have Internet access.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>A practical example of using MAPI to exchange information between users is that of a local software company. Each employee has a computer connected to a Microsoft Windows NT Server, and Microsoft Mail is configured on each machine.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -