PostThreadMessage for another process

I want to send a message to a thread that runs as another process (in particular, as a Windows service). I read the documentation for PostThreadMessage , but there are some things for me.

How to get a handle for my service flow?

The system only sorts system messages (ranging from 0 to (WM_USER-1)). To send other messages (those> = WM_USER) to another process, you must perform custom sorting.

I want to send my own messages, so how do I do this?

+3
source share
1 answer

PostThreadMessage . , . , - , . CreateToolHelp32Snapshot() , , .

. CreateNamedPipe() , "Global", . . , , , , . , .

- , , COM. COM , , . , COM-.

+3

Source: https://habr.com/ru/post/1750989/


All Articles