Option Explicit Private Declare Function IsWow64Process Lib "kernel32" (ByVal hProcess As Long,ByRef bIsNotX60 As Boolean) As Boolean Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long,ByVal bInheritHandle As Long,ByVal dwProcessID As Long) As Long Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Const PROCESS_QUERY_INFORMATION As Long = &H400 Function IsWow64ProcessFromPID(ProcessID As Long) As Boolean Dim hProcess As Long Dim bIsNotX64 As Boolean hProcess = OpenProcess(PROCESS_QUERY_INFORMATION,False,ProcessID) If IsWow64Process(hProcess,bIsNotX64) = False Then Err.Raise 22011,"IsWow64Process 执行失败""" End If If bIsNotX64 Then IsWow64ProcessFromPID = False '32位进程 Else IsWow64ProcessFromPID = True '64位进程 End If End Function '--------- Win7 64位 测试正常. Private Sub Form_Load() '----------------------------------- 测试 ------------------------------------------ Const B_X64 As Long = 640 '64位进程ID Const B_X86 As Long = 2276 '32位进程ID If IsWow64ProcessFromPID(B_X64) Then Debug.Print B_X64 & "是64位进程" Else Debug.Print B_X64 & "是32位进程" End If If IsWow64ProcessFromPID(B_X86) Then Debug.Print B_X86 & "是64位进程" Else Debug.Print B_X86 & "是32位进程" End If End Sub