[KERNEL32] Update some console API prototypes.
[reactos.git] / dll / win32 / kernel32 / client / console / history.c
index 2fc5024..b4513ea 100644 (file)
@@ -25,30 +25,6 @@ IntStringSize(LPCVOID String,
     ULONG Size = (Unicode ? wcslen(String) : strlen(String)) * sizeof(WCHAR);
     return (Size + 3) & ~3;
 }
-
-
-/* Copy a string to a capture buffer */
-static VOID
-IntCaptureMessageString(PCSR_CAPTURE_BUFFER CaptureBuffer,
-                        LPCVOID String,
-                        BOOL Unicode,
-                        PUNICODE_STRING RequestString)
-{
-    ULONG Size;
-    if (Unicode)
-    {
-        Size = wcslen(String) * sizeof(WCHAR);
-        CsrCaptureMessageBuffer(CaptureBuffer, (PVOID)String, Size, (PVOID *)&RequestString->Buffer);
-    }
-    else
-    {
-        Size = strlen(String);
-        CsrAllocateMessagePointer(CaptureBuffer, Size * sizeof(WCHAR), (PVOID *)&RequestString->Buffer);
-        Size = MultiByteToWideChar(CP_ACP, 0, String, Size, RequestString->Buffer, Size * sizeof(WCHAR))
-               * sizeof(WCHAR);
-    }
-    RequestString->Length = RequestString->MaximumLength = (USHORT)Size;
-}
 #endif
 
 static VOID
@@ -80,8 +56,6 @@ IntExpungeConsoleCommandHistory(LPCVOID lpExeName, BOOLEAN bUnicode)
         return;
     }
 
-    // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode,
-    //                         &ExpungeCommandHistoryRequest->ExeName);
     CsrCaptureMessageBuffer(CaptureBuffer,
                             (PVOID)lpExeName,
                             ExpungeCommandHistoryRequest->ExeLength,
@@ -131,14 +105,11 @@ IntGetConsoleCommandHistory(LPVOID lpHistory, DWORD cbHistory, LPCVOID lpExeName
         return 0;
     }
 
-    // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode,
-    //                         &GetCommandHistoryRequest->ExeName);
     CsrCaptureMessageBuffer(CaptureBuffer,
                             (PVOID)lpExeName,
                             GetCommandHistoryRequest->ExeLength,
                             (PVOID)&GetCommandHistoryRequest->ExeName);
 
-    // CsrAllocateMessagePointer(CaptureBuffer, HistoryLength,
     CsrAllocateMessagePointer(CaptureBuffer, GetCommandHistoryRequest->HistoryLength,
                               (PVOID*)&GetCommandHistoryRequest->History);
 
@@ -192,8 +163,6 @@ IntGetConsoleCommandHistoryLength(LPCVOID lpExeName, BOOL bUnicode)
         return 0;
     }
 
