// Declaration: getversionex (VAR lpversioninformation: tosversioninfo {the parameter is a structure}): bool; // The tosversioninfo structure is _ osversioninfoa rename _ osversioninfoa = record dwosversioninfosize: DWORD; {structure size} dwmajorversion: DWORD; {editor ID} dwminorversion: DWORD; {times no.} dwbuildnumber: DWORD; {creation no.} dwplatformid: DWORD; {job platform} szcsdversion: array [0 .. 127] of ansichar; {more instructions} end; {Possible values of parameter 4 (job platform) are: ver_platform_win32s = 0; ver_platform_win32_windows = 1; ver_platform_win32_nt = 2; ver_platform_win32_ce = 3; I have not installed Vista .}
// Example: var osinfo: tosversioninfo; const S = 'No: % d' + slinebreak +' no: % d' + slinebreak + 'job platform: % d' + slinebreak + 'More Description: % s'; begin osinfo. dwosversioninfosize: = sizeof (tosversioninfo); {memory size required first} getversionex (osinfo); showmessage (format (s, [osinfo. dwmajorversion, osinfo. dwminorversion, osinfo. dwbuildnumber, osinfo. dwplatformid, osinfo. szcsdversion]); end;
//: