Skip to content

Latest commit

 

History

History
141 lines (104 loc) · 5.01 KB

nf-d2d1_1-id2d1factory1-registereffectfromstring.md

File metadata and controls

141 lines (104 loc) · 5.01 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:d2d1_1.ID2D1Factory1.RegisterEffectFromString
ID2D1Factory1::RegisterEffectFromString (d2d1_1.h)
Registers an effect within the factory instance with the property XML specified as a string.
ID2D1Factory1 interface [Direct2D]
RegisterEffectFromString method
ID2D1Factory1.RegisterEffectFromString
ID2D1Factory1::RegisterEffectFromString
RegisterEffectFromString
RegisterEffectFromString method [Direct2D]
RegisterEffectFromString method [Direct2D]
ID2D1Factory1 interface
d2d1_1/ID2D1Factory1::RegisterEffectFromString
direct2d.id2d1factory1_registereffect
direct2d\id2d1factory1_registereffect.htm
Direct2D
9988aad6-0487-4f48-a05c-1dfb944f6ce7
12/05/2018
ID2D1Factory1 interface [Direct2D],RegisterEffectFromString method, ID2D1Factory1.RegisterEffectFromString, ID2D1Factory1::RegisterEffectFromString, RegisterEffectFromString, RegisterEffectFromString method [Direct2D], RegisterEffectFromString method [Direct2D],ID2D1Factory1 interface, d2d1_1/ID2D1Factory1::RegisterEffectFromString, direct2d.id2d1factory1_registereffect
d2d1_1.h
Windows
Windows 8 and Platform Update for Windows 7 [desktop apps \| UWP apps]
Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps \| UWP apps]
D2d1.lib
D2d1.dll
Windows
19H1
ID2D1Factory1::RegisterEffectFromString
d2d1_1/ID2D1Factory1::RegisterEffectFromString
c++
APIRef
kbSyntax
COM
D2d1.dll
ID2D1Factory1.RegisterEffectFromString

ID2D1Factory1::RegisterEffectFromString

-description

Registers an effect within the factory instance with the property XML specified as a string.

-parameters

-param classId [in]

Type: REFCLSID

The identifier of the effect to be registered.

-param propertyXml [in]

Type: PCWSTR

A list of the effect properties, types, and metadata.

-param bindings [in, optional]

Type: const D2D1_PROPERTY_BINDING*

An array of properties and methods.

This binds a property by name to a particular method implemented by the effect author to handle the property. The name must be found in the corresponding propertyXml.

-param bindingsCount

Type: UINT32

The number of bindings in the binding array.

-param effectFactory

Type: PD2D1_EFFECT_FACTORY

The static factory that is used to create the corresponding effect.

-returns

Type: HRESULT

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

HRESULT Description
S_OK No error occurred.
E_OUTOFMEMORY Direct2D could not allocate sufficient memory to complete the call.
E_INVALIDARG An invalid parameter was passed to the returning function.

-remarks

Direct2D effects must define their properties at registration time via registration XML. An effect declares several required system properties, and can also declare custom properties. See Custom effects for more information about formatting the propertyXml parameter.

RegisterEffect is both atomic and reference counted. To unregister an effect, call UnregisterEffect with the classId of the effect.

Important  RegisterEffect does not hold a reference to the DLL or executable file in which the effect is contained. The application must independently make sure that the lifetime of the DLL or executable file completely contains all instances of each registered and created effect.
 
Aside from the built-in effects that are globally registered, this API registers effects only for this factory and derived device and device context interfaces.

-see-also

ID2D1Factory1

ID2D1Factory1::UnregisterEffect