x
This commit is contained in:
15
pkg/util/os_windows.go
Normal file
15
pkg/util/os_windows.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
func Is64Bit(handle windows.Handle) (bool, error) {
|
||||
var is32Bit bool
|
||||
if err := windows.IsWow64Process(handle, &is32Bit); err != nil {
|
||||
return false, fmt.Errorf("检查进程位数失败: %w", err)
|
||||
}
|
||||
return !is32Bit, nil
|
||||
}
|
||||
Reference in New Issue
Block a user