Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than kernel32, prefix the name with the module name and a period.
GetVersionEx (kernel32)
.
C# Signatures:
// This must be used if OSVERSIONINFO is defined as a struct or Class - The previous [In,Out] parameter defined for
a class could cause buffer overrun errors.
// This must be used if OSVERSIONINFO is defined as a struct
[ DllImport( "kernel32" )]
static extern bool GetVersionEx( ref OSVERSIONINFO osvi );
// This must be used if OSVERSIONINFO is defined as a class
[ DllImport( "kernel32" )]
static extern bool GetVersionEx( [In, Out] OSVERSIONINFO osvi );
VB.Net Signatures:
' This must be used if OSVERSIONINFO is defined as a struct
<DllImport("kernel32")> _
Private Shared Function GetVersionEx(ByRef osvi As OSVERSIONINFO) As Boolean
End Function
' This must be used if OSVERSIONINFO is defined as a class
<DllImport("kernel32")> _
Private Shared Function GetVersionEx(<[In](), Out()> ByVal osvi As OSVERSIONINFO) As Boolean
End Function
<Public/Private> Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (ByRef lpVersionInformation As OSVERSIONINFO) As Boolean
Friend Function IsWinVista() As Boolean
Dim osInfo As System.OperatingSystem = System.Environment.OSVersion
Return (osInfo.Platform = PlatformID.Win32NT AndAlso osInfo.Version.Major = 6)
End Function
Friend Function IsWinXP() As Boolean
Dim osInfo As System.OperatingSystem = System.Environment.OSVersion
Return (osInfo.Platform = PlatformID.Win32NT AndAlso osInfo.Version.Major = 5 AndAlso osInfo.Version.Minor >= 1)
End Function
Obtains extended information about the version of the operating system that is currently running.
9/30/2010 7:30:15 AM - -74.212.48.23
ByRef is a VB keyword that specifies a variable to be passed as a parameter BY REFERENCE. In other words, the pointer to the variable is passed and any change to its value made within the function or sub will change its value outside the function/sub.
4/25/2007 3:19:29 AM - anonymous
The OSVERSIONINFOEX structure contains operating system version information. The information includes major and minor version numbers, a build number, a platform identifier, and information about product suites and the latest Service Pack installed on the system.
11/7/2012 10:31:51 AM - -74.212.48.23
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).