func GetCommandLineForPid(pid uint32) (cmdline string, err error) {
	h, err := windows.OpenProcess(0x1010, false, uint32(pid))
	if err != nil {
		err = fmt.Errorf("Failed to open process %v", err)
		return
	}
	defer windows.CloseHandle(h)
	cmdline, err = GetCommandLineForProcess(h)
	if err != nil {
		err = fmt.Errorf("Failed to get command line %v", err)
		return
	}
	return GetCommandLineForProcess(h)
}
// GetCommandLineForPid returns the command line for the given PID
GetCommandLineForPid returns the command line for the given PID
// GetCommandLineForPid returns the command line for the given PID
func GetCommandLineForPid(pid uint32) (cmdline string, err error) {
	h, err := windows.OpenProcess(0x1010, false, uint32(pid))
	if err != nil {
		err = fmt.Errorf("Failed to open process %v", err)
		return
	}
	defer windows.CloseHandle(h)
	cmdline, err = GetCommandLineForProcess(h)
	if err != nil {
		err = fmt.Errorf("Failed to get command line %v", err)
		return
	}
	return GetCommandLineForProcess(h)
}
func GetCommandLineForPid ( pid uint32 ) ( cmdline string , err error ) { h , err := windows . OpenProcess ( 0x1010 , false , uint32 ( pid ) ) if err != nil { err = fmt . Errorf ( " " , err ) return } defer windows . CloseHandle ( h ) cmdline , err = GetCommandLineForProcess ( h ) if err != nil { err = fmt . Errorf ( " " , err ) return } return GetCommandLineForProcess ( h ) }
GetCommandLineForPid returns the command line for the given PID
GetCommandLineForPid returns the command line for the given PID