Character Information

Agent Control DLL Source-Code

 

 

 

 

Agent Control DLL 

 

Agent Control DLL is library that makes simple, as it can be, to use Microsoft Agent in your own applications. It is easy to distribute library along with your application because it takes approximately 100 KB of disk space and supports all operating systems, except for the oldest – Windows NT 3.x and Windows 3.x platforms. Agent Control DLL is developed for Microsoft Visual Basic programmers who want to use Microsoft Agent as the assistant in their own applications.

 

This help file will guide you through all aspects of Agent Control DLL library.

 

Agent Control DLL 1.03

Copyright © Martins Skujenieks 2002

 

 

Dependencies

 

The Agent Control DLL uses a number of other libraries and components at runtime. Examine your machine and look for following files:

 

 

If some of the given files are not installed on your machine, go to Microsoft Download Center and download them now!

 

 

Requirements

 

The Agent Control DLL is small application extension itself (only 92 KB) and it requires small amount of system resources. Microsoft Agent characters require extra resources. Here are the common minimal system requirements:

 

 

The common recommended system requirements:

 

·         An additional 1.6 MB free disk space if you plan to use the Lernout & Hauspie® TruVoice Text-to-Speech Engine for speech output

·         An additional 22 MB free disk space if you plan to use the Microsoft Speech Recognition Engine for speech input

·         A Windows-compatible sound card

·         A compatible set of speakers and microphone

 

 

Related Downloads

 

Microsoft Agent and localization support

Microsoft Agent character files

Text-to-Speech engines

SAPI 4.0 runtime support

Speech recognition engines

Speech control panel

Downloads for developers

 

 

Demo Application

 

I have included in this package a fully commented demo program, which shows how to use Agent Control DLL. You can do with the demo program whatever you want, except for distributing it to other persons.

 

Warning! I do not know yet for what reasons but if You will try to create a new agent object when one is already created Visual Basic will crash (at least on my computer it does so) because of an page fault in module OLEOUT32.DLL at 015f:6536b680. Anyway this is not an Agent Control DLL problem, but some unfixed Visual Basic bug. Prove for it is the fact that, if you will repeat the same action with compiled program, it won’t crash.

 

 

Adding the Library to Visual Basic References

 

To add Agent Control DLL to Visual Basic References, follow these instructions:

 

Now the Agent Control DLL library file is added to the Visual Basic References under name “Agent Control DLL”.

 

 

Working with the Library in Visual Basic

 

To link library with your Visual Basic project, open References and select checkbox that points to “Agent Control DLL”. Now, when library is linked to your Visual Basic project, add the following line to one of your project’s modules:

 

Public Agent As New clsAgent

 

Now, when keyword Agent is linked to library’s class module clsAgent, you can call library functions very simply: just type keyword (Agent) and then type dot (“.”). Right after “dot” key-press should open small window with functions linked to Agent keyword (clsAgent class module functions). It should look like this:

 

                       

 

In the window you can see all functions that library contents. Here are the functions and their description:

 

     Create <FILE_NAME>, <LANGUAGE>, <POSITION_X>, <POSITION_Y>

                        Creates the Microsoft Agent character from agent file (*.acs) with specified language and startup position.

                        <FILE_NAME> indicates the full file name and path of the character file to use.

                        <LANGUAGE> indicates the language of the character (English value is &H409).

                        <POSITION_X/Y> indicates the left/top startup position of the agent.

 

     Destroy

                        Destroys (closes) the current Microsoft Agent character.

 

Animate <ANIMATION_NAME>

            Animates the created Microsoft Agent character.

            With attribute <ANIMATION_NAME> indicate the animation to perform.

 

     Speak <TEXT_TO_SPEAK>

                        Makes created Agent character to speak.

Attribute <TEXT_TO_SPEAK> indicates the text to speak.

 

     Think <TEXT_TO_THINK>

                        Makes created Agent character to think.

Attribute <TEXT_TO_THINK> indicates the text to think.

 

     Move <DEST_X>, <DEST_Y>, <MOVE_SPEED>

                        Makes created Agent character to move to specified position with specified speed.

Attribute <DEST_X/Y> indicates the left/top destination position.

<MOVE_SPEED> indicates moving speed (normal is 1).

 

     Message <PROMPT>, <ATTRIBUTES>, <TITLE>

                        Shows agent message box to left from the agent, in same time making agent to animate “suggest” animation.

<PROMPT> indicates the prompt of the message box.

<ATTRIBUTES> indicate the sign and buttons that will be placed on message box (as vbMsgBoxStyle).

<TITLE> indicates the title of the message box.

 

     Listen

                        Makes created Agent character to listen the user input (this option is not tested, because I do not got speech recognition engines installed).

 

 

Agent Control DLL Troubleshooting

 

Agent Control DLL should not troubleshoot in any reason, except for cases, when dependency files are not installed, Windows platform is unsupported or computer does not support minimal system resources. Agent Control DLL is developed that if even there is given incorrect attribute values (i.e. instead of integer is given string), it will continue to work and won’t show any messages about errors.

 

 

 

Character Information

Agent Control DLL Source-Code