D2D1CreateFactory<Factory>(D2D1_FACTORY_TYPE,D2D1_FACTORY_OPTIONS&,Factory**) Function

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

template<class Factory>
HRESULT D2D1CreateFactory(
    __in D2D1_FACTORY_TYPE factoryType,
    __in CONST D2D1_FACTORY_OPTIONS &factoryOptions,
    __out Factory **factory
);

Template Parameters

ParameterDescription
FactoryThe type of ID2D1Factory to create.

 

Parameters

ParameterDescription
factoryTypeThe threading model of the factory and the resources it creates.
factoryOptionsThe level of detail provided to the debugging layer.
factoryWhen this method returns, contains the address of a pointer to the new factory.

 

Return Value

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft