Methods in Vtable Order

IAgentNotifySink Description
Command Occurs when the server processes a client-defined command.
ActivateInputState Occurs when a character becomes or ceases to be input-active.
Restart Occurs when the server restarts.
Shutdown Occurs when the user exits the server.
VisibleState Occurs when the character's Visible state changes.
Click Occurs when a character is clicked.
DblClick Occurs when a character is double-clicked.
DragStart Occurs when a user starts dragging a character.
DragComplete Occurs when a user stops dragging a character.
RequestStart Occurs when the server begins processing a Request object.
RequestComplete Occurs when the server completes processing a Request object.
Bookmark Occurs when the server processes a bookmark.
Idle Occurs when the server starts or ends idle processing.
Move Occurs when a character has been moved.
Size Occurs when a character has been resized.
BalloonVisibleState Occurs when the visibility state of a character's word balloon changes.

IAgentNotifySink::ActivateInputState

HRESULT ActivateInputState(
   long dwCharID,   // character ID
   long bActivated  // input activation flag
);                          

Notifies a client application that a character's input active state changed.

dwCharID

Identifier of the character whose input activation state changed.

bActivated

Input active flag. This Boolean value is TRUE if the character referred to by dwCharID became input active; and FALSE if the character lost its input active state.

See also IAgentCharacter::SetInputActive, IAgentCharacter::GetInputActive

IAgentNotifySink:: BalloonVisibleState

HRESULT BalloonVisibleState(
   long dwCharID,  // character ID
   long bVisible   // visibility flag
);                          

Notifies a client application when the visibility state of the character's word balloon changes.

dwCharID

Identifier of the character whose word balloon's visibility state has changed.

bVisible

Visibility flag. This Boolean value is TRUE when character's word balloon becomes visible; and FALSE when it becomes hidden.

This event is sent to all clients of the character.

IAgentNotifySink::Bookmark

HRESULT Bookmark(
   long dwBookMarkID  // bookmark ID
);                          

Notifies a client application when its bookmark completes.

dwBookMarkID

Identifier of the bookmark that resulted in triggering the event.

When you include bookmark tags in a Speak method, you can track when they occur with this event.

See also IAgentCharacter::Speak, Speech Output Tags

IAgentNotifySink::Click

HRESULT Click(
   long dwCharID,  // character ID
   short fwKeys,   // mouse button and modifier key state
   long x,         // x coordinate of mouse pointer
   long y          // y coordinate of mouse pointer
);                          

Notifies a client application when the user clicks a character.

dwCharID

Identifier of the clicked character.

fwKeys

A parameter that indicates the mouse button and modifier key state. The parameter can return any combination of the following:

0x0001 Left Button

0x0010 Middle Button

0x0002 Right Button

0x0004 Shift Key Down

0x0008 Control Key Down

0x0020 Alt Key Down

x

The x-coordinate of the mouse pointer in pixels, relative to the screen origin (upper left).

y

The y-coordinate of the mouse pointer in pixels, relative to the screen origin (upper left).

IAgentNotifySink::Command

HRESULT Command(
   long dwCommandID,         // Command ID of the best match
   IUnknown * punkUserInput  // address of IAgentUserInput object 
);                          

Notifies a client application that a Command was selected by the user.

dwCommandID

Identifier of the best match command alternative.

punkUserInput

Address of the IUnknown interface for the IAgentUserInput object.

Use QueryInterface to retrieve the IAgentUserInput interface.

See also IAgentUserInput

IAgentNotifySink::DblClick

HRESULT DblClick(
   long dwCharID,  // character ID
   short fwKeys,   // mouse button and modifier key state
   long x,         // x coordinate of mouse pointer
   long y          // y coordinate of mouse pointer
);                          

Notifies a client application when the user double-clicks a character.

dwCharID

Identifier of the double-clicked character.

fwKeys

A parameter that indicates the mouse button and modifier key state. The parameter can return any combination of the following:

0x0001 Left Button
0x0010 Middle Button
0x0002 Right Button
0x0004 Shift Key Down
0x0008 Control Key Down
0x0020 Alt Key Down

x

The x-coordinate of the mouse pointer in pixels, relative to the screen origin (upper left).

y

The y-coordinate of the mouse pointer in pixels, relative to the screen origin (upper left).

IAgentNotifySink::DragComplete

HRESULT DragComplete(
   long dwCharID,  // character ID
   short fwKeys,   // mouse button and modifier key state
   long x,         // x-coordinate of mouse pointer
   long y          // y-coordinate of mouse pointer
);                          

Notifies a client application when the user stops dragging a character.

dwCharID

Identifier of the dragged character.

fwKeys

A parameter that indicates the mouse button and modifier key state. The parameter can return any combination of the following:

0x0001 Left Button
0x0010 Middle Button
0x0002 Right Button
0x0004 Shift Key Down
0x0008 Control Key Down
0x0020 Alt Key Down

x

The x-coordinate of the mouse pointer in pixels, relative to the screen origin (upper left).

y

The y-coordinate of the mouse pointer in pixels, relative to the screen origin (upper left).

IAgentNotifySink::DragStart

HRESULT DragStart(
   long dwCharID,  // character ID
   short fwKeys,   // mouse button and modifier key state
   long x,         // x-coordinate of mouse pointer
   long y          // y-coordinate of mouse pointer
);                          

Notifies a client application when the user starts dragging a character.

