Hello everyone, this is my first official post on this forum, and it bothers me that it's a question but i can't figure out how to do this well.

Basically, I have a tv-tuner card with software that doesn't work well with windows xp. I got a freeware program that does work with both my tv tuner card and windows xp, with the exception that it doesn't recognize the remote control that comes with my tv-tuner card.

Now here comes the programming part.
The company that makes the card provided a remote control sdk. The interface is very simple, the manufacterers software can make the remote control broadcast messages that all applications get instead of handling it directly.

I made a sloppy asm program that can start the freeware program (using createProcess) when the powerbutton is pressed on the remote.

Now I want to send the remote control messages to the freeware application as keyboard messages, but I'm not sure how to do that.

I thought I could juse do a postMessage or something, but I don't think that would work with external processes especially if I don't know how to get the windowhandle of the program.

I think I might be able to do it with hooks, but I'm not sure how to send messages with hooks.

Right now, I think the best solution is to open the processes memory and find the windowprocedure and put in extra code for it to recognize the broadcasted remotecontrol messages. But I don't know how to do that either.

Does anyone have any ideas on how I can do this?
Posted on 2002-05-31 00:29:08 by Satrukaan
I think I'm making this harder than it sounds.

I basically want to know how you can send a message to a window in a process you start by createprocess.
Does anyone have any ideas?
Posted on 2002-05-31 19:38:43 by Satrukaan
Hi,

To send a message to a window, you need the handle of that window.
You can use FindWindow for this.

see thread (reply of mob)

http://www.asmcommunity.net/board/index.php?topic=5634&highlight=handle+window

and then you can send a

WM_KEYDOWN message with SendMessage.
Posted on 2002-05-31 19:52:42 by Jurgen
Thanks for the help. I can't believe I didn't think that there was a find window.
Posted on 2002-06-02 02:47:52 by Satrukaan