gpt4 book ai didi

c# - 如何从基于 Windows 窗体的应用程序中的控制台应用程序访问变量?

转载 作者:太空宇宙 更新时间:2023-11-03 14:20:47 24 4
gpt4 key购买 nike

一种解决方案是使用 EMS 并传回变量。还有其他可能的方法吗?

最佳答案

您可以尝试使用以下方法实现:

使用 WCF 的示例:Many to One Local IPC using WCF and NetNamedPipeBindin

其他示例:A C# Framework for Interprocess Synchronization and Communication

一切都取决于您使用的 .Net Framework 版本。如果您使用 .net 3.0。及以上然后你可以看看WCF .如果没有,那么你只能靠自己了,你可以用谷歌搜索关键字 P/Invoke (CreateFileMapping, MapViewOfFile, CreatePipe...)

关于c# - 如何从基于 Windows 窗体的应用程序中的控制台应用程序访问变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5472844/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com