OnInitInstData method

Enables the transform to allocate resources or compute any data that is to be shared across threads.

Syntax

HRESULT retVal = object.OnInitInstData(WorkInfo, ulNumBandsToDo);

Parameters

  • WorkInfo [in, ref]
    Type: CDXTWorkInfoNTo1

    CDXTWorkInfoNTo1 object that contains all the information needed by the work procedure to perform the rendering request.

  • ulNumBandsToDo [in, ref]
    Type: unsigned long

    Number of threads to use for the rendering request. The default is equal to the number of processors in the system. Ignore this parameter for optimal default behavior.

Remarks

If the transform does not set the m_ulMaxImageBands"/> data member, or if it sets it to a value greater than one, this function should be used for one-time initialization. Each thread will then execute a portion of the render request on each of the available processors. When all the bands have completed, the CDXBaseNTo1::OnFreeInstData function is called to allow for any necessary cleanup.

See also

CDXBaseNTo1::WorkProc