Is it possible to get the HWND of the window/app that sent a message to current app (using SendMessage/PostMessage) ? Of course, I mean without the sending app setting its own HWND in wparam/lparam.
Asked
Active
Viewed 43 times
0
-
3That's not possible. Best to describe the problem you're trying to solve instead of hoping for miracles. – Hans Passant Apr 28 '23 at 14:31
-
Was trying to provide basic level of security, such as accepting messages only from registered sources. In this case, "registered sources" would be programs that would "sign-in" into the receiving app, providing some basic auth info. Not trying to provide foolproof security, but just a way to ignore spurious messages that could come from random apps. – Dess Apr 28 '23 at 15:03
-
1https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerwindowmessagew – Hans Passant Apr 28 '23 at 15:15