Retrieving VFP runtime DLL name required by EXE or DLL

VFP stores in an EXE/DLL information about what runtime DLL is required to run it.

This is sample code. Add error handling and adjust to your requirements as necessary.

1
2
3
? VfpVersionFromExeOrDll("C:\Program Files\My Company\MyVfpApplication.exe")
? VfpVersionFromExeOrDll("X:\Somefolder\MyVfpDll.dll")

Obtaining DLL-specific version information

topic: 

Most Windows Shell and common controls DLLs implement DllGetVersion function. It allows applications to obtain DLL-specific version information to make sure that required functionality in a DLL is implemented. The Windows API support class

is used to handle Windows API structures.

Adler32 Checksum

Adler32 is different from CRC32. It's much faster but a little bit less reliable. The free ZLIB.DLL from http://www.zlib.net/ has a function to calculate Adler32.