Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29280 Discussions

Retreiving OS version from Vis. Fortran 6.6

bruzek
Beginner
1,039 Views
Could someone send or post a snippet of code that shows how to do this? I can't make it work. Thanks,

Wayne
0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,039 Views
Here's a snippet...

type (T_OSVERSIONINFO) :: ovi
! Get OS Version info
!
ovi%dwOSVersionInfoSize = sizeof(ovi)
ret = GetVersionEx (ovi)
write (*, *) "OS Version info: ",ovi%dwPlatformId,ovi%dwMajorVersion,&
ovi%dwMinorVersion, ovi%dwBuildNumber
i = index(ovi%szCSDVersion, CHAR(0)) - 1
write (*, *) "  ",ovi%szCSDVersion(1:i)


Steve
0 Kudos
dave_frank
Beginner
1,039 Views
Steve, what besides
program test

your code snippet

end program

does this need to compile/run ?
0 Kudos
Steven_L_Intel1
Employee
1,039 Views
Um, "use dfwin" and "INTEGER ret"? I extracted this out of some code of mine, and didn't think about whether it was reasonably self-sufficient. But as you point out, it is, mostly.

Steve
0 Kudos
bruzek
Beginner
1,039 Views
Been out of the office for awhile, but am back, and your solutions worked perfectly! Thanks much for the assistance.

Wayne
0 Kudos
Reply