26 return (
Size + 3) & ~3;
46 ExpungeCommandHistoryRequest->
ExeLength = NumChars * (bUnicode ?
sizeof(
WCHAR) :
sizeof(
CHAR));
47 ExpungeCommandHistoryRequest->
Unicode =
48 ExpungeCommandHistoryRequest->
Unicode2 = bUnicode;
54 DPRINT1(
"CsrAllocateCaptureBuffer failed!\n");
67 sizeof(*ExpungeCommandHistoryRequest));
93 GetCommandHistoryRequest->
ExeLength = NumChars * (bUnicode ?
sizeof(
WCHAR) :
sizeof(
CHAR));
94 GetCommandHistoryRequest->
Unicode =
95 GetCommandHistoryRequest->
Unicode2 = bUnicode;
103 DPRINT1(
"CsrAllocateCaptureBuffer failed!\n");
119 sizeof(*GetCommandHistoryRequest));
128 GetCommandHistoryRequest->
History,
153 GetCommandHistoryLengthRequest->
ExeLength = NumChars * (bUnicode ?
sizeof(
WCHAR) :
sizeof(
CHAR));
154 GetCommandHistoryLengthRequest->
Unicode =
155 GetCommandHistoryLengthRequest->
Unicode2 = bUnicode;
161 DPRINT1(
"CsrAllocateCaptureBuffer failed!\n");
168 GetCommandHistoryLengthRequest->
ExeLength,
174 sizeof(*GetCommandHistoryLengthRequest));
206 SetHistoryNumberCommandsRequest->
NumCommands = dwNumCommands;
207 SetHistoryNumberCommandsRequest->
ExeLength = NumChars * (bUnicode ?
sizeof(
WCHAR) :
sizeof(
CHAR));
208 SetHistoryNumberCommandsRequest->
Unicode =
209 SetHistoryNumberCommandsRequest->
Unicode2 = bUnicode;
215 DPRINT1(
"CsrAllocateCaptureBuffer failed!\n");
222 SetHistoryNumberCommandsRequest->
ExeLength,
228 sizeof(*SetHistoryNumberCommandsRequest));
358 SetHistoryModeRequest->
Mode = dwMode;
363 sizeof(*SetHistoryModeRequest));
#define DECLSPEC_HOTPATCH
ACPI_SIZE strlen(const char *String)
@ ConsolepGetCommandHistoryLength
@ ConsolepSetNumberOfCommands
@ ConsolepSetCommandHistoryMode
@ ConsolepGetCommandHistory
@ ConsolepExpungeCommandHistory
#define CONSRV_SERVERDLL_INDEX
#define CSR_CREATE_API_NUMBER(ServerId, ApiId)
#define ERROR_NOT_ENOUGH_MEMORY
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
static DWORD IntGetConsoleCommandHistoryLength(LPCVOID lpExeName, BOOL bUnicode)
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleCommandHistoryLengthW(IN LPCWSTR lpExeName)
VOID WINAPI DECLSPEC_HOTPATCH ExpungeConsoleCommandHistoryW(IN LPCWSTR lpExeName)
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleCommandHistoryW(OUT LPWSTR lpHistory, IN DWORD cbHistory, IN LPCWSTR lpExeName)
static VOID IntExpungeConsoleCommandHistory(LPCVOID lpExeName, BOOLEAN bUnicode)
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleNumberOfCommandsW(IN DWORD dwNumCommands, IN LPCWSTR lpExeName)
static DWORD IntGetConsoleCommandHistory(LPVOID lpHistory, DWORD cbHistory, LPCVOID lpExeName, BOOLEAN bUnicode)
VOID WINAPI DECLSPEC_HOTPATCH ExpungeConsoleCommandHistoryA(IN LPCSTR lpExeName)
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleNumberOfCommandsA(IN DWORD dwNumCommands, IN LPCSTR lpExeName)
static BOOL IntSetConsoleNumberOfCommands(DWORD dwNumCommands, LPCVOID lpExeName, BOOLEAN bUnicode)
BOOL WINAPI DECLSPEC_HOTPATCH SetConsoleCommandHistoryMode(IN DWORD dwMode)
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleCommandHistoryA(OUT LPSTR lpHistory, IN DWORD cbHistory, IN LPCSTR lpExeName)
DWORD WINAPI DECLSPEC_HOTPATCH GetConsoleCommandHistoryLengthA(IN LPCSTR lpExeName)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static DWORD LPSTR lpExeName
DWORD BaseSetLastNTError(IN NTSTATUS Status)
PCSR_CAPTURE_BUFFER NTAPI CsrAllocateCaptureBuffer(_In_ ULONG ArgumentCount, _In_ ULONG BufferSize)
ULONG NTAPI CsrAllocateMessagePointer(_Inout_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_ ULONG MessageLength, _Out_ PVOID *CapturedData)
VOID NTAPI CsrFreeCaptureBuffer(_In_ _Frees_ptr_ PCSR_CAPTURE_BUFFER CaptureBuffer)
VOID NTAPI CsrCaptureMessageBuffer(_Inout_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_opt_ PVOID MessageBuffer, _In_ ULONG MessageLength, _Out_ PVOID *CapturedData)
NTSTATUS NTAPI CsrClientCallServer(_Inout_ PCSR_API_MESSAGE ApiMessage, _Inout_opt_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_ CSR_API_NUMBER ApiNumber, _In_ ULONG DataLength)
CONSOLE_SETHISTORYNUMBERCOMMANDS SetHistoryNumberCommandsRequest
CONSOLE_GETCOMMANDHISTORYLENGTH GetCommandHistoryLengthRequest
CONSOLE_GETCOMMANDHISTORY GetCommandHistoryRequest
CONSOLE_EXPUNGECOMMANDHISTORY ExpungeCommandHistoryRequest
union _CONSOLE_API_MESSAGE::@3536 Data
CONSOLE_SETHISTORYMODE SetHistoryModeRequest
#define RtlCopyMemory(Destination, Source, Length)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String