IWMStreamConfig2::GetDataUnitExtension method

The GetDataUnitExtension method retrieves information about an existing data unit extension system.

Syntax

HRESULT GetDataUnitExtension(
  WORD  wDataUnitExtensionNumber,
  GUID  *pguidExtensionSystemID,
  WORD  *pcbExtensionDataSize,
  BYTE  *pbExtensionSystemInfo,
  DWORD *pcbExtensionSystemInfo
);

Parameters

wDataUnitExtensionNumber

WORD containing the data unit extension number. This number is assigned to a data unit extension system when it is added to the stream.

pguidExtensionSystemID

Pointer to a GUID that receives the identifier of the data unit extension system.

pcbExtensionDataSize

Pointer to the size, in bytes, of the data unit extensions that will be attached to the packets in the stream.

If this value is 0xFFFF, the system uses data unit extensions of variable size. Each individual data unit extension can then be set to any size ranging from 0 to 65534.

pbExtensionSystemInfo

Pointer to a byte buffer that receives information about the data unit extension system.

pcbExtensionSystemInfo

Pointer to the size, in bytes, of the data stored at pbExtensionSystemInfo.

Return value

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.
E_INVALIDARG
pguidExtensionSystemID or pcbExtensionDataSize is NULL.

OR

wDataUnitExtensionNumber specifies an invalid data unit extension number.

Remarks

To retrieve the total number of data unit extension systems associated with the stream, call GetDataUnitExtensionCount.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only],Windows Media Format 9 Series SDK, or later versions of the SDK
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wmsdkidl.h (include Wmsdk.h)
Library Wmvcore.lib; WMStubDRM.lib (if you use DRM)

See also

IWMStreamConfig2 Interface

IWMStreamConfig2::AddDataUnitExtension