ID2D1Effect::SetInputCount method (d2d1_1.h)

Allows the application to change the number of inputs to an effect.

Syntax

HRESULT SetInputCount(
  UINT32 inputCount
);

Parameters

inputCount

Type: UINT32

The number of inputs 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.

HRESULT Description
S_OK No error occurred.
E_INVALIDARG One or more arguments are invalid.
E_OUTOFMEMORY Failed to allocate necessary memory.

Remarks

Most effects do not support a variable number of inputs. Use ID2D1Properties::GetValue with the D2D1_PROPERTY_MIN_INPUTS and D2D1_PROPERTY_MAX_INPUTS values to determine the number of inputs supported by an effect.

If the input count is less than the minimum or more than the maximum supported inputs, the call will fail.

If the input count is unchanged, the call will succeed with S_OK.

Any inputs currently selected on the effect will be unaltered by this call unless the number of inputs is made smaller. If the number of inputs is made smaller, inputs beyond the selected range will be released.

If the method fails, the existing input and input count will remain unchanged.

Requirements

Requirement Value
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]
Target Platform Windows
Header d2d1_1.h
DLL D2d1.dll

See also

ID2D1DeviceContext::CreateEffect

ID2D1DeviceContext::DrawImage

ID2D1Effect

ID2D1Effect::GetOutput

ID2D1Image