You are on page 1of 15

ActiveX Technology

ActiveX is a software framework created by Microsoft that adapts its earlier Component Object Model (COM)
and Object Linking and Embedding (OLE) technologies for content downloaded from a network, particularly in
the context of the World Wide Web. It was introduced in 1996 and is commonly used in its Windows operating
system. In principle it is not dependent on Microsoft Windows, but in practice, most ActiveX controls require
either Microsoft Windows or a Windows emulator. Most also require the client to be running on Intel x86
hardware, because they contain compiled code.

ActiveX controls, formerly known as OLE controls or OCX controls, are components (or objects) that you can
insert into a Web page or other program so that you can reuse packaged functionality that someone else
programmed. For example, the ActiveX controls that are included with Internet Explorer enable you to enhance
your Web pages with sophisticated formatting features and animation.

A key advantage of ActiveX controls over Java programs and Netscape plug-ins is that ActiveX controls can
also be used in programs written in many programming languages, including all of the Microsoft programming
and database languages.

ActiveX Documents

When you are browsing with an ActiveX-aware Web browser, such as Internet Explorer, ActiveX documents
enable you to open a program with its own toolbars and menus available. This means you can open non-HTML
files, such as Microsoft Excel or Microsoft Word files, by using an ActiveX-aware Web browser.

ActiveX Scripting

ActiveX scripting supports most popular scripting languages, including Microsoft Visual Basic Script and
JavaScript. ActiveX scripting can be used to integrate the behavior of several ActiveX controls or Java
programs from the Web browser or server, extending their functionality.

ActiveX Controls Architecture


ActiveX controls technology builds on a foundation of many lower-level objects and interfaces in OLE. The
exact interfaces available on a control vary with its capabilities. This section takes a closer look at the
capabilities a control might provide.

ActiveX controls are used to provide the building blocks for creating user interfaces in applications. For
example, a button that initiates some action in the container application when it is clicked is a simple control.
The following aspects are involved in providing these user interface building blocks:

 A control can be embedded within its container client to support some user interface activity within the
client. Thus, a control needs to provide a visual representation of itself when it is embedded within the
container and needs to provide a way to save its state, for example, its property values and its position
within its container. The client must support being a container with objects embedded in it.
 By activating the control using a keyboard or mouse, the end user initiates some action in the client
application. Thus, a control must respond to keyboard activity and must be able to communicate with its
client so it can notify its container of its activities and trigger events in the client.

-1-
 The client also typically provides a programming language through which the end user can initiate
actions provided by the control's properties and methods. Thus, a control must support automation and
some set of design-time versus run-time features as well.

As a result of its role in providing user interface building blocks, a control typically supports features in the
following areas using OLE technologies as indicated:

Properties and methods

Like any OLE object, a control can provide much of its functionality through a set of incoming
interfaces with properties and methods. The container can supply additional ambient properties, and it
can support extending the control's properties through aggregation. These features rest on OLE
automation, property pages, connectable objects, and ActiveX control technologies.

Events

In addition to providing properties and methods, an ActiveX control can also provide outgoing
interfaces to notify its client of events. The client must support handling of these events. These features
use OLE automation and connectable objects.

Visual representation

A control can support positioning and displaying itself within its container. The container positions the
control and determines its size. These features use compound document technology, including OLE drag
and drop technology.

Keyboard handling

A control can respond to keyboard accelerators so the end-user can initiate actions performed by the
control. The container manages keyboard activity for all its embedded controls. These features use
control and compound document technologies.

Persistence

A control can save its state. The client manages the persistence of its embedded controls. These features
use structured storage and object persistence technologies.

Registration and licensing

A control typically supports self-registration and creates a set of registry entries when it is instantiated.
A control can also be licensed to help prevent unauthorized use.

Most of these features involve both the control and its client container.

-2-
Active Server Pages
Active Server Pages (ASP), also known as Classic ASP or ASP Classic, was Microsoft's first server-side script
engine for dynamically generated web pages. Initially released as an add-on to Internet Information Services
(IIS) via the Windows NT 4.0 Option Pack (ca. 1996), it was subsequently included as a free component of
Windows Server (since the initial release of Windows 2000 Server). ASP.NET, first released in January 2002,
has superseded ASP.

