VFP implementation of GetZipComment and GetZipFilesList for ZIP acrchives
VFP class below allows retrieval of a ZIP file comment or a list/count of files in the ZIP archive. It uses VFP low level file functions (LLFF) to directly read the ZIP file.
Generate GUID
UDF below generates 128-bit GUID and returns it as a string in the format 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.
MSDN:Creating directory preserving name case
MSDN:
- CreateDirectory function - Creates a new directory one level at a time
- SHCreateDirectory function - Creates a new directory including all intermediate folders, if necessary
- CreateFolder Method - WSH
- NewFolder Method - Shell
Counting lines in an ASCII file
There is more than one way to count lines in an ASCII file.
How to check if variable is Integer
FoxPro doesn't provide a direct way to check if variable is integer or how many digits it has after decimal point but it can be accomplished using PADL() function.
Copy PRG contents to Clipboard
In VFP 9.0 PRG contents will be copied to clipboard in RTF format as well, if there's no 'X' in the _Vfp.EditorOptions.
The code uses Editor functions from Foxtools.fll. See George Tasker's Extended Foxtools Help Download #9333 on UTfor more info.
File operations with Progressbar
It's based on the late Ed Rauh's code around SHFileOperation Win API and requires his Heap allocation class. It supports wild cards and shows standard Windows progress bar.
VFP 9.0 Report Features in Runtime
In order to deploy VFP 9.0 object-assisted report features in runtime, the REPORT*.APP files have to be distributed with your application and their location stored into _REPORT* system variables. The error 'Variable _REPORTOUTPUT is not found' may be generated if they are not populated properly.
Windows API support class
The class below simplifies use of Windows API function by providing methods to convert data between VFP types and Windows API types/structures