GetVirtualFileRevision

Workflow data tools, Virtual files, ActiveX, DLL

Description

Returns the current revision of a registered virtual file

Syntax

ActiveX

Function PDFlib::GetVirtualFileRevision(FileName As String) As Double

DLL

long long DLGetVirtualFileRevision(int InstanceID, const wchar_t* FileName);
long long DLGetVirtualFileRevisionA(int InstanceID, const char* FileName);

Parameters

InstanceIDLibrary instance returned by DLCreateLibrary
FileNameRegistered file name

Return values

Returns a positive revision, or 0 when the file is not registered

Remarks

Pass the revision to ReplaceVirtualFileIfRevision to replace the file only when no other writer changed it

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. ActiveX returns the revision as a Double; revisions stay exact up to 2^53, so pass the value back unchanged

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