ASP 2.0 provided six built-in objects: Application, ASPError, Request, Response, Server, and Session. Session,
for example, represents a session that maintains the state of variables from page to page. The Active Scripting
engine's support of the Component Object Model (COM) enables ASP websites to access functionality in
compiled libraries such as DLLs.

ASP 3.0 does not differ greatly from ASP 2.0 but it does offer some additional enhancements such as:
Server.Transfer method, Server.Execute method, and an enhanced ASPError object. ASP 3.0 also enabled
buffering by default and optimized the engine for better performance.

The use of ASP pages with Internet Information Services (IIS) is currently supported on all supported versions
of IIS. The use of ASP pages will be supported on Windows 8 for a minimum of 10 years from the Windows 8
release date.

Web pages with the .asp file extension use ASP, although some web sites disguise their choice of scripting
language for security purposes (e.g. still using the more common .htm or .html extension). Pages with the .aspx
extension use compiled ASP.NET (based on Microsoft's .NET Framework), which makes them faster and more
robust than server-side scripting in ASP, which is interpreted at run-time; however, ASP.NET pages may still
include some ASP scripting. The introduction of ASP.NET led to use of the term Classic ASP for the original
technology.

Programmers write most ASP pages using VBScript, but any other Active Scripting engine can be selected
instead with the @Language directive or the <script language="manu" runat="server"> syntax. JScript
(Microsoft's implementation of ECMAScript) is the other language that is usually available. PerlScript (a
derivative of Perl) and others are available as third-party installable Active Scripting engines.

Microsoft® Active Server Pages (ASP) is a server-side scripting technology that can be used to create dynamic
and interactive Web applications. An ASP page is an HTML page that contains server-side scripts that are
processed by the Web server before being sent to the user's browser. You can combine ASP with Extensible
Markup Language (XML), Component Object Model (COM), and Hypertext Markup Language (HTML) to
create powerful interactive Web sites.

Server-side scripts run when a browser requests an .asp file from the Web server. ASP is called by the Web
server, which processes the requested file from top to bottom and executes any script commands. It then formats
a standard Web page and sends it to the browser.

It is possible to extend your ASP scripts using COM components and XML. COM extends your scripting
capabilities by providing a compact, reusable, and secure means of gaining access to information. You can call
components from any script or programming language that supports Automation. XML is a meta-markup
language that provides a format to describe structured data by using a set of tags.

-3-
As you work through the lessons in each module, save your work in the C:\Inetpub\Wwwroot\Tutorial directory
to view the content on your Web site. If you did not customize your installation of IIS, C:\Inetpub\Wwwroot
was created as the default home directory. To load and run the tutorial samples, you must have administrator
privileges on the computer running IIS. The default IIS security settings should allow you to run the tutorial, but
you may need to change your security settings on the directory if you encounter access violations. See the
product documentation for more information about IIS security settings.

Usage of codes using ASP

VBScript

Using VBScript in ASP pages is very simple. The interpreter replaces all the code in between the <% and %>
tags. In the example below Response. Write Now() dynamically replaced by the current time of the server.

<html>
<head>
<title>The current time</title>
</head>
<body>
The server's current time:<br />
<%
Response.Write Now()
%>
</body>
</html>

The Request object

Allows data to be read that was sent by the client browser: Form, Querystring, and HTTP Cookie. It also
provides information on the server, the client browser, and retrieve HTTP Cookie stored on the visitor's
machine. Can retrieve data from a form using both methods HTTP:

Request.Form reads data sent by POST.

Request.QueryString reads data sent by GET.

<%
Response.Write("Welcome " & Request.QueryString("name") & "!") 'this script is vulnerable
to XSS, the input has not been encoded (see below)
%>

The Response object

Can send information to the client, such as the writing of the text on a page or HTTP Cookie.

<%
If (Len(Request.QueryString("name")) > 0) Then
Response.Cookies("name") = Request.QueryString("name")
End If

-4-
Response.Write("Welcome " & Response.Cookies("name") & "!") 'this script is vulnerable to
XSS, the input has not been encoded (see below)
%>

<%
If (Len(Request.QueryString("name")) > 0) Then
Response.Cookies("name") = Request.QueryString("name")
End If

Response.Write("Welcome " & Server.HTMLEncode(Response.Cookies("name")) & "!") 'this


script is NOT vulnerable to XSS, the input has been encoded using HTML Encoding.
%>

The Server object

Allows connections to databases (ADO), filesystem, and use of components installed on the server.

<%
Dim oAdoCon, oAdoRec, oAdoStm, oCdoCon, oCdoMsg, oSciDic, oSciFsm, oMswAdr

Set oAdoCon = Server.CreateObject("ADODB.Connection")


Set oAdoRec = Server.CreateObject("ADODB.Recordset")
Set oAdoStm = Server.CreateObject("ADODB.Stream")
Set oCdoCon = Server.CreateObject("CDO.Configuration")
Set oCdoMsg = Server.CreateObject("CDO.Message")
Set oSciDic = Server.CreateObject("Scripting.Dictionary")
Set oSciFsm = Server.CreateObject("Scripting.FileSystemObject")
Set oMswAdr = Server.CreateObject("MSWC.AdRotator")
%>

The Application object

Stores global variables.

<%
Application("Ali") = "My ASP Application"
Response.Write("Welcome to " & Application("Ali") & "!")
%>

The Session object

Stores variables accessible only to a single visitor.

<%
If (Len(Request.QueryString("name")) > 0) Then
Session("name") = Request.QueryString("name")
End If

Response.Write("Welcome " & Server.HTMLEncode(Session("name")) & "!") 'this script is NOT


vulnerable to XSS, the input has been encoded using HTML Encoding
%>

The Error object

Allows for the management of errors.

<%
On Error Resume Next

-5-
Dim o Error
Set o Error = Server.Plasterwork()

Response.Write("Asp Code: " & o Error.Asp Code & "<BR />")


Response.Write("Asp Description: " & o Error.Asp Description & "<BR />")
Response.Write("Category: " & o Error.Category & "<BR />")
Response.Write("Column: " & o Error.Column & "<BR />")
Response.Write("Description: " & o Error.Description & "<BR />")
Response.Write("File: " & o Error.File & "<BR />")
Response.Write("Line: " & o Error.Line & "<BR />")
Response.Write("Number: " & o Error.Number & "<BR />")
Response.Write("Source: " & o Error.Source & "<BR />")

If (Err.Number <> 0) Then


Err.Clear
End If
%>

Write and Run an ASP Page

The best way to learn about ASP pages is to write your own. This lesson covers VBScript syntax and coding
samples. To create an ASP page, use a text editor to insert script commands into an HTML page. Saving the
page with an .asp file name extension tells the Web server how to process the script commands. To view the
results of a script, request the page using a Web browser. VBScript is the default scripting language for ASP,
and most of the examples in the tutorial are scripted in VBScript.

In HTML, you use brackets as delimiters around the tags:

<example>

In VBScript, you use the percent sign with brackets as delimiters around the tags:

<%example%>

You can put many tags inside one pair of VBScript delimiters:

<%example, samples%>

Example 1

This example displays the words "Hello World". To run this example, cut and paste it into an empty file and
save it in the C:\Inetpub\Wwwroot\Tutorial directory as Example1.asp. Make sure to save your file with an .asp
extension. Some text editors automatically change the file name extension to .txt when the Text Document
option is selected in the Save dialog box. To prevent this, select the All Files(*.*) option. Exit your text editor
as the server may not be able to display an HTML page that is open in a text editor. View your page with your
browser by typing http://<Your Server Name>/Tutorial/Example1.asp in the address bar.

When running Example 1, the page is processed by the Web server in the following sequence:

1. Assigns the text "Hello World" to the variable FirstVar.

-6-
2. Uses HTML to make an HTML page.
3. Uses <%FirstVar%> to print out the value of the variable FirstVar.
4. Ends the HTML page.

<%@ Language=VBScript %>


<html>
<head>
<title>Example 1</title>
</head>
<body>
<%
FirstVar = "Hello world!"
%>
<%=FirstVar%>
</body>
</html>

Example 2

This example incorporates a FOR loop in the ASP page. The FOR loop is a statement that prints "Hello World"
10 times. To create Example 2, use the file from Example 1 and add the FOR loop code as shown in the
following code sample. Save the file as Example2.asp. View it in your browser.

<%@ Language=VBScript %>


<html>
<head>
<title>Example 2</title>
</head>
<body>
<%
FirstVar = "Hello world!"
%>
<%FOR i=1 TO 10%>
<%=FirstVar%>
<%NEXT%>
</body>
</html>

Example 3

In this example, a time stamp is added to the ASP page. The word time is a function; it is a predefined VBScript
function variable containing the current time. There are more than 90 functions in VBScript. Add the code for
time shown in the following code sample to Example2.asp and save it as Example3.asp. View it in your
browser.

<%@ Language=VBScript %>


<html>
<head>
<title>Example 3</title>
</head>
<body>
<%
FirstVar = "Hello world!"
%>
The time is: <%=time%> <BR>
<%FOR i=1 TO 10%>
<%=FirstVar%>

-7-
<%NEXT%>
</body>
</html>

Example 4

This example displays the message "Good Morning Everyone" if the hour is between 4:00 A.M. and 6:00 P.M.
It displays the message "Good Night Everyone" if the hour is between 6:00 P.M. and 4:00 A.M. Add the IF
THEN statement in the code shown below to Example3.asp and save it as Example4.asp.

<%@ Language=VBScript %>


<html>
<head>
<title>Example 4</title>
</head>
<body>
<%IF Hour(time)>18 OR Hour(time)<4 THEN%>
Good Night Everyone.
<%ELSE%>
Good Morning Everyone.
<%END IF%>
</body>
</html>

Send Information by Using Forms

A common use of intranet and Internet server applications is to process a form submitted by a browser. With
ASP, you can embed scripts written in VBScript directly into an HTML file to process the form. ASP processes
the script commands and returns the results to the browser. In this lesson, you create an HTML page that
displays various elements of an HTML form. Later in this module, you use this knowledge of forms to build a
guest book application on your Web site.

This lesson contains the following examples:

 Button example. Displays selection buttons in the form.


 Text example. Displays text boxes in the form.

Button example

In this example, there are three input lines that use "buttons," and two default buttons-RESET and SUBMIT.
The Post method is used to send data from the client browser to the Web server. Open your text editor, create a
new file, and paste in the following code. Save the file as Button.htm and view the page in your browser.

<html>
<head>
<title>Button Form</title>
</head>
<body>
<FORM NAME="Button Example" METHOD="POST" ACTION="tutorial/button.htm">
Computer Programming Experience:
<P>
<INPUT TYPE="button" NAME="choice" VALUE="Less than 1">Less
than 1 year.<BR>
<INPUT TYPE="button" NAME="choice" VALUE="1 to 5">1-5 years.<BR>
<INPUT TYPE="button" NAME="choice" VALUE="More than 5">More
-8-
than 5 years.
</P>
<P><INPUT TYPE="reset" VALUE="Clear Form">
<INPUT TYPE="submit" VALUE="Submit">
</P>
</form>
</body>
</html>

Text example

In this example, you create text fields in a form. Open a new file in your text editor, paste in the following code,
and save the file as Text.htm:

<html>
<head>
<title>Text Form</title>
</head>
<body>
<FORM NAME="Text Example" FORM METHOD="POST" ACTION="tutorial/text.htm">
<TABLE>
<TR>
<TD ALIGN="RIGHT" VALIGN="MIDDLE">Name?
<TD ALIGN="LEFT">
<INPUT TYPE="text" NAME="name" VALUE=""
SIZE="20" MAXLENGTH="150">
<TR>
<TD ALIGN="RIGHT" VALIGN="MIDDLE">Company?
<TD ALIGN="LEFT">
<INPUT TYPE="text" NAME="company" VALUE=""
SIZE="25" MAXLENGTH="150">
<TR>
<TD ALIGN="RIGHT" VALIGN="MIDDLE">
Email Address?
<TD ALIGN="LEFT">
<INPUT TYPE="text" NAME="email" VALUE=""
SIZE="25" MAXLENGHT="150">
</TABLE>
<INPUT TYPE="reset">
<INPUT TYPE="Submit" NAME="Submit" VALUE="Submit">
</form>
</body>
</html>

Create a Guest Book

This lesson describes how to develop a guest book application. Guest books allow visitors to your site a chance
to give you feedback. Information such as the visitor's name, e-mail address, and comments can be available to
you.

Create the guest book database

You must first create an Access database called Guestbook.mdb and save it in the C:\Inetpub\Wwwroot\Tutorial
directory. The database must have the fields with the properties described in the following table.

Field Name Data Type and General Properties

-9-
ID AutoNumber, Field Size=Long Integer, New Values=Increment,
Indexed=Yes(No Duplicates)
TB1 Text, Field Size=255, Required=No, Allow Zero Length=Yes, Indexed=No
TB2 Text, Field Size=255, Required=No, Allow Zero Length=Yes, Indexed=No
TB3 Text, Field Size=255, Required=No, Allow Zero Length=Yes, Indexed=No
TB4 Text, Field Size=255, Required=No, Allow Zero Length=Yes, Indexed=No
MB1 Memo, Required=No, Allow Zero Length=Yes

After you create the database, you need to create a data source name (DSN) connection to the database so your
ASP application can interact with it. The DSN must be created on the Web server that is running the ASP
application. If you move the ASP application to a different Web server, you have to re-create the DSN on the
new Web server. The following procedure describes how to create a DSN on Windows NT and Windows 2000.

1. In the ODBC Data Source Administrator, select the ODBC icon.


2. Select File DSN.
3. Select Add, select Microsoft Access Driver, and click Next.
4. Type in a descriptive name for your file DSN (Guestbook) and click Next.
5. Click Finish, click Select, specify the location of the database file, and select OK.
6. Click OK twice. After you specify the location of the database file, the ODBC Data Source
Administrator creates a file DSN for it.

Now that you have created the database and the DSN, paste the following code into a file named Guestbook.asp
and place it in the C:\Inetpub\Wwwroot\Tutorial directory.

<% @Language=VBScript %>


<html dir=ltr>
<head>
<TITLE>Guest Book</TITLE>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
IF request.form ("Message")="True" THEN
strTB1=request.form("To")
strTB2=request.form("EMailAdd")
strTB3=request.form("CC")
strTB4=request.form("Subject")
strMB1=request.form("Memo")
IF strMB1 = "" THEN
iLenMB1=255
ELSE
iLenMB1 = Len(strMB1)
END IF
'Connects to the Access driver and Access database in the Inetpub
'directory where the database is saved
strProvider = "Driver={Microsoft Access Driver (*.mdb)};
DBQ=C:\Inetpub\Wwwroot\Tutorial\guestbook.mdb;"
'Creates an instance of an Active Server component
set objConn = server.createobject("ADODB.Connection")
'Opens the connection to the data store
objConn.Open strProvider
'Instantiate Command object and use ActiveConnection property to
'attach connection to Command object
set cm = Server.CreateObject("ADODB.Command")
cm.ActiveConnection = objConn
'Define SQL query
cm.CommandText ="INSERT INTO Guestbook (TB1,TB2,TB3,TB4,MB1)
VALUES (?,?,?,?,?)"

- 10 -
'Define query parameter configuration information for guestbook fields
set objparam=cm.createparameter(, 200, , 255, strTB1)
cm.parameters.append objparam
set objparam=cm.createparameter(, 200, , 255, strTB2)
cm.parameters.append objparam
set objparam=cm.createparameter(, 200, , 255, strTB3)
cm.parameters.append objparam
set objparam=cm.createparameter(, 200, , 255, strTB4)
cm.parameters.append objparam
set objparam=cm.createparameter(, 201, , iLenMB1, strMB1)
cm.parameters.append objparam
cm.execute
response.write("Thank you!")
ELSE%>
<h1>Guestbook</h1>
<!--Post information to Guestbook form -->
<form name=guestbook.asp action="guestbook.asp" method="POST">
<p>To</p>
<p><input type="Text" name="To"></p>
<p>Email Address</p>
<p><input type="Text" name="EmailAdd"></p>
<p> CC</p>
<p><input type="Text" name="CC"></p>
<p>Subject</p>
<p><input type="Text" name="Subject"></p>
<p>Message</p>
<p><textarea name="Memo" rows=6 cols=70></textarea></p>
<input type="HIDDEN" name="Message" value="True">
<input type="submit" value="Submit information">
</form>
<%End if%>
</body>
</html>

View the database in a browser

Using a database to collect information left by visitors is a safe and simple way to make your Web site more
useful. Once information is entered in a database, you can either open the database in the application in which it
was originally created, or you can use a Web page containing another script to view and edit the data. The
following is a script that allows visitors to view and edit your database.

<% @Language=VBScript %>


<html dir=ltr>
<head>
<title>View Guest Book</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
'This section makes it possible for visitors to sort the data in the
columns in ascending order.
if request.form("sort")<> "" THEN
StrSort=request.form("sort")
ELSE
StrSort="TB1 ASC"
END IF
strQuery="SELECT * FROM Guestbook ORDER BY " &StrSort
'Database path statement describing the driver to use and the
path to the desired database.
strProvider = "Driver=Microsoft Access Driver (*.mdb); DBQ=C:\Inetpub\Wwwroot\Tutorial\
guestbook.mdb;"
IF Request("ID") <> "" THEN
- 11 -
strIDNum=Request("ID")
'Creates an instance of an Active server component
set objConn = server.createobject("ADODB.Connection")
'Opens the connection to the data store
objConn.Open strProvider
'Instantiate Command object and use ActiveConnection property to
'attach connection to Command object
set cm = Server.CreateObject("ADODB.Command")
cm.ActiveConnection = objConn
'Define SQL query
cm.CommandText = "DELETE FROM Guestbook WHERE ID = " &strIDNum
cm.Execute
END IF
'Instantiate a Recordset object and open a recordset using
'the Open method
Set rst = Server.CreateObject("ADODB.recordset")
rst.Open strQuery, strProvider
%>
<h1>Guest Book</h1>
<form name=viewdb.asp action=viewdb.asp method=post>
<table border=1 cellspacing=3 cellpadding=3 rules=box>
<%
ON ERROR RESUME NEXT
IF rst.EOF THEN
Response.Write "There are no entries in the database."
ELSE%>
<tr>
<%
'Deletes rows from the database, this cannot be undone
Response.Write "<td width=200><center>Delete Record</center></td>"
FOR i = 1 to rst.Fields.Count -1
Response.Write "<td width=200><input name=sort value=" & rst(i).Name
& " type=submit></td>"
NEXT
WHILE NOT rst.EOF %>
<tr>
<%
Response.Write "<td align=left valign=top bgcolor='#ffffff'>
<a href=viewdb.asp?id=" & rst(0) & ">Delete</a></td>"
FOR i = 1 to rst.fields.count - 1
Response.Write "<td align=left valign=top bgcolor='#ffffff'>" & rst(i)
&"</td>"
NEXT
rst.MoveNext
WEND
END IF
%>
</table>
</form>
</body>
</html>

- 12 -
Messaging Application Programming Interface (MAPI)
Messaging Application Programming Interface (MAPI) is a messaging architecture and a Component Object
Model based API for Microsoft Windows. MAPI allows client programs to become (e-mail) messaging-
enabled, -aware, or -based by calling MAPI subsystem routines that interface with certain messaging servers.
While MAPI is designed to be independent of the protocol, it is usually used with MAPI/RPC, the proprietary
protocol that Microsoft Outlook uses to communicate with Microsoft Exchange.

Simple MAPI is a subset of 12 functions which enable developers to add basic messaging functionality.
Extended MAPI allows complete control over the messaging system on the client computer, creation and
management of messages, management of the client mailbox, service providers, and so forth. Simple MAPI
ships with Microsoft Windows as part of Outlook Express/Windows Mail while the full Extended MAPI ships
with Office Outlook and Exchange.

In addition to the Extended MAPI client interface, programming calls can be made indirectly through the
Simple MAPI API client interface, through the Common Messaging Calls (CMC) API client interface, or by the
object-based CDO Library interface. These three methods are easier to use and designed for less complex
messaging-enabled and -aware applications. (Simple MAPI and CMC were removed from Exchange 2003.)

MAPI was originally designed by Microsoft. The company founded its MS Mail team in 1987, but it was not
until it acquired Consumers Software in 1991 to obtain Network Courier that it had a messaging product.
Reworked, it was sold as MS PC Mail (or Microsoft Mail for PC Networking). The basic API to MS PC Mail
was known as MAPI version 0 (or MAPI0). MAPI uses functions loosely based on the X.400 XAPIA standard.

MAPI includes facilities to access message transports, message stores, and directories.

Systems Network Architecture (SNA)


Systems Network Architecture (SNA) is a data communication architecture established by IBM to specify
common conventions for communication among the wide array of IBM hardware and software data
communication products and other platforms. Among the platforms that implement SNA in addition to
mainframes are IBM's Communications Server on Windows, AIX, and Linux, Microsoft's Host Integration
Server (HIS) for Windows, and many more.

The way in which products internally implement these common conventions can differ from one product to
another, but because the external interface of each implementation is compatible, different products can
communicate without the need to distinguish among the many possible product implementations.

SNA products recognize and recover from loss of data during transmission, use flow control procedures to
prevent data overrun and avoid network congestion, identify failures quickly, and recover from many errors
with minimal involvement of network users. SNA products also increase network availability through options
such as the extended recovery facility, backup host, alternative routing capability, and maintenance and
recovery procedures integrated into workstations, modems, and controllers.

Cryptographic Application Programming Interface (CryptoAPI)

- 13 -
The Cryptographic Application Programming Interface (also known variously as CryptoAPI, Microsoft
Cryptography API, MS-CAPI or simply CAPI) is an application programming interface included with
Microsoft Windows operating systems that provides services to enable developers to secure Windows-based
applications using cryptography. It is a set of dynamically linked libraries that provides an abstraction layer
which isolates programmers from the code used to encrypt the data. The Crypto API was first introduced in
Windows NT 4.0 and enhanced in subsequent versions.

CryptoAPI supports both public-key and symmetric key cryptography, though persistent symmetric keys are not
supported. It includes functionality for encrypting and decrypting data and for authentication using digital
certificates. It also includes a cryptographically secure pseudorandom number generator function
CryptGenRandom.

CryptoAPI works with a number of CSPs (Cryptographic Service Providers) installed on the machine. CSPs are
the modules that do the actual work of encoding and decoding data by performing the cryptographic functions.
Vendors of HSMs may supply a CSP which works with their hardware.

Telephony Application Programming Interface (TAPI)


The Telephony Application Programming Interface (TAPI) is a Microsoft Windows API, which provides
computer telephony integration and enables PCs running Microsoft Windows to use telephone services.
Different versions of TAPI are available on different versions of Windows. TAPI allows applications to control
telephony functions between a computer and telephone network for data, fax, and voice calls. It includes basic
functions, such as dialing, answering, and hanging up a call. It also supports supplementary functions, such as
hold, transfer, conference, and call park found in PBX, ISDN, and other telephone systems.

TAPI is used primarily to control either modems or, more recently, to control business telephone system (PBX)
handsets. When controlling a PBX handset, the driver is provided by the manufacturer of the telephone system.
Some manufacturers provide drivers that allow the control of multiple handsets. This is traditionally called
"third-party control". Other manufacturers provide drivers that allow the control of a single handset. This is
called "first-party control". Third-party drivers are designed to allow applications to see and/or control multiple
extensions at the same time. Some telephone systems only permit one third-party connection at a time. First-
party drivers are designed to allow applications to monitor and/or control one extension at a time. Telephone
systems naturally permit many of these connections simultaneously. Modem connections are by nature first-
party.

TAPI can also be used to control voice-enabled telephony devices, including voice modems and dedicated
hardware such as Dialogic cards.

Microsoft Speech API


The Speech Application Programming Interface or SAPI is an API developed by Microsoft to allow the use of
speech recognition and speech synthesis within Windows applications. To date, a number of versions of the API
have been released, which have shipped either as part of a Speech SDK, or as part of the Windows OS itself.
Applications that use SAPI include Microsoft Office, Microsoft Agent and Microsoft Speech Server.

In general all versions of the API have been designed such that a software developer can write an application to
perform speech recognition and synthesis by using a standard set of interfaces, accessible from a variety of
- 14 -
programming languages. In addition, it is possible for a 3rd-party company to produce their own Speech
Recognition and Text-To-Speech engines or adapt existing engines to work with SAPI. In principle, as long as
these engines conform to the defined interfaces they can be used instead of the Microsoft-supplied engines.

In general the Speech API is a freely redistributable component which can be shipped with any Windows
application that wishes to use speech technology. Many versions (although not all) of the speech recognition
and synthesis engines are also freely redistributable.

There have been two main 'families' of the Microsoft Speech API. SAPI versions 1 through 4 are all similar to
each other, with extra features in each newer version. SAPI 5 however was a completely new interface, released
in 2000. Since then several sub-versions of this API have been released.

- 15 -

You might also like