Partage via


XSpeechSynthesizerCloseHandle

Closes the speech synthesizer and releases allocated system resources.

Syntax

HRESULT XSpeechSynthesizerCloseHandle(  
         XSpeechSynthesizerHandle speechSynthesizer  
)  

Parameters

speechSynthesizer   _In_opt_
Type: XSpeechSynthesizerHandle

The speech synthesizer to close.

Return value

Type: HRESULT

Returns S_OK if successful; otherwise, returns an error code. For a list of error codes, see Error Codes.

Remarks

Note

This function isn't safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.

  • Use this function to close a speech synthesizer created by calling the XSpeechSynthesizerCreate function.

  • To prevent memory leaks, call this function to close a speech synthesizer handle after you've completed all operations that are using the handle.

  • For an example that demonstrates how to use the XSpeechSynthesizerCloseHandle function, see XSpeechSynthesizerCreate.

Requirements

Header: XSpeechSynthesizer.h

Library: xgameruntime.lib

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XAccessibility
XSpeechSynthesizerCreate
XSpeechSynthesizerCloseStreamHandle
XSpeechSynthesizer