Platform |
Win32, x64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Purpose |
To get version information for the operating system. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Syntax |
SUBROUTINE GET_OS_VER@( PLATFORMID, MAJOR, MINOR ) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description |
This routine returns values for the platform id and major and minor version numbers according to the following table.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Notes |
If the executable is running in "compatibility mode" then this routine provides information about
the compatible operating system rather than the machine operating system. To get information about the
machine operating system use GET_WOW_VER@. |
An application can be targeted for a particular operating system by including a manifest file in a resource script. A line in the resource script takes the form:
1 24 my.manifest
where the file my.manifest could contain:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <!-- Windows 10 --> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> <!-- Windows 8.1 --> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <!-- Windows Vista --> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <!-- Windows 7 --> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <!-- Windows 8 --> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> </application> </compatibility> </assembly>
Here is a sample program:
USE clrwin INTEGER maj, min, b CHARACTER*80 ch CALL get_os_ver@(b,maj,min) PRINT*,maj,min,b CALL get_wow_ver@(ch,maj,min) PRINT*,maj,min PRINT*,ch END RESOURCES 1 24 my.manifest