Here's the deal:
I have PHP 4.2.3 running on Win2k SP3. I have a program running in the background, aside from the server. This program, like any other win32 program, can receive messages via SendMessage. When it receives a specific message, it is supposed to carry out a certain function. Here is the problem: There is no way to send a message to this window through PHP. I have tried using exec() and system() in PHP to execute a separate program to send the message to the other window. In order for this program to send the other window a message, it has to know its handle. Strangely, in PHP, this program CANNOT find the handle even though it DOES exist. When PHP uses the exec()/system() command, it runs the program as a thread under its own process, and the window, for some reason, cannot "see" the other windows running in Windows. So, I decided to use the w32api functions that came with PHP. I did a w32_register_function for SendMessage and FindWindow. I figured I'd use FindWindow to find my other window handle and then SendMessage to send the message. This did not work, either. Soooo, if you're still with me, how can I get PHP to send a message to another window running on the side?

    it has never been nice to perform cross thread posts...

      Write a Reply...