0 out of 1 rated this helpful - Rate this topic

D2D1CreateFactory(D2D1_FACTORY_TYPE,REFIID,D2D1_FACTORY_OPTIONS*,void**) function

Applies to: desktop apps | Metro style apps

Creates a factory object that can be used to create Direct2D resources.

Syntax

HRESULT WINAPI D2D1CreateFactory(
  __in      D2D1_FACTORY_TYPE factoryType,
  __in      REFIID riid,
  __in_opt  const D2D1_FACTORY_OPTIONS *pFactoryOptions,
  __out     void **ppIFactory
);

Parameters

factoryType [in]

Type: D2D1_FACTORY_TYPE

The threading model of the factory and the resources it creates.

riid [in]

Type: REFIID

A reference to the IID of ID2D1Factory that is obtained by using __uuidof(ID2D1Factory).

pFactoryOptions [in, optional]

Type: const D2D1_FACTORY_OPTIONS*

The level of detail provided to the debugging layer.

ppIFactory [out]

Type: void**

When this method returns, contains the address to a pointer to the new factory.

Return value

Type: HRESULT

If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The ID2D1Factory interface provides the starting point for Direct2D. In general, objects created from a single instance of a factory object can be used with other resources created from that instance, but not with resources created by other factory instances.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

Direct2D API Overview

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