typedef OP_SYS
begin
BOOL IsWindowsXP(FALSE);
BOOL IsWindowsME(FALSE);
BOOL IsWindows2000(FALSE);
BOOL IsWindows2000Workstation(FALSE);
BOOL IsWindows2000Server(FALSE);
BOOL IsWindowsNT4(FALSE);
BOOL IsWindowsNT351(FALSE);
BOOL IsWindows98(FALSE);
BOOL IsWindows95(FALSE);
end;
OP_SYS gstructOSType;
now if I set some values...
if (SYSINFO.WINNT.bWin2000) then
gstructOSType.IsWindows2000 = TRUE;
elseif (SYSINFO.WIN9X.bWin95) then
gstructOSType.IsWindows95 = TRUE;
elseif (SYSINFO.WIN9X.bWin98) then
gstructOSType.IsWindows98 = TRUE;
elseif (SYSINFO.WIN9X.bWinMe)then
gstructOSType.IsWindowsME = TRUE;
elseif (SYSINFO.WINNT.bWinNT ) then
...perform some other operations...
If I'm running on a Windows 2000 machine, I step through the code, and the IsWindows2000 value is set to true. When I perform another check like:
if ( (gstructOSType.IsWindowsNT351 ||
gtructOSType.IsWindows95 ||
gstructOSType.IsWindows98 ||
gstructOSType.IsWindowsME) == TRUE ) then
MessageBox(PRODUCT_NAME + " can only be installed on a machine with a Windows NT 4.0 or a Windows 2000 platform.", SEVERE);
abort;
endif;
I get the messagebox, and I'm not sure why. These values are set to true for some reason If I create a bunch of global variables, then it runs correctly. When I try to use the structure, even though only the IsWindows2000 value is set to true....the other guys are evaluated to true. Can anyone tell me why?
Alex
