Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28630 Discussions

Retreiving OS version from Vis. Fortran 6.6

bruzek
Beginner
567 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
567 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
567 Views
Steve, what besides
program test

your code snippet

end program

does this need to compile/run ?
0 Kudos
Steven_L_Intel1
Employee
567 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
567 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