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

📄 ch3.htm

📁 MAPI__SAPI__TAPI
💻 HTM
📖 第 1 页 / 共 2 页
字号:
messages that direct them to perform time-consuming tasks, such
as extended database searches or generating long reports, thus
freeing up users' workstations for more immediate business. Once
the task is complete, the batch job machine can send a completion
notice via e-mail to the user who sent the original request. While
it is true that OLE Automation servers are beginning to replace
batch job computers that are controlled by MAPI messages, MAPI
services are still a very powerful alternative.
<H2><A NAME="MAPIApplications"><FONT SIZE=5 COLOR=#FF0000>MAPI
Applications</FONT></A></H2>
<P>
Just as there are three types of MAPI messages, there are three
general types of MAPI applications:
<UL>
<LI><FONT COLOR=#000000>Electronic mail clients</FONT>
<LI><FONT COLOR=#000000>Message-aware applications</FONT>
<LI><FONT COLOR=#000000>Message-enabled applications</FONT>
</UL>
<H3><A NAME="ElectronicMailClients">Electronic Mail Clients</A>
</H3>
<P>
Electronic mail (e-mail) clients are the most common form of MAPI
application. An e-mail client allows end-users direct access to
the MAPI services supported by the back-end service provider.
Figure 3.5 shows the Microsoft Exchange electronic mail client.
<P>
<A HREF="f3-5.gif" ><B>Figure 3.5 : </B><I>The Microsoft Exchange Mail Client.</I></A>
<P>
Typical services provided by a MAPI e-mail client include
<UL>
<LI><FONT COLOR=#000000>Message service logon and logoff</FONT>
<LI><FONT COLOR=#000000>Reading, creating, and deleting text messages</FONT>
<LI><FONT COLOR=#000000>Adding and deleting binary file message
attachments</FONT>
<LI><FONT COLOR=#000000>Addressing and transporting completed
messages</FONT>
</UL>
<P>
Electronic mail clients can also provide additional services to
make it easy to manipulate, store, and retrieve text messages
and binary file attachments. Electronic mail clients may also
have additional features for addressing and transporting messages,
including the use of defined mailing lists and the capability
to address messages as cc (courtesy copies) or Bcc (blind courtesy
copies).
<H3><A NAME="MessageAwareApplications">Message-Aware Applications</A>
</H3>
<P>
Message-aware applications are non-MAPI programs that allow users
access to MAPI services. Typically, this access is implemented
through the addition of a send option in a menu or button bar.
Figure 3.6 shows the Microsoft Word 95 main menu with the <TT><FONT FACE="Courier">Send</FONT></TT>
menu item highlighted.
<P>
<A HREF="f3-6.gif" ><B>Figure 3.6 : </B><I>Microsoft Word 95 is a message-aware application.</I></A>
<P>
Message-aware applications usually treat e-mail services just
like any other storage or output location, such as disk drives,
printers, or modems. In these cases, the ability to send the standard
output as an electronic mail message is an added feature for the
application. As MAPI services become a standard part of the Windows
operating system, message-aware applications will become the norm
instead of the exception.
<H3><A NAME="MessageEnabledApplications">Message-Enabled Applications</A>
</H3>
<P>
The last category of MAPI applications is message-enabled applications.
Message-enabled applications are programs that offer message services
as a fundamental feature. While message-aware applications provide
message services as an additional feature and can operate well
without them, message-enabled applications are specifically designed
to use message services and most will not run properly unless
message services are available on the workstation.
<P>
Here are some examples of message-enabled applications:
<UL>
<LI><I>Computerized service dispatch</I>-Customer calls are handled
by representatives at pc workstations where they fill out data
entry forms outlining the repair needs and the location of the
service call. When the data entry is complete, the program analyzes
the information and, based on the parts needed and the service
location, routes an instant electronic message containing the
service request and a list of needed parts to the repair office
nearest to the customer.
<LI><I>Online software registration</I>-When a user installs a
new software package, part of the installation process includes
an online registration form that already contains the unique software
registration code along with a data entry form for the user to
complete. Once the form is completed, the results are placed in
the user's e-mail outbox to be sent directly to the software company
to confirm the user's software registration.
<LI><I>End-user support services</I>-When network end-users have
a question about a software package or need to report a problem
with their workstation or the network, they call up a data entry
form prompting them to state the nature of the problem. This program
will also automatically load the user's system control files and
add them as attachments to the incident report. Once the form
is complete, it is sent (along with the attachments) to the appropriate
network administrator for prompt action.
</UL>
<P>
It is important to note that, in some cases, users of message-enabled
applications may not even be aware that they are using the e-mail
system as part of their application. MAPI services define properties
and methods for logging users in and out of the message server
without using on-screen prompts. MAPI also provides options for
addressing and sending messages without the use of on-screen prompts
or user confirmation. By using these features of MAPI services,
you can design a program that starts a message session, reads
mail, composes replies, addresses the new mail, and sends it to
the addressee without ever asking the user for input.
<H3><A NAME="OtherTypesofMessageApplications">Other Types of Message
Applications</A></H3>
<P>
There are two more types of message-enabled applications that
deserve comment here. These two application types are
<UL>
<LI><FONT COLOR=#000000>Electronic forms applications</FONT>
<LI><FONT COLOR=#000000>Message-driven applications</FONT>
</UL>
<P>
<I>Electronic forms</I> applications display a data entry screen
that contains one or more data fields for the user to complete.
These data fields act as full-fledged windows controls and can
support all the events normally supported by Windows data entry
forms. Once the form is completed, the data, along with additional
control information, is sent to the addressee through MAPI services.
When the addressee opens the new mail, the same formatted data
entry form appears with the fields filled in (see Figure 3.7).
<P>
<A HREF="f3-7.gif" ><B>Figure 3.7 : </B><I>The filled-in electronic form.</I></A>
<P>
The <I>message-driven</I> application looks for data contained
in a message and acts based on the data it finds. Message-driven
applications can use any aspect of the message as control information
for taking action. Message-driven applications can inspect the
message body or subject line for important words or phrases, check
the sender's name or the date and time the message was sent, or
even scan attachments for important data. These applications can
then use the data to forward messages to another person automatically,
to set alerts to notify the user of important messages, or to
start other programs or processes at the workstation.
<P>
Below are some examples of message-driven applications:
<UL>
<LI><I>Message filtering agent</I>-Users can enter a list of important
keywords into a list box. This list is used to scan all incoming
text messages automatically. If the message contains one or more
of the keywords, the user is notified immediately that an important
message has arrived. Users could also set values to scan for the
message sender's name. For example, if the message came from the
user's boss, an alert could sound to warn the user that an urgent
message has arrived. The same technique can be used to automatically
forward specific messages when the user is away on a trip.
<LI><I>File transfer database update application</I>-This program
could be used by outlying sales offices to update a central database
automatically. Each day the remote offices would enter sales figures
in a database, then attach the binary database file to an e-mail
message, and send the message to the corporate headquarters. There,
a special workstation (logged in as the addressee for all sales
database updates) would receive the message and automatically
run a program that takes the binary database file and merges it
into the central database. This same program could then provide
summary data back to the remote offices to keep them up to date
on their progress.
<LI><I>Electronic database search tool</I>-Many companies have
large libraries of information on clients, products, company regulations,
policies and procedures, and so on. Often users would like to
run a search of the information but don't have time to physically
visit the library and pour through thousands of pages in search
of related items. If the information is kept in online databases,
users at any location around the world could formulate a set of
search criteria to apply against the databases and then submit
these queries, via MAPI messages, to one or more workstations
dedicated to performing searches. After the search is completed,
the resulting data set could be returned to the user who requested
the data.
</UL>
<P>
Filtering agents, remote update routines, and long-distance search
tools are all examples of how MAPI services can be used to extend
the reach of the local workstation to resources at far-away locations.
The Windows MAPI services provide excellent tools for building
programs that enable users to collect and/or disseminate data
over long distances or to multiple locations. The next several
chapters will explore the details of MAPI architecture, teach
you how to incorporate MAPI services into your programs, and show
you examples of real-life programs that take advantage of Windows
MAPI services.
<H2><A NAME="Summary"><FONT SIZE=5 COLOR=#FF0000>Summary</FONT></A>
</H2>
<P>
In this chapter, you learned that the Messaging Application Programming
Interface (MAPI) is a part of the Windows Open Systems Architecture
(WOSA) model. MAPI is designed to offer three key benefits over
other messaging services:
<UL>
<LI><I>Flexibility</I>-Since MAPI is implemented within the WOSA
model, there are three distinct layers:
<LI>The client layer (the end-user software)
<LI>The MAPI DLL layer (the MAPI service broker)
<LI>The service layer (the actual message service provider)
<LI>Because the MAPI DLL layer acts as the service request broker
between the MAPI client and the MAPI server, you can interchange
servers and clients without having to modify your MAPI software
modules.
<LI><I>Consistency</I>-MAPI services and the methods for accessing
them are the same no matter what vendor you are using to provide
the message services.
<LI><I>Portability</I>-MAPI services are available on all supported
versions of Windows (Win3.11, WFW, WinNT, and Win95). As Microsoft
moves WOSA services to non-Windows platforms, MAPI services will
be available within those operating systems, too.
</UL>
<P>
You also learned the three general types of MAPI messages:
<UL>
<LI><I>Text messages</I>-These are the standard plain ASCII text
messages commonly known as e-mail. Some MAPI service providers
support the use of rich-text formatted messages (for example,
the Microsoft Exchange Mail client).
<LI><I>Formatted documents and binary files</I>-These are word-processing
documents, graphics files, databases, and so on. MAPI enables
you to send these binary files as attachments to the body of a
text message.
<LI><I>Control messages</I>-These are used by operating systems
and specialized batch programs to send information about the operating
system, or send commands to tell remote machines how to process
attached data or run special jobs.
</UL>
<P>
Finally, you learned about the various types of MAPI applications.
These application types are
<UL>
<LI><I>Electronic mail clients</I>-The sole purpose of these programs
is to give users direct access to the available MAPI services
(for example, the Microsoft Mail Exchange client that ships with
Windows 95).
<LI><I>Message-aware applications</I>-These are programs that
provide MAPI services as an added feature. These programs usually
offer users a send button or menu option. The standard output
of the program can then be routed to another location through
MAPI. The <TT><FONT FACE="Courier">Send</FONT></TT> menu option
of Microsoft Word 95 is an example of a message-aware application.
<LI><I>Message-enabled applications</I>-These programs offer MAPI
services as a basic part of their functionality. Usually, message-enabled
applications will not operate properly unless MAPI services are
available to the workstation. Examples of message-enabled applications
include data entry forms that collect data and automatically route
the information to the appropriate e-mail address, sometimes without
asking the user for MAPI logons or addresses.
</UL>
<P>
Two more application types reviewed in this chapter are
<UL>
<LI><I>Electronic forms applications</I>-These programs are fully
functional data entry forms that are MAPI-enabled. Users treat
the form like any Windows program. Once the data entry is completed
and the form sent, the addressee can open the message and see
the same data form.
<LI><I>Message-driven applications</I>-These are programs that
can inspect portions of the message (body, header, attachments)
and perform requested actions based on the contents of the message
parts. Examples of message-driven applications include e-mail
filtering agents, file transfer and update routines, and long-distance
data search and retrieval programs.
</UL>
<P>
Now that you know the common types of MAPI messages and applications,
it's time to review the details of MAPI architecture. That is
the subject of the next chapter.
<P>
<HR WIDTH="100%"></P>

<CENTER><P><A HREF="ch2.htm"><IMG SRC="pc.gif" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="#CONTENTS"><IMG SRC="cc.gif" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="index.htm"><IMG SRC="hb.gif" BORDER=0 HEIGHT=88 WIDTH=140></A><A HREF="ch4.htm"><IMG 
SRC="nc.gif" BORDER=0 HEIGHT=88 WIDTH=140></A></P></CENTER>

<P>
<HR WIDTH="100%"></P>


<layer src="http://www.spidersoft.com/ads/bwz468_60.htm" visibility=hidden id=a1 width=600 onload="moveToAbsolute(ad1.pageX,ad1.pageY); a1.clip.height=60;visibility='show';"></layer>
</BODY>
</HTML>

⌨️ 快捷键说明

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