Sending messages to other windows

Is it possible to send messages (for example WM_CLOSE) to an other program's window ? If yes, how ? Thanks in advance.

- Alienripper

Comments

  • [b][red]This message was edited by AsmGuru62 at 2002-10-23 6:42:17[/red][/b][hr]
    : Is it possible to send messages (for example WM_CLOSE) to an other program's window ? If yes, how ? Thanks in advance.
    :
    : - Alienripper
    :
    [blue]Use [b]FindWindow()[/b]/[b]EnumWindows()[/b] to get an [b]HWND[/b] of an application of interest. Use [b]SendMessage()[/b] to send it. [/blue]


  • Thanks ! I experimented a bit with Notepad and similar programs, but didn't manage to send keypresses properly :( Darn.

  • : Thanks ! I experimented a bit with Notepad and similar programs, but didn't manage to send keypresses properly :( Darn.
    :
    :
    [blue]Maybe WM_KEYUP, DOWN, CHAR... etc are allowed only between the threads of the same process? If it will be allowed to anyone - it will be very easy to hack into applications. So, it is not that easy - your need to 'pretend' to be the same process as you are trying to hack. One way is to run the process you want to send messages to with [b]CreateProcess()[/b] with the debugging flags.[/blue]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories