[CSRSRV][CONSRV]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 5 Oct 2013 23:34:25 +0000 (23:34 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 5 Oct 2013 23:34:25 +0000 (23:34 +0000)
CSR_WAIT_FUNCTION functions are callbacks and therefore are __stdcall aka. NTAPI. Fix this.
Now, using either our csrsrv or win2k3' csrsrv works without problems; there is no console key-press problems anymore (aka. stack corruption when calling multiple times CsrNotifyWait, which called those CSR_WAIT_FUNCTION functions).

svn path=/trunk/; revision=60553

reactos/include/reactos/subsys/csr/csrsrv.h
reactos/win32ss/user/winsrv/consrv/coninput.c
reactos/win32ss/user/winsrv/consrv/conoutput.c

index b904710..6c89d14 100644 (file)
@@ -134,7 +134,7 @@ typedef enum _CSR_REPLY_CODE
  */
 typedef
 BOOLEAN
-(*CSR_WAIT_FUNCTION)(
+(NTAPI *CSR_WAIT_FUNCTION)(
     IN PLIST_ENTRY WaitList,
     IN PCSR_THREAD WaitThread,
     IN PCSR_API_MESSAGE WaitApiMessage,
index 7adb684..6476e74 100644 (file)
@@ -78,6 +78,7 @@ ReadChars(IN PGET_INPUT_INFO InputInfo,
 
 // Wait function CSR_WAIT_FUNCTION
 static BOOLEAN
+NTAPI
 ReadCharsThread(IN PLIST_ENTRY WaitList,
                 IN PCSR_THREAD WaitThread,
                 IN PCSR_API_MESSAGE WaitApiMessage,
@@ -193,6 +194,7 @@ ReadInputBuffer(IN PGET_INPUT_INFO InputInfo,
 
 // Wait function CSR_WAIT_FUNCTION
 static BOOLEAN
+NTAPI
 ReadInputBufferThread(IN PLIST_ENTRY WaitList,
                       IN PCSR_THREAD WaitThread,
                       IN PCSR_API_MESSAGE WaitApiMessage,
index 6a0f10c..b9d0a5e 100644 (file)
@@ -308,6 +308,7 @@ DoWriteConsole(IN PCSR_API_MESSAGE ApiMessage,
 
 // Wait function CSR_WAIT_FUNCTION
 static BOOLEAN
+NTAPI
 WriteConsoleThread(IN PLIST_ENTRY WaitList,
                    IN PCSR_THREAD WaitThread,
                    IN PCSR_API_MESSAGE WaitApiMessage,