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 Structures, prefix the name with the module name and a period.
OSVERSIONINFO (Structures)
.
C# Definitions:
// Use this when the unmanaged API expects the structure passed by-value, or
// or if you want to pass it by-reference as a pointer to a structure
struct OSVERSIONINFO {
public int OSVersionInfoSize;
[ MarshalAs( UnmanagedType.ByValTStr, SizeConst=128 )]
public String versionString;
}
// Use this when you want to pass it by-value even though the unmanaged API
// expects a pointer to a structure. Being a class adds an extra level of indirection.
[StructLayout(LayoutKind.Sequential)]
class OSVERSIONINFO
{
public int OSVersionInfoSize;
[ MarshalAs( UnmanagedType.ByValTStr, SizeConst=128 )]
public String versionString;
}
VB Definitions:
' Use this when the unmanaged API expects the structure passed by-value, or
' or if you want to pass it by-reference as a pointer to a structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
Public Structure OSVERSIONINFO
Dim dwOSVersionInfoSize As Integer
Dim dwMajorVersion As Integer
Dim dwMinorVersion As Integer
Dim dwBuildNumber As Integer
Dim dwPlatformId As Integer
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> _
Dim szCSDVersion As String
End Structure
' Use this when you want to pass it by-value even though the unmanaged API
' expects a pointer to a structure. Being a class adds an extra level of indirection.
<StructLayout(LayoutKind.Sequential)> _
Class OSVERSIONINFO
Dim dwOSVersionInfoSize As Integer
Dim dwMajorVersion As Integer
Dim dwMinorVersion As Integer
Dim dwBuildNumber As Integer
Dim dwPlatformId As Integer
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=128)> _
Dim szCSDVersion As String
End Class
Notes:
The C# signatures are incomplete, but I've only tested the VB ones.
Please edit this page!
Do you have...
helpful tips?
corrections to the existing content?
alternate definitions?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.