fire_fly
asked on
O/S Detection
Is there a simple method of determining the O/S from within a Delphi app? Code snippets appreciated, general advice also helps :)
Thanks,
Fire-fly
Thanks,
Fire-fly
Use The GetVersionEx API call...
Var
OS : TOSVersionInfo;
Begin
OS.dwVersionInfoSize := SizeOf(OS);
GetVersionEx(OS);
Case OS.dwPlatformID Of
VER_PLATFORM_WIN32S : ; //Windows 3.1x
VER_PLATFORM_WIN32_WINDOWS : ; //Windows 95/98/Me
VER_PLATFORM_WIN32_NT : ; //NT Architecture
End;
End;
Var
OS : TOSVersionInfo;
Begin
OS.dwVersionInfoSize := SizeOf(OS);
GetVersionEx(OS);
Case OS.dwPlatformID Of
VER_PLATFORM_WIN32S : ; //Windows 3.1x
VER_PLATFORM_WIN32_WINDOWS
VER_PLATFORM_WIN32_NT : ; //NT Architecture
End;
End;
ASKER
robert: What function, how do I use it etc...
raidos: TOSVersionInfo? GetVersionEx? VER_PLATFORM_WIN32...? Where are these defined...
If the answers to these questions are complimentary, thanks, how do I share the points amongst you?
raidos: TOSVersionInfo? GetVersionEx? VER_PLATFORM_WIN32...? Where are these defined...
If the answers to these questions are complimentary, thanks, how do I share the points amongst you?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
robert: What function, how do I use it etc...
raidos: TOSVersionInfo? GetVersionEx? VER_PLATFORM_WIN32...? Where are these defined...
If the answers to these questions are complimentary, thanks, how do I share the points amongst you?
raidos: TOSVersionInfo? GetVersionEx? VER_PLATFORM_WIN32...? Where are these defined...
If the answers to these questions are complimentary, thanks, how do I share the points amongst you?
The JCL contains a function for that (among many other things).