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
return;
}
- // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode,
- // &ExpungeCommandHistoryRequest->ExeName);
CsrCaptureMessageBuffer(CaptureBuffer,
(PVOID)lpExeName,
ExpungeCommandHistoryRequest->ExeLength,
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);
return 0;
}
- // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode,
- // &GetCommandHistoryLengthRequest->ExeName);
CsrCaptureMessageBuffer(CaptureBuffer,
(PVOID)lpExeName,
GetCommandHistoryLengthRequest->ExeLength,
return FALSE;
}
- // IntCaptureMessageString(CaptureBuffer, lpExeName, bUnicode,
- // &SetHistoryNumberCommandsRequest->ExeName);
CsrCaptureMessageBuffer(CaptureBuffer,
(PVOID)lpExeName,
SetHistoryNumberCommandsRequest->ExeLength,
*/
VOID
WINAPI
-ExpungeConsoleCommandHistoryW(LPCWSTR lpExeName)
+DECLSPEC_HOTPATCH
+ExpungeConsoleCommandHistoryW(IN LPCWSTR lpExeName)
{
IntExpungeConsoleCommandHistory(lpExeName, TRUE);
}
*/
VOID
WINAPI
-ExpungeConsoleCommandHistoryA(LPCSTR lpExeName)
+DECLSPEC_HOTPATCH
+ExpungeConsoleCommandHistoryA(IN LPCSTR lpExeName)
{
IntExpungeConsoleCommandHistory(lpExeName, FALSE);
}
*/
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);
}
*/
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);
}
*/
DWORD
WINAPI
-GetConsoleCommandHistoryLengthW(LPCWSTR lpExeName)
+DECLSPEC_HOTPATCH
+GetConsoleCommandHistoryLengthW(IN LPCWSTR lpExeName)
{
return IntGetConsoleCommandHistoryLength(lpExeName, TRUE);
}
*/
DWORD
WINAPI
-GetConsoleCommandHistoryLengthA(LPCSTR lpExeName)
+DECLSPEC_HOTPATCH
+GetConsoleCommandHistoryLengthA(IN LPCSTR lpExeName)
{
return IntGetConsoleCommandHistoryLength(lpExeName, FALSE);
}
*/
BOOL
WINAPI
-SetConsoleNumberOfCommandsW(DWORD dwNumCommands,
- LPCWSTR lpExeName)
+DECLSPEC_HOTPATCH
+SetConsoleNumberOfCommandsW(IN DWORD dwNumCommands,
+ IN LPCWSTR lpExeName)
{
return IntSetConsoleNumberOfCommands(dwNumCommands, lpExeName, TRUE);
}
*/
BOOL
WINAPI
-SetConsoleNumberOfCommandsA(DWORD dwNumCommands,
- LPCSTR lpExeName)
+DECLSPEC_HOTPATCH
+SetConsoleNumberOfCommandsA(IN DWORD dwNumCommands,
+ IN LPCSTR lpExeName)
{
return IntSetConsoleNumberOfCommands(dwNumCommands, lpExeName, FALSE);
}
*/
BOOL
WINAPI
+DECLSPEC_HOTPATCH
SetConsoleCommandHistoryMode(IN DWORD dwMode)
{
CONSOLE_API_MESSAGE ApiMessage;