SetProgressCallback
Events, DLL interface
Description
Registers a DLL progress callback for the selected PDFlibPas instance
The callback receives progress notifications from long-running operations that report the same values exposed by the Delphi OnProgress event
Syntax
DLL
typedef int (__stdcall *DLPDFlibProgressProc)(int Percent, void * UserData);
int DLSetProgressCallback(int InstanceID, DLPDFlibProgressProc ProgressProc, void * UserData);Parameters
| InstanceID | The PDFlibPas instance returned by CreateLibrary. Use 0 only for the implicit default instance |
|---|---|
| ProgressProc | A stdcall callback pointer that receives Percent and UserData. Pass NULL when the application no longer needs callback notifications |
| UserData | An application-defined pointer passed back to ProgressProc without interpretation by PDFlibPas |
Return values
| 0 | The instance was not found |
|---|---|
| 1 | The callback pointer and user data were stored for the instance |
Remarks
Keep the callback lightweight and avoid re-entering PDFlibPas from inside the callback