IDvdInfo2::GetDVDTextLanguageInfo method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The GetDVDTextLanguageInfo method retrieves information about the text strings for a specified language. The method retrieves the number of strings for that language, the locale identifier, and the character set.

Syntax

HRESULT GetDVDTextLanguageInfo(
  [in]  ULONG           ulLangIndex,
  [out] ULONG           *pulNumOfStrings,
  [out] LCID            *pLangCode,
  [out] DVD_TextCharSet *pbCharacterSet
);

Parameters

[in] ulLangIndex

Zero-based index of the language to query. To find the number of text-string languages on the DVD, call IDvdInfo2::GetDVDTextNumberOfLanguages.

[out] pulNumOfStrings

Receives the number of text strings for the specified language.

[out] pLangCode

Receives a locale identifier (LCID) that specifies the language in which the text is written. For example, the LCID for "en-us" is 0x0409.

[out] pbCharacterSet

Receives a member of the DVD_TextCharSet enumeration. The value specifies the character set of the text string.

Return value

Returns one of the following HRESULT values.

Return code Description
S_OK
Success.
E_INVALIDARG
This DVD does not have any text strings, or the ulLangIndex parameter is out of bounds.
E_POINTER
NULL pointer argument.
E_UNEXPECTED
An unexpected internal error occurred.

Remarks

To get a particular text string, call IDvdInfo2::GetDVDTextStringAsUnicode or IDvdInfo2::GetDVDTextStringAsNative.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

DVD Applications

Error and Success Codes

IDvdInfo2 Interface

Working with DVD Text Strings