Connecting to another computer

are there any functions that would allow me to connect to another computer, if i know the IP address?
Who is Participating?
lseanConnect With a Mentor Commented:
One straight forward way is: you need to write two programs: Prog1 and Prog2.
1. Prog1 runs on your computer, Prog2 runs on the remote computer.
2. Prog1 has to be implemented to connect to prog2 and send requests for either executing a command or retrieving data on the remote computer.
3. Prog2 will accept connection from prog1 and perform the actions according to instructions received frmo prog1 (for example, edit a registry entry, or send a whole file to prog1 to be displayed on your computer).
4. You can use the CSocket class in MFC to connect the two programs, but this part alone is not easy if you don't have enough experience.
5. There will many other issues as you begin implementation, but the idea works.
What in particular are you looking for on the other computer?  Do you want to access files, registry, database files, server program?  Depending upon what you want there are plenty of facilities out there for you.

GreatOneAuthor Commented:
i would need to access files and the registry. and maybe, the server program.
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Wow, would it be possible for you to elaborate on this project?  Also, what is the "server program?"  I am not entirely clear on what you want to do (I am also a little slow...).
GreatOneAuthor Commented:
What I want to do is connect to a remote computer, which is not on the same network as i am. The only thing i will have is the IP of the computer. I would need to access the files as well as the registry. Basically, i want to establish a connection and perform basic operations, like editing the registry and file manipulation. does that help?
GreatOneAuthor Commented:
does anyone know of a site that has sample code which used Csocket class? it will help me to get started.

If you want I can send you a program that i made using the class CSocket.... the program works like ICQ ..... You can send message from clients to clients throw server .... if you want to make another thing you just implement it..
and if you found it usefull you can gave me the points.. :)
GreatOneAuthor Commented:
i would like to take a look at your code. I looked at the samples provided with VC++ and they were of some help. Maybe looking at your code might help me some more. Email to me at or At this point, i am able to setup a connection between the two computers, but have not figured out how to implement code to allow file transfer. But like i said, looking at your code might help. And if it does, i will give you the points.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.