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, bWow64Process As Boolean) As Long
'判断本机是否为64位机
Public Function Is64bit() As Boolean
Dim handle As Long, bolFunc As Boolean
bolFunc = False
handle = GetProcAddress(GetModuleHandle("kernel32"), "IsWow64Process")
If handle > 0 Then
IsWow64Process GetCurrentProcess(), bolFunc
End If
Is64bit = bolFunc
End Function
判断是否为64位机
猜你喜欢
转载自blog.csdn.net/i1j2k3/article/details/41511075
今日推荐
周排行