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

[336 byte] By [enricvives] at [2007-12-23]
# 1

I've seen this snippet of code which is helpful for my case:

Imports System.Runtime.InteropServices

Module Module1

Public 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 OSVERSIONINFOEX

Public dwOSVersionInfoSize As Int32

Public dwMajorVersion As Int32

Public dwMinorVersion As Int32

Public dwBuildNumber As Int32

Public dwPlatformId As Int32

<MarshalAs(UnmanagedType.ByValTStr, _

SizeConst:=128)> Public szCSDVersion As String

Public wServicePackMajor As Int16

Public wServicePackMinor As Int16

Public wSuiteMask As Int16

Public wProductType As Byte

Public wReserved As Byte

End Structure

Public Function VerSO() As Boolean

Dim osverinfo As OSVERSIONINFOEX

Dim result As Integer

osverinfo.dwOSVersionInfoSize = Marshal.SizeOf(osverinfo)

result = GetVersionEx(osverinfo)

if osverinfo.dwPlatformId = 2 'is nt

End Function

End Module

Thanks anyway

enricvives at 2007-8-30 > top of Msdn Tech,Visual Basic,Visual Basic General...