RestoreVirtualFiles

Workflow data tools, Virtual files, ActiveX, DLL

Description

Replaces the files under a snapshot's prefix with the captured files

Syntax

ActiveX

Function PDFlib::RestoreVirtualFiles(Snapshot As Long) As Long

DLL

int DLRestoreVirtualFiles(int InstanceID, int Snapshot);

Parameters

InstanceIDLibrary instance returned by DLCreateLibrary
SnapshotHandle returned by CaptureVirtualFiles

Return values

Returns 1 on success, or 0 when the handle is invalid or the restored registry would exceed its limits

Remarks

Files added under the prefix after the capture are removed, changed files return to their captured contents and every restored file receives a new revision; files outside the prefix are untouched

The snapshot remains valid and can be restored again

ActiveX exposes this method on IPDFlibrary24; obtain it with CoPDFlibrary.CreateEditionTools24 or query the default interface of PDFlibAX 4.74 or later

All editions include these functions. Failed ActiveX calls return an empty string, 0 or Empty and record the reason for GetWorkflowToolsError. The C#, VB.NET and Visual C++ WorkflowTools examples in the DLL and ActiveX demo folders show a complete request, page plan and rollback workflow

See also

Workflow data tools · Virtual file registry · GetWorkflowToolsError