-    // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode,
-    //                         &GetCommandHistoryLengthRequest->ExeName);
     CsrCaptureMessageBuffer(CaptureBuffer,
                             (PVOID)lpExeName,
                             GetCommandHistoryLengthRequest->ExeLength,
@@ -248,8 +217,6 @@ IntSetConsoleNumberOfCommands(DWORD dwNumCommands,
         return FALSE;
     }
 
-    // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode,
-    //                         &SetHistoryNumberCommandsRequest->ExeName);
     CsrCaptureMessageBuffer(CaptureBuffer,
                             (PVOID)lpExeName,
                             SetHistoryNumberCommandsRequest->ExeLength,
@@ -279,7 +246,8 @@ IntSetConsoleNumberOfCommands(DWORD dwNumCommands,
  */
 VOID
 WINAPI
-ExpungeConsoleCommandHistoryW(LPCWSTR lpExeName)
+DECLSPEC_HOTPATCH
+ExpungeConsoleCommandHistoryW(IN LPCWSTR lpExeName)
 {
     IntExpungeConsoleCommandHistory(lpExeName, TRUE);
 }
@@ -290,7 +258,8 @@ ExpungeConsoleCommandHistoryW(LPCWSTR lpExeName)
  */
 VOID
 WINAPI
-ExpungeConsoleCommandHistoryA(LPCSTR lpExeName)
+DECLSPEC_HOTPATCH
+ExpungeConsoleCommandHistoryA(IN LPCSTR lpExeName)
 {
     IntExpungeConsoleCommandHistory(lpExeName, FALSE);
 }
@@ -301,9 +270,10 @@ ExpungeConsoleCommandHistoryA(LPCSTR lpExeName)
  */
 DWORD
 WINAPI
-GetConsoleCommandHistoryW(LPWSTR lpHistory,
-                          DWORD cbHistory,
-                          LPCWSTR lpExeName)
+DECLSPEC_HOTPATCH
+GetConsoleCommandHistoryW(OUT LPWSTR lpHistory,
+                          IN DWORD cbHistory,
+                          IN LPCWSTR lpExeName)
 {
     return IntGetConsoleCommandHistory(lpHistory, cbHistory, lpExeName, TRUE);
 }
@@ -314,9 +284,10 @@ GetConsoleCommandHistoryW(LPWSTR lpHistory,
  */
 DWORD
 WINAPI
-GetConsoleCommandHistoryA(LPSTR lpHistory,
-                          DWORD cbHistory,
-                          LPCSTR lpExeName)
+DECLSPEC_HOTPATCH
+GetConsoleCommandHistoryA(OUT LPSTR lpHistory,
+                          IN DWORD cbHistory,
+                          IN LPCSTR lpExeName)
 {
     return IntGetConsoleCommandHistory(lpHistory, cbHistory, lpExeName, FALSE);
 }
@@ -327,7 +298,8 @@ GetConsoleCommandHistoryA(LPSTR lpHistory,
  */
 DWORD
 WINAPI
-GetConsoleCommandHistoryLengthW(LPCWSTR lpExeName)
+DECLSPEC_HOTPATCH
+GetConsoleCommandHistoryLengthW(IN LPCWSTR lpExeName)
 {
     return IntGetConsoleCommandHistoryLength(lpExeName, TRUE);
 }
@@ -338,7 +310,8 @@ GetConsoleCommandHistoryLengthW(LPCWSTR lpExeName)
  */
 DWORD
 WINAPI
-GetConsoleCommandHistoryLengthA(LPCSTR lpExeName)
+DECLSPEC_HOTPATCH
+GetConsoleCommandHistoryLengthA(IN LPCSTR lpExeName)
 {
     return IntGetConsoleCommandHistoryLength(lpExeName, FALSE);
 }
@@ -349,8 +322,9 @@ GetConsoleCommandHistoryLengthA(LPCSTR lpExeName)
  */
 BOOL
 WINAPI
-SetConsoleNumberOfCommandsW(DWORD dwNumCommands,
-                            LPCWSTR lpExeName)
+DECLSPEC_HOTPATCH
+SetConsoleNumberOfCommandsW(IN DWORD dwNumCommands,
+                            IN LPCWSTR lpExeName)
 {
     return IntSetConsoleNumberOfCommands(dwNumCommands, lpExeName, TRUE);
 }
@@ -361,8 +335,9 @@ SetConsoleNumberOfCommandsW(DWORD dwNumCommands,
  */
 BOOL
 WINAPI
-SetConsoleNumberOfCommandsA(DWORD dwNumCommands,
-                            LPCSTR lpExeName)
+DECLSPEC_HOTPATCH
+SetConsoleNumberOfCommandsA(IN DWORD dwNumCommands,
+                            IN LPCSTR lpExeName)
 {
     return IntSetConsoleNumberOfCommands(dwNumCommands, lpExeName, FALSE);
 }
@@ -373,6 +348,7 @@ SetConsoleNumberOfCommandsA(DWORD dwNumCommands,
  */
 BOOL
 WINAPI
+DECLSPEC_HOTPATCH
 SetConsoleCommandHistoryMode(IN DWORD dwMode)
 {
     CONSOLE_API_MESSAGE ApiMessage;