IAgentCharacter::Play

[Microsoft Agent is deprecated as of Windows 7, and may be unavailable in subsequent versions of Windows.]

HRESULT Play(
   BSTR bszAnimation,  // name of an animation
   long * pdwReqID     // address of request ID
);

Plays the specified animation.

  • Returns S_OK to indicate the operation was successful. When the function returns, pdwReqID contains the ID of the request.

bszAnimation

The name of an animation.

pdwReqID

Address of a variable that receives the IAgentCharacter::Play request ID.

An animation's name is defined when the character is compiled with the Microsoft Agent Character Editor. Before playing the specified animation, the server attempts to play the Return animation for the previous animation (if one has been assigned).

When a character's animation data is stored on the user's local machine, you can use the IAgentCharacter::Play method and specify the name of the animation. When using the HTTP protocol to access animation data, use the Prepare method to ensure the availability of the animation before calling this method.

See Also

IAgentCharacter::Prepare