ID2D1EffectContext::CreateEffect method

Creates a Direct2D effect from a class ID. This is the same as ID2D1DeviceContext::CreateEffect so custom effects can create other effects and wrap them in a transform.

Syntax


HRESULT CreateEffect(
  REFCLSID effectId,
  [out]  ID2D1Effect **effect
);

Parameters

effectId

Type: REFCLSID

The built-in or registered effect ID to create the effect.

effect [out]

Type: ID2D1Effect**

When this method returns, contains the address of a pointer to the effect.

Return value

Type: HRESULT

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

HRESULTDescription
S_OKNo error occurred.
E_OUTOFMEMORYDirect2D could not allocate sufficient memory to complete the call.
E_INVALIDARGAn invalid value was passed to the method.
D3DERR_OUTOFVIDEOMEMORYDirect3D does not have enough display memory to perform the operation.
D2DERR_EFFECT_IS_NOT_REGISTEREDThe specified effect is not registered by the system.

 

Remarks

The created effect does not reference count the DLL from which the effect was created. If the caller unregisters an effect while this effect is loaded, the resulting behavior is unpredictable.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

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

Header

D2D1EffectAuthor.h

Library

D2D1.lib

See also

ID2D1EffectContext
ID2D1BlendTransform
D2D1_BLEND_DESCRIPTION

 

 

Community Additions

ADD
Show:
© 2014 Microsoft