dwCharID

Identifier of the dragged character.

fwKeys

A parameter that indicates the mouse button and modifier key state. The parameter can return any combination of the following:

0x0001 Left Button
0x0010 Middle Button
0x0002 Right Button
0x0004 Shift Key Down
0x0008 Control Key Down
0x0020 Alt Key Down

x

The x-coordinate of the mouse pointer in pixels, relative to the screen origin (upper left).

y

The y-coordinate of the mouse pointer in pixels, relative to the screen origin (upper left).

IAgentNotifySink::Idle

HRESULT Idle(
   long dwCharID,  // character ID
   long bStart     // start flag
);                          

Notifies a client application when a character's Idling state has changed.

dwCharID

Identifier of the request that started.

bStart

Start flag. This Boolean value is TRUE when the character begins idling and FALSE when it stops idling.

This event enables you to track when the Microsoft Agent server starts or stops idle processing for a character.

See also IAgentCharacter::GetIdleOn, IAgentCharacter::SetIdleOn

IAgentNotifySink:: Move

HRESULT Move(
   long dwCharID,  // character ID
   long x,         // x-coordinate of new location
   long y,         // y-coordinate of new location
   long dwCause    // cause of move state
);                          

Notifies a client application when the character has been moved.

dwCharID

Identifier of the character that has been moved.

x

The x-coordinate of the new position in pixels, relative to the screen origin (upper left). The location of a character is based on the upper left corner of its animation frame.

y

The y-coordinate of the new position in pixels, relative to the screen origin (upper left). The location of a character is based on the upper left corner of its animation frame.

dwCause

The cause of the character move. The parameter may be one of the following:

const unsigned short NeverMoved = 0; Character has not been moved.
const unsigned short UserMoved = 1; User dragged the character.
const unsigned short ProgramMoved = 2; Your application moved the character.
const unsigned short OtherProgramMoved = 3; Another application moved the character.

This event is sent to all clients of the character.

See also IAgentCharacter::GetMoveCause, IAgentCharacter::MoveTo

IAgentNotifySink::RequestComplete

HRESULT RequestComplete(
   long dwRequestID,  // request ID
   long hrStatus      // status code
);                          

Notifies a client application when a request completes.

dwRequestID

Identifier of the request that started.

hrStatus

Status code. This parameters returns the status code for the request.

This event enables you to track when a queued method completes.

See also IAgentNotifySink::RequestStart, IAgent::Load, IAgentCharacter::GestureAt, IAgentCharacter::Hide, IAgentCharacter::Interrupt, IAgentCharacter::MoveTo, IAgentCharacter::Prepare, IAgentCharacter::Play, IAgentCharacter::Show, IAgentCharacter::Speak, IAgentCharacter::Wait

IAgentNotifySink::RequestStart

HRESULT RequestStart(
   long dwRequestID  // request ID
);                          

Notifies a client application when a request begins.

dwRequestID

Identifier of the request that started.

This event enables you to track when a queued request begins.

See also IAgentNotifySink::RequestComplete, IAgent::Load, IAgentCharacter::GestureAt, IAgentCharacter::Hide, IAgentCharacter::Interrupt, IAgentCharacter::MoveTo, IAgentCharacter::Prepare, IAgentCharacter::Play, IAgentCharacter::Show, IAgentCharacter::Speak, IAgentCharacter::Wait

IAgentNotifySink::Restart

HRESULT Restart();                          

Notifies a client application that the Microsoft Agent server restarted.

See also IAgentNotifySink::Shutdown

IAgentNotifySink::Shutdown

HRESULT Shutdown();                          

Notifies a client application that the Microsoft Agent server shut down.

This event fires only when the user explicitly chooses the Exit command on the pop-up menu of the Microsoft Agent taskbar icon. Requests sent after the server shuts down will fail.

See also IAgentNotifySink::Restart

IAgentNotifySink:: Size

HRESULT Size(
   long dwCharID,  // character ID
   long lWidth,    // new width
   long lHeight,   // new height
);                          

Notifies a client application when the character has been resized.

dwCharID

Identifier of the character that has been resized.

lWidth

The width of the character's animation frame in pixels.

lHeight

The height of the character's animation frame in pixels.

This event is sent to all clients of the character.

See also IAgentCharacter::GetSize, IAgentCharacter::SetSize

IAgentNotifySink::VisibleState

HRESULT VisibleState(
   long dwCharID,  // character ID
   long bVisible,  // visibility flag
   long dwCause,   // cause of visible state
);                          

Notifies a client application when the visibility state of the character changes.

dwCharID

Identifier of the character whose visibility state is changed.

bVisible

Visibility flag. This Boolean value is TRUE when character becomes visible and FALSE when the character becomes hidden.

dwCause

Cause of last change to the character's visibility state. The parameter may be one of the following:

const unsigned short NeverShown = 0; Character has not been shown.
const unsigned short UserHid = 1; User hid the character.
const unsigned short UserShowed = 2; User showed the character.
const unsigned short ProgramHid = 3; Your application hid the character.
const unsigned short ProgramShowed = 4; Your application showed the character.
const unsigned short OtherProgramHid = 5; Another application hid the character.
const unsigned short OtherProgramShowed = 6; Another application showed the character.

See also IAgentCharacter::GetVisible, IAgentCharacter::SetVisible, IAgentCharacter::GetVisibilityCause