[WIN32K:NTUSER] Similarly to what was done in USERSRV for harderrors, introduce the...
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 16 Jul 2018 23:47:59 +0000 (01:47 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 19 Aug 2018 20:18:34 +0000 (22:18 +0200)
win32ss/user/ntuser/misc.c
win32ss/user/ntuser/userfuncs.h

index fee2e91..83d0ad1 100644 (file)
@@ -9,6 +9,30 @@
 #include <win32k.h>
 DBG_DEFAULT_CHANNEL(UserMisc);
 
 #include <win32k.h>
 DBG_DEFAULT_CHANNEL(UserMisc);
 
+
+/*
+ * NOTE: _scwprintf() is NOT exported by ntoskrnl.exe,
+ * only _vscwprintf() is, so we need to implement it here.
+ * Code comes from sdk/lib/crt/printf/_scwprintf.c .
+ * See also win32ss/user/winsrv/usersrv/harderror.c .
+ */
+int
+__cdecl
+_scwprintf(
+    const wchar_t *format,
+    ...)
+{
+    int len;
+    va_list args;
+
+    va_start(args, format);
+    len = _vscwprintf(format, args);
+    va_end(args);
+
+    return len;
+}
+
+
 /*
  * Test the Thread to verify and validate it. Hard to the core tests are required.
  */
 /*
  * Test the Thread to verify and validate it. Hard to the core tests are required.
  */
index efa89ae..29ae239 100644 (file)
@@ -92,6 +92,12 @@ HKL FASTCALL UserGetKeyboardLayout(DWORD dwThreadId);
 
 /*************** MISC.C ***************/
 
 
 /*************** MISC.C ***************/
 
+int
+__cdecl
+_scwprintf(
+    const wchar_t *format,
+    ...);
+
 BOOL FASTCALL
 UserSystemParametersInfo(
   UINT uiAction,
 BOOL FASTCALL
 UserSystemParametersInfo(
   UINT uiAction,