Click here to Skip to main content
12,756,624 members (32,719 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
I have recently made a program that has a string collection in it, for example it will have this

string collection name = stringdata

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?
Posted 2-Feb-13 1:07am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
TechXSoftware 2-Feb-13 6:15am
Ah I see I thought I probably couldn't do it :( can you please give me some information on this socket? It my be useful if I want to update a program
OriginalGriff 2-Feb-13 6:32am
There is a good guide to sockets here:
(ignore the name, it's C# - '#' isn't a normal character!)
But if you are designing from scratch, it might be an idea to read up on WCF instead - it's a much more modern way to do it!
Garth J Lancaster 2-Feb-13 6:33am
As per OriginalGriff's Solution : there are plenty of examples of socket servers etc out there on the net - eg ..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 2 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100