Share via


IKsTopologyInfo::CreateNodeInstance method (vidcap.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The CreateNodeInstance method creates a COM object that represents a node in the filter.

Syntax

HRESULT CreateNodeInstance(
  [in]  DWORD  dwNodeId,
  [in]  REFIID iid,
  [out] void   **ppvObject
);

Parameters

[in] dwNodeId

Index of the node to create. To find the number of nodes, call the IKsTopologyInfo::get_NumNodes method.

[in] iid

Interface identifier (IID) of the interface to return.

[out] ppvObject

Receives a pointer to the requested interface on the node object. The caller must release the interface.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.

Remarks

Node objects expose the IKsControl interface. You can use this interface to enumerate and access the node's property sets.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 R2 [desktop apps only]
Target Platform Windows
Header vidcap.h

See also

Error and Success Codes

IKsTopologyInfo Interface