CheckISNt() api function in Framework 2.0
Hi all of you,
Does anyone know what function replaces that?
Well, that's a customized function which has inside this stuff:
Dim OSVer As OSVERSIONINFO
OSVer.dwOSVersionInfoSize = LenB(OSVer)
GetVersionEx OSVer
CheckIsNT = OSVer.dwPlatformId = VER_PLATFORM_WIN32_NT
TIA
I've seen this snippet of code which is helpful for my case:
Imports System.Runtime.InteropServices
Module
Module1Public Declare Auto Function GetVersionEx Lib "kernel32.dll" (<MarshalAs(UnmanagedType.Struct)> ByRef osinfo As OSVERSIONINFOEX) As Int32' Definición de la estructura<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Auto)> _
Public Structure OSVERSIONINFOEXPublic dwOSVersionInfoSize As Int32Public dwMajorVersion As Int32Public dwMinorVersion As Int32Public dwBuildNumber As Int32Public dwPlatformId As Int32<MarshalAs(UnmanagedType.ByValTStr, _
SizeConst:=128)>
Public szCSDVersion As StringPublic wServicePackMajor As Int16Public wServicePackMinor As Int16Public wSuiteMask As Int16Public wProductType As BytePublic wReserved As ByteEnd Structure
Public Function VerSO() As BooleanDim osverinfo As OSVERSIONINFOEXDim result As Integerosverinfo.dwOSVersionInfoSize = Marshal.SizeOf(osverinfo)
result = GetVersionEx(osverinfo)
if osverinfo.dwPlatformId = 2 'is nt
End FunctionEnd
Module
Thanks anyway