Microsoft DirectX 9.0 |
The Initialize method initializes the multimedia stream object.
Syntax
HRESULT Initialize(
STREAM_TYPE StreamType,
DWORD dwFlags,
IGraphBuilder *pFilterGraph
);
Parameters
StreamType
[in] Member of the STREAM_TYPE enumeration, specifying whether the streams are read-only, write-only, or read/write.
dwFlags
[in] Must be one of the following values:
Value | Description |
Zero | Create a filter graph that runs on a separate thread. |
AMMSF_NOGRAPHTHREAD | Create a filter graph that runs on the calling thread. |
pFilterGraph
[in] [optional] Pointer to the IGraphBuilder interface, or NULL. If this parameter is non-NULL, it specifies a filter graph that the multimedia stream object will use. Otherwise, the multimedia stream object creates a new filter graph.
Return Values
Returns an HRESULT value. Possible values include the following.
Value | Description |
E_POINTER | NULL pointer argument. |
S_OK | Success. |
Remarks
If you specify AMMSF_NOGRAPHTHREAD in the dwFlags parameter, the calling thread must process window messages, and it must release all multimedia streaming objects before the thread exits. Otherwise, the application might deadlock.
See Also