Share via


Windows Media Player 11 SDK IWMPClosedCaption::get_SAMIFileName 

Windows Media Player SDK banner art

Previous Next

IWMPClosedCaption::get_SAMIFileName

The get_SAMIFileName method retrieves the name of the file containing the information needed for closed captioning.

Syntax

  HRESULT get_SAMIFileName(
  BSTR*  pbstrSAMIFileName
);

Parameters

pbstrSAMIFileName

[out]  Pointer to a BSTR containing the name of the Synchronized Accessible Media Interchange (SAMI) file.

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.

Remarks

The SAMI file must use an .smi or .sami file name extension.

If you do not specify a value by using IWMPClosedCaption::put_SAMIFileName, the get_SAMIFileName method retrieves a BSTR containing the default file or URL associated with the current media item. This association can occur when a SAMI file is specified by using the sami URL parameter, or automatically when the SAMI file has the same name as the digital media file (except for the file name extension). If there is no default SAMI file associated with the current media, get_SAMIFileName retrieves an empty string ("").

If you want Windows Media Player to use the default SAMI file associated with a particular media item, call IWMPClosedCaption::put_SAMIFileName using an empty string ("") before you play the next media item.

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

Requirements

Version: Windows Media Player 9 Series or later.

Header: Include wmp.h.

Library: Use wmp.dll.

See Also

Previous Next