| Microsoft DirectX 8.1 (C++) | 
The SetFormat method sets the format of the stream.
Syntax
HRESULT SetFormat(
    AM_MEDIA_TYPE *pMediaType,
    DWORD dwFlags
);
Parameters
pMediaType
[in] Pointer to an AM_MEDIA_TYPE structure that contains the stream format.
dwFlags
[in] Reserved.
Return Value
Returns one of the following values.
| Return code | Description | 
| MS_E_SAMPLEALLOC | The stream has already allocated a sample with another media type. | 
| S_OK | Success. | 
See Also