Partager via


CFactoryTemplate::CreateInstance

 
Microsoft DirectShow 9.0

CFactoryTemplate::CreateInstance

The CreateInstance method calls the object-creation function for the class.

Syntax

  CUnknown *CreateInstance(
    LPUNKNOWN pUnk,
    HRESULT *phr
);

Parameters

pUnk

Pointer to the aggregating IUnknown interface.

phr

Pointer to a variable that receives an HRESULT value indicating the success or failure of the method.

Return Value

Returns an instance of the class object.

Remarks

The IClassFactory::CreateInstance method calls this class method. This method calls the function pointed to by the CFactoryTemplate::m_lpfnNew member variable.

Requirements

**  Header:** Declared in Combase.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also