Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s
23 lines
581 B
Go
23 lines
581 B
Go
//go:build windows
|
|
|
|
package main
|
|
|
|
import "golang.org/x/sys/windows"
|
|
|
|
const maxWindowsProcessImagePath = 32768
|
|
|
|
func processExecutablePath(pid int) (string, error) {
|
|
handle, err := windows.OpenProcess(windows.PROCESS_QUERY_LIMITED_INFORMATION, false, uint32(pid))
|
|
if err != nil {
|
|
return "", err
|
|
}
|
|
defer windows.CloseHandle(handle)
|
|
|
|
buffer := make([]uint16, maxWindowsProcessImagePath)
|
|
size := uint32(len(buffer))
|
|
if err := windows.QueryFullProcessImageName(handle, 0, &buffer[0], &size); err != nil {
|
|
return "", err
|
|
}
|
|
return windows.UTF16ToString(buffer[:size]), nil
|
|
}
|