<< Click to Display Table of Contents >> Navigation: Functions > PXCV_SetCallBack |
PXCV_SetCallBack sets the callback function used during the PDF rasterization process.
HRESULT PXCV_SetCallBack(
PXVDocument Doc,
PXV36_CALLBACK_FUNC pProc,
LPARAM UserData
);
Doc
[in] Specifies a document that PXCV_Init created.
pProc
[in] Specifies the callback function, which must be defined as:
typedef BOOL (__stdcall *PXV36_CALLBACK_FUNC) (DWORD dwStage, DWORD dwLevel, LPARAM param);
The first parameter of this function indicates the callback state; the second indicates the progress level (see below), and the third will always have the same value as that passed in UserData.
Constant
|
Value
|
Meaning of Level
|
PXCVClb_Start
|
1
|
MaxVal - maximum value of the level which will be passed.
|
PXCVClb_Processing
|
2
|
Current progress level - any value from 0 to MaxVal.
|
PXCVClb_Finish
|
3
|
Any value from 0 to MaxVal (if all levels are passed then the value is MaxVal). This constant can be ignored if desired.
|
Please note that the callback function should return TRUE (any non-zero value) to continue processing or FALSE (zero) to abort the operation.
UserData
[in] Specifies a user-defined callback parameter to be passed as a third parameter to the function specified by pProc.
Please note that all functions and parameters are case-sensitive.
If the function succeeds then the return value is DS_OK.
If the function fails then the return value is an error code.