https://git.reactos.org/?p=reactos.git;a=commitdiff;h=88c1d8c737cd252b77cef181bc2b5cd0ddad3234

commit 88c1d8c737cd252b77cef181bc2b5cd0ddad3234
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Sun Apr 10 19:26:19 2022 +0900
Commit:     GitHub <[email protected]>
CommitDate: Sun Apr 10 19:26:19 2022 +0900

    [NTUSER] Set error on NtUserCreateInputContext (#4444)
    
    Set the error code correctly on NtUserCreateInputContext.
    CORE-11700
---
 win32ss/user/ntuser/ime.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/win32ss/user/ntuser/ime.c b/win32ss/user/ntuser/ime.c
index 27342263904..1c46bfded3b 100644
--- a/win32ss/user/ntuser/ime.c
+++ b/win32ss/user/ntuser/ime.c
@@ -1377,14 +1377,18 @@ NtUserCreateInputContext(ULONG_PTR dwClientImcData)
     PIMC pIMC;
     HIMC ret = NULL;
 
-    if (!dwClientImcData)
-        return NULL;
-
     UserEnterExclusive();
 
     if (!IS_IMM_MODE())
     {
         ERR("!IS_IMM_MODE()\n");
+        EngSetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+        goto Quit;
+    }
+
+    if (!dwClientImcData)
+    {
+        EngSetLastError(ERROR_INVALID_PARAMETER);
         goto Quit;
     }
 

Reply via email to