阶段十:完成 Go Cmd Tools 注释基线清零
This commit is contained in:
1 parent
393c45a1e3
commit
ea1f2ec430
25 files changed
+694
-4281
No files matched your search
@@ -8,11 +8,14 @@ import (
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
// acquireTrayInstance 负责acquireTrayInstance相关处理。
|
||||
func acquireTrayInstance() (release func(), acquired bool, err error) {
|
||||
// mutexName、err 保存mutexName、err,供当前处理流程使用
|
||||
mutexName, err := windows.UTF16PtrFromString(`Local\YdisksXianyuHelperTray`)
|
||||
if err != nil {
|
||||
return nil, false, fmt.Errorf("生成托盘互斥锁名称失败: %w", err)
|
||||
}
|
||||
// handle、err 保存handle、err,供当前处理流程使用
|
||||
handle, err := windows.CreateMutex(nil, false, mutexName)
|
||||
if err == windows.ERROR_ALREADY_EXISTS {
|
||||
if handle != 0 {
|
||||
|
||||
Reference in new issue
Block a user