Neexistuje v .net neco jednodusiho pro zjisteni 64bit OS nez toto?
Imports system
Module Module1
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, _
ByVal lpProcName As String) As Long
Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" _
(ByVal lpModuleName As String) As Long
Private Declare Function GetCurrentProcess Lib "kernel32" () As Long
Private Declare Function IsWow64Process Lib "kernel32" (ByVal hProc As Long, _
ByVal bWow64Process As Boolean) As Long
Public Sub Main() 'Is64Bit()
Dim handle, bolFunc As Boolean
' Assume initially that this is not a Wow64 process
bolFunc = False
' Now check to see if IsWow64Process function exists
handle = GetProcAddress(GetModuleHandle("kernel32"), "IsWow64Process")
If handle > 0 Then ' IsWow64Process function exists
IsWow64Process(GetCurrentProcess(), bolFunc)
End If
Dim WinBit As String = " (32bit)"
If bolFunc Then WinBit = " (64bit)"
End Sub
End Module
|