Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ID2D1DeviceContext::CreateEffect method

Creates an effect for the specified class ID.

Syntax


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

Parameters

effectId

Type: REFCLSID

The class ID of the effect to create. See Built-in Effects for a list of effect IDs.

effect [out]

Type: ID2D1Effect**

When this method returns, contains the address of a pointer to a new 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.
D2DERR_INSUFFICIENT_DEVICE_CAPABILITIES The effect requires capabilities not supported by the D2D device.

 

Remarks

If the created effect is a custom effect that is implemented in a DLL, this doesn't increment the reference count for that DLL. If the application deletes an effect while that effect is loaded, the resulting behavior is unpredictable.

Requirements

Minimum supported client

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

Minimum supported server

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

Minimum supported phone

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

Header

D2d1_1.h

DLL

D2d1.dll

See also

ID2D1DeviceContext
ID2D1Effect
ID2D1Factory1::RegisterEffect
Effects

 

 

Show:
© 2017 Microsoft