Creates an effect from a class ID.
The class ID of the effect to create.
- effect [out]
When this method returns, contains the address of a pointer to a new effect.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
|S_OK||No error occurred.|
|E_OUTOFMEMORY||Direct2D could not allocate sufficient memory to complete the call.|
|E_INVALIDARG||An invalid value was passed to the method.|
|D3DERR_OUTOFVIDEOMEMORY||Direct3D does not have enough display memory to perform the operation.|
|D2DERR_EFFECT_IS_NOT_REGISTERED||The specified effect is not registered by the system.|
|D2DERR_INSUFFICIENT_DEVICE_CAPABILITIES||The effect requires capabilities not supported by the D2D device.|
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.
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]|