Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 是否有一种在进程运行结束后返回字符串值的好方法?_Windows_Process - Fatal编程技术网

Windows 是否有一种在进程运行结束后返回字符串值的好方法?

Windows 是否有一种在进程运行结束后返回字符串值的好方法?,windows,process,Windows,Process,我有两个过程,一个是A,另一个是B。 A将启动B并等待B。B完成后,它将生成一个字符串值。 A如何获取这个字符串值 平台是windows。 我能想到的是使用注册表或文件。API GetExitCodeProcess只能获取退出代码。 还有其他更好的办法吗 非常感谢。让进程B写入stdout,然后由进程a读取。有许多Windows IPC资源。 您可以将字符串写入stdout并使用未命名管道获取它:

我有两个过程,一个是A,另一个是B。 A将启动B并等待B。B完成后,它将生成一个字符串值。 A如何获取这个字符串值

平台是windows。 我能想到的是使用注册表或文件。API GetExitCodeProcess只能获取退出代码。 还有其他更好的办法吗


非常感谢。

让进程B写入
stdout
,然后由进程a读取。

有许多Windows IPC资源。

您可以将字符串写入stdout并使用未命名管道获取它: