C#访问其他程序的设置 [英] C# accessing settings from another program

查看:61
本文介绍了C#访问其他程序的设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近制作了一个包含字符串集的程序,例如它会有这个



字符串集合名称= stringdata

I have recently made a program that has a string collection in it, for example it will have this

string collection name = stringdata

hi<br />
1234<br />
4321<br />
hello<br />
1234<br />
4321





我们可以拨打程序程序X。



现在我已经制作了一个程序X的程序,但我刚刚更新了它。现在我们称之为程序X程序Y,因为它只是它的更新版本。



我想从程序X访问字符串数据并将字符串数据放入程序Y这可能吗?



and lets call the program "program X".

Now I have made a program that is "program X" but I just updated it. And now We call this "program X" "program Y" now, because it is just an updated version of it.

I want to access the stringdata from "program X" and put the stringdata into "program Y" is this possible?

推荐答案

你不能从不同的程序(甚至从同一个程序的单独运行实例)访问正在运行的程序的内存,所以除非你写了程序X以某种方式暴露它(通过文件,套接字连接或其他方式)然后你无法在程序Y中访问它。



试图访问不同的内存应用程序是应用程序崩溃的主要原因之一 - 无论是否故意,您都无法访问自己的进程内存空间。
You can''t access the memory of a running program from a different program (or even from a separate running instance of the same program) so unless you wrote "Program X" to expose it in some way (via a file, or a socket connection, or some other means) then you cannot access it in "Program Y".

Trying to access the memory of a different application is one of the main reasons for an application crashing - whether it is deliberate or not you can''t access outside your own processes memory space.


这篇关于C#访问其他程序的设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