IWMStreamConfig2::GetDataUnitExtension method (wmsdkidl.h)
[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
The GetDataUnitExtension method retrieves information about an existing data unit extension system.
Syntax
HRESULT GetDataUnitExtension(
[in] WORD wDataUnitExtensionNumber,
[out] GUID *pguidExtensionSystemID,
[out] WORD *pcbExtensionDataSize,
[out] BYTE *pbExtensionSystemInfo,
[in, out] DWORD *pcbExtensionSystemInfo
);
Parameters
[in] 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.
[out] pguidExtensionSystemID
Pointer to a GUID that receives the identifier of the data unit extension system.
[out] 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.
[out] pbExtensionSystemInfo
Pointer to a byte buffer that receives information about the data unit extension system.
[in, out] 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 |
---|---|
|
The method succeeded. |
|
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
Requirement | Value |
---|---|
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) |