This commit is contained in:
Shen Junzheng
2025-03-12 01:19:35 +08:00
parent 160040f3e1
commit 78cce92ce3
70 changed files with 10134 additions and 1 deletions

15
pkg/util/os_windows.go Normal file
View 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
}