text: Q:
  
  location of one program corresponding to another c++
  
  I have two programs So if i have one program "local" on machine A and another "remote" on machine B how can program "local" find out whether they both are running on same machine or different machine in c++ under windows environment.
  
  A:
  
  Send the IP address of "self" from "local" to "remote"? Or let "remote" send it's IP address to "local". Then compare with "its own" IP address. If they are the same, then must be the same machine [or the machine has multiple network cards connected to the same overall network].
  Ask for some other machine specific ID, such as mac-address, hard disk ID, etc. 
  There are myriad of different methods that may or may not work, depending on what you are actually trying to do.
  Edit based on comment:
  If you want to check if the program is available on the same machine, you could use a "named pipe" or some other named IPC mechanism, and simply check if the named IPC is available on the local machine. If not, use remote machine mechanism (e.g. TCP/IP).
  
  