Microsoft DirectX 9.0

IDvdInfo2::GetDVDTextStringAsNative

The GetDVDTextStringAsNative method retrieves the text string for the specified language as an array of bytes.

Syntax

HRESULT GetDVDTextStringAsNative(
  ULONG ulLangIndex,
  ULONG ulStringIndex,
  BYTE *pchBuffer,
  ULONG ulMaxBufferSize,
  ULONG *pulActualSize,
  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 (size of pchBuffer).

pulActualSize

[out] Actual length, in bytes, of the string returned in pchBuffer, including the terminating NULL.

pType

[out] Pointer to a variable of type DVD_TextStringType enumeration 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 IDvdInfo2::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