Setup method
Defines the input and output data objects used in the transform.
Syntax
HRESULT retVal = object.Setup(punkInputs, ulNumInputs, punkOutputs, ulNumOutputs, dwFlags);
Parameters
punkInputs [in]
Type: IUnknown * constPointer to an array of one or more data objects to be used for input.
ulNumInputs [in]
Type: unsigned longNumber of data object interface pointers in the input array.
punkOutputs [in]
Type: IUnknown * constPointer to an array of one or more data objects where data will be written.
ulNumOutputs [in]
Type: unsigned longNumber of data object interface pointers in the output array.
dwFlags [in]
Type: DWORDReserved. Must be set to 0.
Remarks
This method is used to perform a required, one-time setup before the IDXTransform::Execute method is used. The correct number of input and output data objects depends on the implementation of the transform. Transitions are usually one-in/one-out objects, whereas procedural objects have no inputs.
If you use this method, you should try to optimize your code for subsequent calls to IDXTransform::Setup. For example, if a transform is passed a new DXSurface, but the height, width, and pixel format have not changed, it might not be necessary to execute all portions of the Setup method again.
To clear a transform, use Setup with the dwFlags parameter equal to zero and the number of inputs and outputs equal to zero. If the punkInputs and the punkOutputs parameters are NULL, and it is a quick setup, the current input and output objects are released. If the transform is used again on data of the same type, you must use Setup again for the transform.
The IDXTransformFactory::InitializeTransform method also uses the Setup method.