IWMProfile::AddStream method
The AddStream method adds a stream to the profile by copying the stream configuration details into the profile.
Use AddStream only to include a stream that is new to the profile. New streams can be created by calling IWMProfile::CreateNewStream, but will not be added to the profile until AddStream is called.
If you edit an existing stream using IWMProfile::GetStream or IWMProfile::GetStreamByNumber, you should not call AddStream to include the changes. To include changes made to an existing stream, call IWMProfile::ReconfigStream.
Syntax
HRESULT AddStream(
IWMStreamConfig *pConfig
);
Parameters
pConfig
Pointer to the IWMStreamConfig interface of the stream configuration object to be added to the profile. The stream must be configured by using the methods of the IWMStreamConfig interface before this method is used to add the stream to the profile.
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. |
|
The pConfig parameter is NULL. |
|
There is not enough available memory. |
|
The method failed for an unspecified reason. |
|
The stream is not valid, possibly because it does not have a valid stream number. |
Remarks
When a stream is added, its configuration is copied into the profile. A maximum of 63 streams can exist in a profile.
Requirements
Minimum supported client | Windows 2000 Professional [desktop apps only],Windows Media Format 7 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) |