Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Creates a new instance when placed in the factory template table.

Syntax

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

Parameters

pUnk

Pointer to LPUNKNOWN.

phr

Pointer to an HRESULTvalue in which to return resulting information.

Return Value

Returns a pointer to a new Component Object Model (COM) object.

Remarks

This member function is required to create objects using the class factory. It calls the class constructor.

The phrparameter is modified only if a failure occurs. If it is a failure code on input, construction can be terminated, but the destructor is called by the creator when the HRESULTerror is detected.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Windows Mobile Windows Mobile Version 5.0 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment,
Version 2.12 requires DXPAK 1.0 or later