in reply to Interprocess communication in windows xp

For tcp/ip sockets, use: IO::Socket::INET

2."The address of the destination in network-byte order", 3."The port of the destination in host-byte order"

You won't need to worry about byte order in perl. In fact, you don't even need to use a numerical address; if it is all on one machine, just use 'localhost'.

One of the programs will act as a server, the other will act as a client. If you say a little more about the nature and purpose of the communication, someone can give you an opinion about which should be which. You may also want to consider UDP sockets instead of TCP (in which case there is no client server relationship); I have not done this specifically in perl but it works very well for localhost applications, and there is Net::UDP.

One probably issue will be the need to thread the socket with the GUI, or use some kind of event driven model, since (generally) the socket and the interface need to make themselves available simultaneously. I don't think the Tk module alone has facilities for this.

I am totally unaware whether this is simple task or complicated.

If you haven't done it before and you have to deal with the concurrency issue, don't expect to get it done today. ;) You might want to tackle this by first coming up with a model for the socket communication outside the context of your GUI app, then thinking about how to incorporate it.

Replies are listed 'Best First'.
Re^2: Interprocess communication in windows xp
by neha16 (Initiate) on Apr 13, 2012 at 12:45 UTC
    Hi thanks..

    Actually Application.exe uses TCP\IP APIs to interact with the other application as example say MSWORD...

    now i need my perl program to communicate with this Application.exe.. Application.exe have configured socket,address,port of MSWORD ..

    now my real thought is how to configure this application.exe ie socket,address,port to communicate with my perl program.. and What i should program in my perl program to establish the connection and communicate

      socket,address,port of MSWORD

      Sorry, to say this, but I think you may be a little confused about those things. AFAIK, MSWORD doesn't use sockets for anything.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

      In other words, you didn't write Application.exe and cannot modify it.

      That may present some challenges depending on if and how well the socket interface is documented. Presumably, it is running as a server. You need to determine how the protocol it uses works; if there is no documentation for this you must do it by observing it interact with whatever client it was intended to work with. That means eavesdropping on the connection with something like wireshark.

      now my real thought is how to configure this application.exe ie socket,address,port to communicate with my perl program
      What is this mysterious Application.exe? Is it a commercial product? An open source tool? Or was it written in-house by someone else in your company? I'm assuming you didn't write it since you don't know how to configure it.