master
兔子 4 years ago
parent 3a859d6dc3
commit a740486e2c

@ -97,7 +97,7 @@ func GetRunningProcess() ([]map[string]string, error) {
} }
sakura = append(sakura, v) sakura = append(sakura, v)
} }
result = append(result, map[string]string{"name": string(sakura), "pid": strconv.Itoa(int(proc.Th32ProcessID))}) result = append(result, map[string]string{"name": string(sakura), "pid": strconv.Itoa(int(proc.Th32ProcessID)), "ppid": fmt.Sprint(int(proc.Th32ParentProcessID))})
} else { } else {
break break
} }
@ -209,6 +209,7 @@ func StartProcessWithPID(appPath, cmdLine, workDir string, runas bool, ShowWindo
sakura.Hwnd = 0 sakura.Hwnd = 0
sakura.NShow = ShowWindow sakura.NShow = ShowWindow
sakura.FMask = 0x00000040 sakura.FMask = 0x00000040
sakura.LpParameters = uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(cmdLine)))
sakura.LpFile = uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(appPath))) sakura.LpFile = uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(appPath)))
sakura.LpDirectory = uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(workDir))) sakura.LpDirectory = uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(workDir)))
if runas { if runas {

Loading…
Cancel
Save