CaptureVirtualFiles

Workflow data tools, Virtual files, ActiveX, DLL

Description

Captures a private copy of every virtual file under a prefix and returns a snapshot handle

Syntax

ActiveX

Function PDFlib::CaptureVirtualFiles(Prefix As String) As Long

DLL

int DLCaptureVirtualFiles(int InstanceID, const wchar_t* Prefix);
int DLCaptureVirtualFilesA(int InstanceID, const char* Prefix);

Parameters

InstanceIDLibrary instance returned by DLCreateLibrary
PrefixScope to capture; an empty prefix captures every file

Return values

Returns a positive snapshot handle, or 0 when the instance already holds 256 snapshots

Remarks

The snapshot copies the file contents, so later changes do not affect it

Restore it with RestoreVirtualFiles and free it with ReleaseVirtualFileSnapshot; releasing the library instance frees any remaining snapshots

Handles belong to the instance that captured them

The virtual file registry is shared by every library instance in the process and is used by every mem:// path and by registered file names; scope workflow resources under a unique prefix

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