https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81f28d454a3f7f094065b…
commit 81f28d454a3f7f094065b42509ef51b899ba8801
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Aug 18 05:32:44 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Aug 18 05:32:44 2020 +0900
[NTUSER] Set ERROR_INVALID_WINDOW_HANDLE when PostMessage failed (#3059)
Set the last error code ERROR_INVALID_WINDOW_HANDLE when user32!PostMessage failed
with destroyed window.
CORE-12124
---
win32ss/user/ntuser/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/message.c b/win32ss/user/ntuser/message.c
index 79d68a184ea..ae0c0733ebe 100644
--- a/win32ss/user/ntuser/message.c
+++ b/win32ss/user/ntuser/message.c
@@ -1423,7 +1423,7 @@ UserPostMessage( HWND Wnd,
if ( Window->state & WNDS_DESTROYED )
{
ERR("Attempted to post message to window %p that is being
destroyed!\n", Wnd);
- /* FIXME: Last error code? */
+ EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
return FALSE;
}