All Categories :
ActiveX
Chapter 9
The ActiveX Conferencing API
and
Miscellaneous Topics
This chapter was contributed by James Risser
CONTENTS
In this chapter we will take a brief look at a few Microsoft tools
that fall under or near the ActiveX umbrella:
- The Conferencing API
- NetMeeting, which is an important part of the ActiveX framework
but is currently only available for Windows 95
- ActiveMovie, which provides "streaming" video and
audio components to create multimedia presentations
- ActiveVRML and the DirectX SDK, both of which are fully developed
but somewhat outside the scope of this book
The Conferencing API was demonstrated at the March 1996 Program
Developer's Conference, showing a local user giving control of
its Word application to a remote user over an IP network. This
was an impressive example of what the Conferencing API is intended
to provide-namely, a set of functions that allow a developer to
create applications for real-time communications via the Internet
and similar networks.
The Conferencing API, in conjunction with Microsoft's NetMeeting,
provides the following capabilities:
- The ability to view and illustrate a communal "white
board."
- A way to communicate with others through audio.
- Conversing via a Chat function similar to Internet Relay Chat.
- The ability to transfer files from within the application
to any other user on the conference "call."
- The ability to share/edit programs that are active on another
participant's desktop.
Just above, we used the word call to refer to a conference
session. Call is a good choice because it enforces the
notion that the Conferencing API supports the conversion of the
desktop into a virtual telephone. Users can share audio and video
in real time, with the power of extensibility and programmability.
To extend the analogy, a telephone-like interface-NetMeeting-is
being used to meet these ambitious multimedia goals, which seemed
so difficult in the 1980s and early 1990s. See Figure 9.1.
Figure 9.1 : NetMeeting's main window.
The potential for this sort of conferencing power, like all new
technology, will continue to develop as it becomes more commonplace.
It's easy to visualize right now, however, many important applications
for this new conferencing technology. Let's consider a few examples.
Your Internet browser or word processor could have a toolbar button
that would launch a connection between the user and the software
support team for that particular product. Such a tool would significantly
improve the efficiency of software customer service (well, assuming
the support department answers the call!). The technician would
be able to have the user start up a diagnostic program on their
PC. The technician could read the results and possibly make the
necessary changes to the user's files in real time, fixing the
problem instantly. If the problem is a corrupted file, the technician
could send a replacement using the file-transfer.
A new HTML tag could be introduced, allowing user-created links
on Web pages. The person looking at the page could click on a
link that begins a conference with the page author about any number
of topics, from the contents of the page, to a price for the product
being sold on the page, to more detailed information on the product,
or just the weather or the meaning of life in general.
A group of attorneys and their staff could work on a time-critical
financing document in a virtual conference room. Changes could
be discussed via the audio connection, while one assistant keeps
track of the conversation with the Chat function and another makes
changes to the terms of the document-all in real time. Once the
changes are made, the file can be shared by each participant.
Additional changes can be discussed and revisions made until all
participants are satisfied and have signed off on the document.
The document could then be transferred to a regulatory agency's
bulletin board for approval of the financing. The same file can
be transmitted from the attorneys to the financial printer for
production and distribution to the investment community.
Educational programs such as New York University's innovative
Virtual College program would be able to integrate these technologies
into their curricula. Virtual classrooms would not have to consider
the exigencies of their load on an internal network. With this
conferencing technology, their pool of students could be extended
to accommodate anyone on the Internet who met admissions requirements.
There would be less expense for students having to use proprietary
software in order to participate in the class, and less of a burden
on the school to support their internal network.
NetMeeting is now in release 1.0 and is considered a beta product.
NetMeeting 1.0 is included with the most recent version of Internet
Explorer 3.0 as an available option when the user does a full
installation. In this next section we will take a look at a typical
NetMeeting conference and some of the product's current capabilities.
Once NetMeeting is loaded, setting up a conference is quite simple.
You begin by locating the people you want to have in the
conference, by utilizing the User Location Service created by
Microsoft. Start NetMeeting on your desktop and you'll be connected
to uls.microsoft.com. This is the server that contains information
on all users currently on the Internet and available for a conference.
Click on Call | Directory in the opening NetMeeting screen, and
you get connected to the list of available participants (Figure
9.2). You click on each person you want to add to the conference.
Figure 9.2 : The NetMeeting Directory window.
From here you can start the conference. It can include any combination
of the following features: program sharing and document editing,
the Whiteboard, real-time voice communication, file transfer,
and the Chat function.
Program Sharing and Document Editing
The conferee wanting to share any desktop programs must start
them on his or her desktop, and then click Tools | Share Program.
The document or application to be shared can then be opened by
one of the participants. That user would be able to edit the shared
document, and the other users would see the edits in progress.
Each user would have the chance to edit the document in turn,
if the person opening the document has chosen to share it with
the other participants. Only one user at a time has control of
the keyboard and mouse, but all users can view the document as
it is being edited.
The user starting up the program is the one who controls whether
or not a document is shared. To restrict others from making changes,
the controlling user clicks Tools | Work Alone. Otherwise, if
one conferee wants to take control of the document, they simply
click on Tools | Take Control.
The Whiteboard
Think of the Whiteboard as a kind of multipage drawing program,
with full cut-and-paste capabilities and a highlighting tool for
emphasizing portions of the Whiteboard's contents. The Whiteboard
component of NetMeeting is very similar to Microsoft's Paint accessory.
Figure 9.3 shows a snapshot of a Whiteboard that was created during
a conference. It has an embedded Excel graph created from a spreadsheet.
You can see that we have used the Whiteboard editing features
to annotate the chart.
Figure 9.3 : NetMeeting's Whiteboard with an embedded
Excel graph created from a spreadsheet.
Real-Time Voice Communication
This feature enables participants to speak to one another during
the conference. Of course, each participant needs a sound card,
a microphone, and speakers.
Conferees will be more productive if each has the ability for
bi-directional audio communication. Naturally, bi-directional
hardware is more expensive, but if you plan to use NetMeeting's
audio features often, you will do well to put money into better
hardware at the beginning. Otherwise, with unidirectional communication,
only one conferee can speak at a time. Although this may have
certain benefits, it is quite annoying-especially in a conference
of more than three or four people.
Figure 9.4 gives you a look at the Auto Tuning Wizard for making
adjustments to your audio while in a NetMeeting conference.
Figure 9.4 : The NetMeeting Audio Wizard.
File Transfer
File transfer is handled behind the scenes, so that the sender
and receiver of the file do not have to drop out of the group
discussion while the file is being transmitted.
The sender chooses the file to be sent to the receiver, who is
notified via a message box that someone is attempting to send
a file. As you can see in Figure 9.5, there is a status bar to
indicate the progress of the file transfer. The receiver can decline
the transfer by pressing the appropriate command button. Once
the file has been received, the receiver gets a message box notification
to this effect.
Figure 9.5 : NetMeeting's file reception notification
message box.
The Chat Function
NetMeeting's Chat facility (Figure 9.6) will be familiar to anyone
who has used Internet Relay Chat (IRC) or any of the similar functions
so popular on on-line services such as CompuServe or America Online.
The Chat function is not only for conversations among participants,
but can also be used to keep notes of the verbal aspects of the
meeting.
Figure 9.6 : NetMeeting's Chat window.
In a NetMeeting conference, you cannot type anything in the Chat
window while someone else has control over an application running
on your desktop. As you click away at your mouse, it does no good.
There is no way to tell the person in control of your desktop
to give you a minute to "say" something in the Chat
screen. You can avoid this very frustrating experience by using
the Work Alone mode while you are in Chat.
NOTE |
At the end of the Chat session, any or all of the participants can save the communication as a file. This is especially helpful for keeping a record of complicated instructions or task assignments discussed during the meeting. Keep in mind, however, that your words can thus become a transcript kept on someone's hard drive. Be careful of what you say. The same rules of behavior in e-mail should be followed in Chat. You never know where the file may end up.
|
The ActiveX Conferencing SDK is available from Microsoft's Web
site at
http://www.microsoft.com/intdev/msconf/
In order to use the SDK, you must also install Microsoft NetMeeting
(which can also be downloaded from this Web site).
NOTE |
As of this writing, NetMeeting and the SDK are only available for Windows 95 (which caused at least one of this book's authors some degree of frustration).
|
Once the SDK is installed, you'll be able to work with the nine
APIs that come with it, create applications, and then test them
using NetMeeting. The documentation included with the SDK has
full descriptions of each function. We'll list them here with
brief summaries of their roles, and leave the more thorough study
up to you.
For a much more thorough technical treatment of the syntax and
the usage of these APIs and their several accompanying functions,
see the SDK's help file.
ConferenceConnect establishes a conference connection between
two systems. It can also be used to establish a new conference
or add another user to an existing conference.
ConferenceDisconnect is used to abort the connection.
ConferenceShareWindow is used to share an application window
with the participants of the conference.
ConferenceGetInfo is used to obtain information about a
conference or the users in the conference.
ConferenceSendFile is used to send a file to one or more
participants in a conference.
ConferencelsWindowShared determines whether the specified
window is to be shared during the conference. It is up to instigator
of the conference to decide what will and will not be shared.
ConferenceSetInfo is used to change conference settings
that are obtained by the ConfereceGetInfo function.
ConferenceSendData is used to send data to participants
in a conference.
ConferenceLaunchRemote informs a remote system it should
attempt to start an application that has been registered. When
a destination node receives this notification, it searches the
registry for a matching GUID. If an application is found, the
remote system attempts to start it, based on the data supplied
when the application was registered.
A natural extension of ActiveX is underway at Microsoft in the
multimedia field. Until recently, multimedia development has been
the almost exclusive domain of the game developer and other sometimes
less playful virtual realists. The multimedia development is dependent
on the family of DirectX technologies. DirectX has its own SDK,
which will be discussed in this chapter.
With the DirectX APIs, the programmer has direct access to the
system's hardware and is able to get the most out of the available
sound and video cards. Optimizing their performance, of course,
results in faster loading of images and the highest possible audio
quality.
The DirectX 2 SDK is available to developers through the Microsoft
Developer's Network CD-ROM distribution. At the time of this writing,
it is also available for download at
http://www.microsoft.com/msdownload/directx2.htm
The SDK is a substantial file: 34MB zipped. If you go the download
route, you'll be offered the choice of downloading it as one large
file or in smaller, more manageable bites. Either way, you'll
end up with a self-extracting executable that, when run, will
create the following material that can be run with Windows95 or
NT:
- A \docs directory containing various Word documents describing
various elements of the SDK. Recommended reading is the dxintro.doc,
which offers a very good introduction to the components of the
Kit. Other documents are available on specific components.
- The \foxbear, \rockem, and \iklowns directories each contain
sample applications written using the DirectX components. These
applications are here, presumably, to show the sort of products
that can be developed using the DirectX SDK. By the way, Foxbear
is a rather odd, must-see "existential cartoon," in
which a bear alternates between chewing on a fox and spitting
it out again.
- The \sdk directory has four subdirectories: \bin, \inc, \lib,
and \samples. The \bin file comprises some sample executable files
that show off quite well the capabilities of the products. In
the \samples subdirectory are all of the readme files for the
Direct3D samples. The \inc directory holds the include files used
by the DirectDraw, DirectPlay, and DirectSound APIs. And \lib
contains the library files for both Visual C++ and Watcom C/C++.
All the sample code from the Kit is in \samples.
DirectDraw
DirectDraw is the composition engine used to perform the functions
that the hardware and software do to present raster images on
the screen. DirectDraw has an extremely efficient technique to
put bitmaps onto the screen: page-flipping, which is a way of
keeping one image in a back buffer surface while the primary buffer
is on the screen. This technology lets you very rapidly "flip"
from the primary image on the screen to the one in the back buffer.
Buffering is used by the Direct3D sample applications in the SDK.
ActiveMovie, for example, utilizes DirectDraw for its composition
services.
DirectDraw looks at the information found in the hardware abstraction
layer (HAL) to determine the capabilities of the existing hardware.
The programmer is thus assured that the program will work with
any hardware device. And if the hardware can't handle what the
software requires, then DirectDraw's hardware emulation (HEL)
kicks in and emulates the missing hardware, so that the program
can be used on machines lacking some of the required hardware
power.
DirectDraw utilizes four of the Component Object Model (COM) interfaces
(see Chapter 3. These interfaces are IDirectDraw, IDirectDrawSurface,
IDirectDrawPallette, and IDirectDrawClipper.
Direct3D
As mentioned just above, Direct3D uses the DirectDraw buffering
system to produce 3-D rendered images. This COM-based API is the
newest of the DirectX family. It continues with the same concept,
giving the developer "device independence" as well as
the best possible performance from the available system's hardware.
There is a distinction made between the high-level retained
mode interface and the low-level immediate mode interface.
The retained mode controls let the user add new functionality
to existing Windows applications. Since this mode contains its
own geometry engines, the developer does not have to develop any.
The immediate mode, on the other hand, does not provide the geometry
engine found in the retained mode, so the management must be handled
directly by the application. Many of the best games have been
developed in DOS and need to be ported to Windows; the immediate
mode allows projects to be ported to Windows much less painfully.
Developers can use their own technologies and still take advantage
of the other DirectX technologies discussed.
Plans are to make the Direct3D technology available for implementation
with NT and Apple Power Macintosh by the end of 1996. This will
give developers the ability to deliver applications to several
platforms simultaneously.
DirectPlay
DirectPlay is primarily designed for use by game developers in
the distribution of their products. With DirectPlay, game players
will be able to interact with their software in a more natural
way. Rather than having to play a game against a computer opponent-or
against no opponent at all-DirectPlay allows on-line games to
be accessed through virtual gaming lobbies. Several potential
players meet and challenge one another to any of the games available
in the "arcade." Although designed for use primarily
by game players, DirectPlay can also be used for other applications
that could use such a direct communication facility.
Each game must be assigned a Global Unique Identifier (GUID) while
the game is being developed, to keep track of the several games
that can be simultaneously available to a group of players. DirectPlay
relies on the functionality of the IDirectPlay COM interface to
create and destroy players, add players to an existing play group,
send messages to particular players during the game, and handle
all other player management events.
DirectSound
With DirectSound, Microsoft supports the audio side of the multimedia
spectrum by introducing the same sort of device independence and
hardware accessibility found in DirectDraw and Direct3D. This
API allows for low-latency mixing and playback of digitally recorded
sound. Hardware acceleration is achieved by, again, allowing the
programmer direct access to the sound device. The sound device
can be queried at run-time to determine the best way of reproducing
the sound for that particular computer. The concept of "buffering"
comes into play here, as well. The primary buffer is primarily
used to mix sounds from the secondary buffers.
DirectInput
The functionality to read the tactile movements produced by analog
and digital joysticks, as well as other devices such as touch
screens, light pens, digitizing tablets, and virtual reality headgear,
is incorporated into an application via the DirectInput API.
ActiveMovie combines the characteristics of ActiveX. It is integrated
into the DirectX technology to allow users to create high-quality
digital video and audio presentations. This is accomplished by
exploiting the video acceleration and sound features of the DirectX
toolkit discussed in the preceding section.
ActiveMovie will eventually replace Microsoft's Video for Windows.
In fact, it has become "standard equipment" beginning
with the final version of Microsoft's Internet Explorer 3.0.
ActiveMovie Streaming Format (.asf)
ActiveMovie is based on the Active Streaming Format (ASF or .asf).
Microsoft is developing this format with the support of dozens
of other software developers. ASF is used to store and transport
multimedia files over the Internet and over corporate intranets.
Its most important feature is real-time downloading of images
and sounds.
Currently, HTML pages with embedded graphics or audio samples
must be completely downloaded before they can be rendered on the
user's desktop. We all know that these pages can take quite a
long time to download. Even on a good day and with a 28.8 connection,
a 30- or 40-second file takes 15 or 20 minutes.
With ASF's synchronization of audio and video that allows for
real-time download of the graphics and audio, the user will almost
immediately begin seeing and hearing the images and sounds. This
has major implications for the developer, who won't be as limited
as to how much "stuff" can be put onto a page. And the
diminishing attention span of the typical Web user, staring at
the hourglass as the page loads, is less of an issue. Instant
"visual candy" becomes more of a reality.
ASF does not replace all other video and audio file formats. Rather,
it can use all of the typical formats to create a "stream"
of images and sounds, URLs and HTML pages, which then get "repackaged"
by the ASF Editor into an .asf file that can be played via the
ActiveMovie viewer.
Keep in mind that the ActiveMovie viewer is not just a stand-alone
viewer; it is in fact one of the family of ActiveX controls that
can be incorporated into applications. In other words, an HTML
page can contain an instance of the ActiveMovie viewer. A page
can incorporate the viewer in the same way it incorporates a command
button or a drop-down list. The ActiveMovie editor can "stream"
all of the popular types of files: .avi, .mpeg audio and video,
and Apple Quick Time Video.
The ActiveMovie Control
To streamline the use of an ActiveMovie file in a Web page, Microsoft
put together an ActiveX control that can be used just like its
other controls. This ActiveMovie control includes some minimal
scripting capabilities for hiding or showing the various functions
in the control. (One feature we'd like to see added is the ability
to jump to any particular frame in an ActiveMovie.) Figure 9.7
is a sample Web page with the Active Movie control.
Figure 9.7 : A Web page with the ActiveMovie control.
Of course, the Web builder will also want to be able to create
the files that can be played on this powerful player. There is
currently a beta version of the ActiveMovie Streaming editor available,
discussed next.
ActiveMovie Streaming Editor
Figure 9.8 illustrates the ActiveMovie Stream Editor, used to
create ASF files. This ASF editor and accompanying sample .asf
files can be downloaded from the following URL:
Figure 9.8 : The ActiveMovie Stream Editor.
The ASF editor is used to create the "stream" of visual
and audio components. Since networks have specific bandwidths,
the ASF editor allows you to save your presentation based upon
the capabilities of the intended network. It doesn't make sense
to play a file optimized for a 28.8 connection if you know it
will be played on a 14.4 or on a T1.
Likewise, you can prepare unique presentations for play on multiple
networks. One presentation could include full-motion video with
a sound interleaf, and the second presentation could be a simpler
slide show with a regular voice-over. The latter might be played
on a more "bandwidth-challenged" network, while the
former could be used on a T3 or T1.
The best thing about creating these customized applications is
that you can optimize an application for 28.8 playback and then
simply resave the same stream optimized for 14.4. You just reduce
the audio quality of the presentation and/or lower the resolution
of the images being used in the presentation. The ASF editor makes
these changes automatically when you determine the bandwidth you'll
be using for a particular file.
Microsoft Media Server
Microsoft is also developing something called Media Server-a kind
of repository for a large number of .asf files that can be served
along a variety of networks. Users could make a secure request
of the server to have a particular file delivered to their computer,
and the Media Server would determine the .asf version that could
be most efficiently sent out along the network. In fact, Microsoft
is using this server today, although they have yet to release
a beta version to the public.
This concept has far-reaching applications. Something similar
will likely be used commercially to develop an interactive television
set-up for on-demand video, once the necessary bandwidth is available
to handle the traffic. In addition, there are significant smaller-scale
applications. One that comes to mind is a repository for training
materials and promotional items on a company's intranet. Schools
could use such a server to store lectures and other educational
material.
ActiveMovie Filters
The data streams that are used to create .asf files are routed
through a series of filters. Software developers can either write
their own filters or use the existing configuration of filter
graphs. As new media formats come about, ActiveMovie will be able
to understand them, given the proper filter that understands the
new format is written and then incorporated into the filter configuration.
ActiveMovie SDK
Available through the Microsoft Developer's Network, the ActiveMovie
SDK includes the ActiveMovie OLE control, sample programs and
documentation, and the ActiveMovie stream filter, which the ActiveMovie
control uses to manage the .asf streams.
The beta release of the ActiveVRML language is due to be ready
sometime in 1996. ActiveVRML is currently under consideration
by the VRML Architecture Group as the prototypical language for
the new VRML 2.0 standard. The Group presented a Request for Proposals
(RFP) in January 1996. One of the six proposals received was Microsoft's
ActiveVRML Specifications.
It is an interesting exercise to paraphrase some of the requirements
presented by the Group in their RFP, in light of what this book
has discussed thus far. It seems that Microsoft's approach with
ActiveX in particular and the COM specification in general make
ActiveVRML a potential winner in the VRML 2.0 "competition."
The goals of the Group as presented in the RFP can be briefly
summarized as follows: to have a language that performs well most
of the time, with fast frame rates that retain high image quality.
Users must be able to write code in the new language by using
a GUI. The code must be reusable and interoperable and must take
advantage of existing network, graphics, and language-based standards.
Applications must have the potential for several users to collaborate
and communicate within the virtual world created. Finally, the
language must be open; the standards and technologies must be
open and available without licensing.
This sounds remarkably similar to what we've been seeing as the
goals of the ActiveX technology. It would seem the Microsoft entry
has a good chance of becoming the standard for VRML.
We've had a lot of fun presenting the ActiveX technologies to
you and now want to spend a little time at the end of our book
musing over the future of the Internet.
Recent events have ushered in two buzzwords that seem to mean
distributed programming for the masses: Java and ActiveX.
Java is a programming language, however, and ActiveX as
we know it is a broader notion from Microsoft. ActiveX comprises
the DCOM specification, OCXs, scripting languages (VBScript),
and full-blown object-flavored languages (VC++) as development
tools.
Critics attack ActiveX as Microsoft's attempt to take over the
Internet, just as the Windows technology has captured a huge piece
of the market on the desktop. Some would question Microsoft's
sincerity to port ActiveX technologies, particularly to all the
flavors of UNIX. Microsoft has responded that their entry in this
market is perfectly natural competition. They have followed normal
procedures in submitting their DCOM specifications (and other
specs, such as the SET spec) to the open standards committees.
Further, the company points out, DCOM integrates well with Java,
allowing developers to use Java bytecode with native code hooks.
Microsoft will also promote the new code signing initiatives (see
Chapter 8 as a security model.
One thing is certain: The "consumer" (whether hobbyist
or entrepreneur) sitting at the PC screen at home or at work is
the big winner in the distributed application "wars."
As competition heats up among the UNIX vendors and Microsoft,
the end user will see greatly enhanced security, a merging of
best-of-breed architectures, and an interesting set of next-generation
products, as software houses begin to port ActiveX technologies
to new platforms.
In short, there may be no war at all, but rather a glorious peace.
We may see an environment where UNIX and MS-Windows programmers
alike produce interoperable, distributed application solutions
that go across the wire quickly and efficiently. The winning applications
will be those with a good design and a good choice of underlying
fundamental data structures, just like the good old mainframe
days!