Reputation: 1513
I often use PostMessage in my Delphi programs to send messages between forms but I have been asked if I could make it possible to have a program running on a server doing some of the data manipulation instead of on the users computer to speed things up. In order to do this I think the easiest way must be to send a Windows message to the program on the server telling it to do something. I have been looking around the internet but haven't found something that really helps me. A lot about the net send, but that won't help.
So my question is: Is it at all possible to send a Windows message to a program running on another computer (Knowing the IP) and where can I read about it?
Upvotes: 1
Views: 844
Reputation: 30715
If your client computers are on the same LAN as the server, you might seriously consider moving your data manipulation into a DataSnap server written in Delphi.
Delphi comes with all the wherewithal you need for client machines to interact with a DataSnap server without having to get near Indy or having to re-invent the wheel to devise some kind of client-server protocol for the clients and server to interact.
Despite the impression the name might give, DataSnap doesn't have to involve a DBMS on the server, though it can easily do so.
Upvotes: 2
Reputation: 612964
Windows messages cannot be sent to recipients on a different machine. They are delivered to windows on the local machine. In fact, they cannot be sent to windows in a different session on the same machine.
You need to look for a different form of communication. Something based on sockets, TCP/IP and so on is what is needed.
Upvotes: 2