PostMessage: Access Denied
The application shall receive messages from all processes of the system. Messages are sent using PostMessage call, which returns an error (5, access denied).
The code works correctly on Windows XP SP2, but on Windows 7 application receive messages from only itself, which it should be supposed to ge开发者_高级运维t message from every application.
Reading the documentation of PostMessage, I can read:
When a message is blocked by UIPI the last error, retrieved with GetLastError, is set to 5 (access denied).
But actually it doesn't say how workaround this "UIPI". How do I?
You can allow your program to receive a specific message by using ChangeWindowMessageFilterEx function.
精彩评论