Windows Media Player 11 SDK IWMPClosedCaption::get_SAMILang 

Windows Media Player SDK banner art

Previous Next


The get_SAMILang method retrieves the language displayed for closed captioning.


  BSTR*  pbstrSAMILang



[out]  Pointer to a BSTR containing the language.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.


A SAMI file can contain text for one or many languages. The languages available for closed captioning are defined between the <STYLE> and </STYLE> tags in the SAMI file. A language identifier is specified by a unique alphanumeric string that is preceded by a period (.). The name specified for a language can be any string. For example, the following could be used to define US English:

.ENUSCC {Name:'English Captions' lang: en-US; SAMIType:CC;}

If no SAMI language is specified, the first language defined in the SAMI file is used by default.

The value you specify using put_SAMILang must match the Name attribute in the language specifier.

Windows Media Player 10 Mobile: This method always retrieves a BSTR containing an empty string.


Version: Windows Media Player 9 Series or later.

Header: Include wmp.h.

Library: Use wmp.dll.

See Also

Previous Next