Microsoft DirectX 9.0

IDvdInfo2::GetDVDTextStringAsUnicode

The GetDVDTextStringAsUnicode method retrieves the text string for the specified language and string indexes in Unicode™.

Syntax

HRESULT GetDVDTextStringAsUnicode(
  ULONG ulLangIndex,
  ULONG ulStringIndex,
  TCHAR *pchBuffer,
  ULONG ulMaxBufferSize,
  ULONG *pulActualSize,
  enum DVD_TextStringType *pType
);

Parameters

ulLangIndex

[in] Language index.

ulStringIndex

[in] String index of the given language.

pchBuffer

[out] Pointer to a buffer that receives the text string. If pchBuffer is NULL, then this method returns only the size of the string in pulActualSize.

ulMaxBufferSize

[in] Maximum string size allowed, calculated as sizeof(pchBuffer)/sizeof(*pchBuffer).

pulActualSize

[out] Pointer to a variable of type ULONG that receives the actual length of the string returned in pchBuffer, including the terminating NULL.

pType

[out] Pointer to a variable of type DVD_TextStringType that receives the type of string data returned.

Return Values

Returns one of the following HRESULT values.

Return code Description
S_OK Success.
E_POINTER Invalid argument.
E_UNEXPECTED An unexpected internal error occurred.

Remarks

In general, a robust application can handle Unicode™ strings. So, when getting a string, you generally first call GetDVDTextStringAsUnicode. But because some strings might contain characters that cannot be represented in Unicode, if GetDVDTextStringAsUnicode fails, the application can try calling GetDVDTextStringAsNative.

A terminating NULL is appended to the returned string.

See Also