Obtaining DLL-specific version information
By Sergey - Posted on March 25th, 2008
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.
| This is sample code. Add error handling and adjust to your requirements as necessary. |
#DEFINE DLLVER_PLATFORM_WINDOWS 1 #DEFINE DLLVER_PLATFORM_NT 2 lcDll = "Shell32.dll" DECLARE INTEGER DllGetVersion IN (lcDll) STRING @pdvi LOCAL lcBuffer lcBuffer = CHR(20) + REPLICATE(CHR(0), 19) loWas = NEWOBJECT("WinApiSupport", "WinApiSupport.fxp") IF DllGetVersion(@lcBuffer) = 0 ? "DLL: " + lcDll ? "Major version: " + TRANSFORM(loWas.Long2num(SUBSTR(lcBuffer, 5,4))) ? "Minor version: " + TRANSFORM(loWas.Long2num(SUBSTR(lcBuffer, 9,4))) ? "Build number: " + TRANSFORM(loWas.Long2num(SUBSTR(lcBuffer, 13,4))) ? "Platform: " + IIF(loWas.Long2num(SUBSTR(lcBuffer, 17,4))=1,"Windows", "WinNT") ENDIF
Recent comments
11 hours 3 min ago
1 week 22 hours ago
4 weeks 14 hours ago
5 weeks 5 hours ago
5 weeks 5 hours ago
7 weeks 4 days ago
8 weeks 1 day ago
8 weeks 1 day ago
8 weeks 4 days ago
8 weeks 4 days ago