SetProgressCallback

Events, DLL interface

Description

Registers a DLL progress callback for the selected PDF Library for Delphi 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

InstanceIDThe PDF Library for Delphi instance returned by CreateLibrary. Use 0 only for the implicit default instance
ProgressProcA stdcall callback pointer that receives Percent and UserData. Pass NULL when the application no longer needs callback notifications
UserDataAn application-defined pointer passed back to ProgressProc without interpretation by PDF Library for Delphi

Return values

0The instance was not found
1The callback pointer and user data were stored for the instance

Remarks

Keep the callback lightweight and avoid re-entering PDF Library for Delphi from inside the callback