65 if (
Console->NumberOfHistoryBuffers <
Console->MaxNumberOfHistoryBuffers)
68 if (!Hist)
return NULL;
81 Console->NumberOfHistoryBuffers++;
110 ExeNameU.
Buffer = ExeName;
169 for (; Hist->NumEntries > NumCommands; Hist->NumEntries--)
172 Hist->Position += (Hist->Position == 0);
175 Hist->MaxEntries = NumCommands;
178 Hist->Entries = NewEntryList;
308 if (--HistPos < 0) HistPos += Hist->
NumEntries;
309 }
while (HistPos != Hist->
Position);
326 if (!Hist)
return NULL;
330 ActiveBuffer =
Console->ActiveBuffer;
374 IN ULONG MaxNumberOfHistoryBuffers,
382 if (MaxNumberOfHistoryBuffers < Console->NumberOfHistoryBuffers)
390 (
Console->NumberOfHistoryBuffers > MaxNumberOfHistoryBuffers))
395 Console->NumberOfHistoryBuffers--;
397 ASSERT(
Console->NumberOfHistoryBuffers == MaxNumberOfHistoryBuffers);
401 Console->MaxNumberOfHistoryBuffers = MaxNumberOfHistoryBuffers;
412 DPRINT1(
"HistoryResizeBuffer(0x%p, %lu) failed, Status 0x%08lx\n",
413 Hist, HistoryBufferSize,
Status);
416 Console->HistoryBufferSize = HistoryBufferSize;
419 Console->HistoryNoDup = !!HistoryNoDup;
434 (
PVOID*)&GetCommandHistoryRequest->History,
435 GetCommandHistoryRequest->HistoryLength,
438 (
PVOID*)&GetCommandHistoryRequest->ExeName,
439 GetCommandHistoryRequest->ExeLength,
446 GetCommandHistoryRequest->ExeName,
447 GetCommandHistoryRequest->ExeLength,
448 GetCommandHistoryRequest->Unicode2);
460 if (GetCommandHistoryRequest->Unicode)
462 TargetBufferW = GetCommandHistoryRequest->History;
467 TargetBufferA = GetCommandHistoryRequest->History;
479 if (GetCommandHistoryRequest->Unicode)
483 TargetBufferW[
Offset++] =
L'\0';
489 &TargetBufferA[
Offset], SourceLength);
491 TargetBufferA[
Offset++] =
'\0';
495 if (GetCommandHistoryRequest->Unicode)
515 (
PVOID*)&GetCommandHistoryLengthRequest->ExeName,
516 GetCommandHistoryLengthRequest->ExeLength,
523 GetCommandHistoryLengthRequest->ExeName,
524 GetCommandHistoryLengthRequest->ExeLength,
525 GetCommandHistoryLengthRequest->Unicode2);
536 if (!GetCommandHistoryLengthRequest->Unicode)
539 GetCommandHistoryLengthRequest->HistoryLength =
Length;
551 (
PVOID*)&ExpungeCommandHistoryRequest->ExeName,
552 ExpungeCommandHistoryRequest->ExeLength,
559 ExpungeCommandHistoryRequest->ExeName,
560 ExpungeCommandHistoryRequest->ExeLength,
561 ExpungeCommandHistoryRequest->Unicode2);
575 (
PVOID*)&SetHistoryNumberCommandsRequest->ExeName,
576 SetHistoryNumberCommandsRequest->ExeLength,
583 SetHistoryNumberCommandsRequest->ExeName,
584 SetHistoryNumberCommandsRequest->ExeLength,
585 SetHistoryNumberCommandsRequest->Unicode2);
598#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
607 HistoryInfoRequest->HistoryBufferSize =
Console->HistoryBufferSize;
608 HistoryInfoRequest->NumberOfHistoryBuffers =
Console->MaxNumberOfHistoryBuffers;
623#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
633 HistoryInfoRequest->HistoryBufferSize,
634 HistoryInfoRequest->NumberOfHistoryBuffers,
649 DPRINT(
"SrvSetConsoleCommandHistoryMode(Mode = %d) is not yet implemented\n",
650 SetHistoryModeRequest->Mode);
BOOLEAN NTAPI CsrValidateMessageBuffer(IN PCSR_API_MESSAGE ApiMessage, IN PVOID *Buffer, IN ULONG ElementCount, IN ULONG ElementSize)
#define NT_SUCCESS(StatCode)
#define RemoveEntryList(Entry)
#define InsertHeadList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define RemoveTailList(ListHead)
#define RemoveHeadList(ListHead)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
NTSYSAPI NTSTATUS WINAPI RtlDuplicateUnicodeString(int, const UNICODE_STRING *, UNICODE_STRING *)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSYSAPI BOOLEAN NTAPI RtlPrefixUnicodeString(IN PUNICODE_STRING String1, IN PUNICODE_STRING String2, IN BOOLEAN CaseInSensitive)
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define STATUS_NOT_IMPLEMENTED
#define STATUS_BUFFER_OVERFLOW
base of all file and directory entries
#define RtlCopyMemory(Destination, Source, Length)
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
_In_ HFONT _Out_ PUINT Height
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
#define CON_API(Name, TYPE, RequestName)
#define CON_API_NOCONSOLE(Name, TYPE, RequestName)
VOID ConSrvReleaseConsole(IN PCONSRV_CONSOLE Console, IN BOOLEAN IsConsoleLocked)
NTSTATUS ConSrvGetConsole(IN PCONSOLE_PROCESS_DATA ProcessData, OUT PCONSRV_CONSOLE *Console, IN BOOLEAN LockConsole)
#define ConsoleAllocHeap(Flags, Size)
#define ConsoleFreeHeap(HeapBase)
static VOID HistoryDeleteBuffer(PHISTORY_BUFFER Hist)
VOID HistoryGetCurrentEntry(PCONSRV_CONSOLE Console, PUNICODE_STRING ExeName, PUNICODE_STRING Entry)
VOID HistoryDeleteBuffers(PCONSRV_CONSOLE Console)
static PHISTORY_BUFFER HistoryCurrentBuffer(IN PCONSRV_CONSOLE Console, IN PUNICODE_STRING ExeName)
VOID HistoryReshapeAllBuffers(IN PCONSRV_CONSOLE Console, IN ULONG HistoryBufferSize, IN ULONG MaxNumberOfHistoryBuffers, IN BOOLEAN HistoryNoDup)
struct _HISTORY_BUFFER * PHISTORY_BUFFER
BOOLEAN ConvertInputUnicodeToAnsi(PCONSRV_CONSOLE Console, PVOID Source, USHORT SourceLength, PCHAR Target, USHORT TargetLength)
VOID HistoryDeleteCurrentBuffer(PCONSRV_CONSOLE Console, PUNICODE_STRING ExeName)
static NTSTATUS HistoryResizeBuffer(IN PHISTORY_BUFFER Hist, IN ULONG NumCommands)
BOOL HistoryFindEntryByPrefix(PCONSRV_CONSOLE Console, PUNICODE_STRING ExeName, PUNICODE_STRING Prefix, PUNICODE_STRING Entry)
VOID HistoryAddEntry(PCONSRV_CONSOLE Console, PUNICODE_STRING ExeName, PUNICODE_STRING Entry)
PPOPUP_WINDOW HistoryDisplayCurrentHistory(PCONSRV_CONSOLE Console, PUNICODE_STRING ExeName)
static PHISTORY_BUFFER HistoryFindBuffer(PCONSRV_CONSOLE Console, PVOID ExeName, USHORT ExeLength, BOOLEAN UnicodeExe)
struct _HISTORY_BUFFER HISTORY_BUFFER
BOOL HistoryRecallHistory(PCONSRV_CONSOLE Console, PUNICODE_STRING ExeName, INT Offset, PUNICODE_STRING Entry)
BOOLEAN ConvertInputAnsiToUnicode(PCONSRV_CONSOLE Console, PVOID Source, USHORT SourceLength, PWCHAR *Target, PUSHORT TargetLength)
#define HISTORY_NO_DUP_FLAG
#define CONSOLE_OVERSTRIKE
_In_ __drv_aliasesMem PSTRING Prefix