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.
HRESULT AddStream( IWMStreamConfig *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.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
||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.|
When a stream is added, its configuration is copied into the profile. A maximum of 63 streams can exist in a profile.
|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]|
|Header||wmsdkidl.h (include Wmsdk.h)|
|Library||Wmvcore.lib; WMStubDRM.lib (if you use DRM)|