Author: hbelusca
Date: Fri May 2 16:46:13 2014
New Revision: 63112
URL:
http://svn.reactos.org/svn/reactos?rev=63112&view=rev
Log:
[CONSRV]
Start refactoring:
- remove FASTCALL
- Add WINSRV_CONSOLE for keeping what makes sense only in Win32 consoles and not in
consoles in general (keep in mind that the condrv part of this should go into kernel mode
later on...)
therefore: move the wait queues into it, the pause flags (that are frontend-specific).
- Move process control from condrv.
Added:
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h
- copied, changed from r63104,
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h
Modified:
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/coninput.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/console.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyfrontend.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/conoutput.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/console.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontendctl.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/input.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/lineinput.c
branches/condrv_restructure/win32ss/user/winsrv/consrv/lineinput.h
branches/condrv_restructure/win32ss/user/winsrv/consrv/procinit.h
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/coninput.c [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -16,16 +16,6 @@
/* GLOBALS ********************************************************************/
-#define ConSrvGetInputBuffer(ProcessData, Handle, Ptr, Access, LockConsole) \
- ConSrvGetObject((ProcessData), (Handle), (PCONSOLE_IO_OBJECT*)(Ptr), NULL, \
- (Access), (LockConsole), INPUT_BUFFER)
-#define ConSrvGetInputBufferAndHandleEntry(ProcessData, Handle, Ptr, Entry, Access,
LockConsole) \
- ConSrvGetObject((ProcessData), (Handle), (PCONSOLE_IO_OBJECT*)(Ptr), (Entry),
\
- (Access), (LockConsole), INPUT_BUFFER)
-#define ConSrvReleaseInputBuffer(Buff, IsConsoleLocked) \
- ConSrvReleaseObject(&(Buff)->Header, (IsConsoleLocked))
-
-
#define ConsoleInputUnicodeCharToAnsiChar(Console, dChar, sWChar) \
WideCharToMultiByte((Console)->CodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL)
@@ -41,7 +31,7 @@
/* PRIVATE FUNCTIONS **********************************************************/
-static VOID FASTCALL
+static VOID
ConioInputEventToAnsi(PCONSOLE Console, PINPUT_RECORD InputEvent)
{
if (InputEvent->EventType == KEY_EVENT)
@@ -54,7 +44,7 @@
}
}
-static VOID FASTCALL
+static VOID
ConioInputEventToUnicode(PCONSOLE Console, PINPUT_RECORD InputEvent)
{
if (InputEvent->EventType == KEY_EVENT)
@@ -67,7 +57,7 @@
}
}
-NTSTATUS FASTCALL
+NTSTATUS
ConioAddInputEvent(PCONSOLE Console,
PINPUT_RECORD InputEvent,
BOOLEAN AppendToEnd)
@@ -119,26 +109,26 @@
}
SetEvent(Console->InputBuffer.ActiveEvent);
- CsrNotifyWait(&Console->InputBuffer.ReadWaitQueue,
+ CsrNotifyWait(&Console->ReadWaitQueue,
FALSE,
NULL,
NULL);
- if (!IsListEmpty(&Console->InputBuffer.ReadWaitQueue))
- {
- CsrDereferenceWait(&Console->InputBuffer.ReadWaitQueue);
+ if (!IsListEmpty(&Console->ReadWaitQueue))
+ {
+ CsrDereferenceWait(&Console->ReadWaitQueue);
}
return STATUS_SUCCESS;
}
-NTSTATUS FASTCALL
+NTSTATUS
ConioProcessInputEvent(PCONSOLE Console,
PINPUT_RECORD InputEvent)
{
return ConioAddInputEvent(Console, InputEvent, TRUE);
}
-VOID FASTCALL
+VOID
PurgeInputBuffer(PCONSOLE Console)
{
PLIST_ENTRY CurrentEntry;
@@ -176,7 +166,7 @@
(ShiftState & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED) || KeyStateCtrl &
0x80) )
{
DPRINT1("Console_Api Ctrl-C\n");
- ConDrvConsoleProcessCtrlEvent(Console, 0, CTRL_C_EVENT);
+ ConSrvConsoleProcessCtrlEvent(Console, 0, CTRL_C_EVENT);
if (Console->LineBuffer && !Console->LineComplete)
{
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/conoutput.c [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -74,7 +74,7 @@
}
// ConDrvCreateConsoleScreenBuffer
-NTSTATUS FASTCALL
+NTSTATUS
ConDrvCreateScreenBuffer(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
IN OUT PCONSOLE Console,
IN ULONG BufferType,
@@ -151,7 +151,7 @@
CONSOLE_SCREEN_BUFFER_Destroy(Buffer);
}
-VOID FASTCALL
+VOID
ConioDrawConsole(PCONSOLE Console)
{
SMALL_RECT Region;
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/console.c [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -18,9 +18,6 @@
#define NDEBUG
#include <debug.h>
-// FIXME: Add this prototype to winternl.h / rtlfuncs.h / ...
-NTSTATUS NTAPI RtlGetLastNtStatus(VOID);
-
/* GLOBALS ********************************************************************/
@@ -196,89 +193,21 @@
/* PRIVATE FUNCTIONS **********************************************************/
-static NTSTATUS
-ConDrvConsoleCtrlEventTimeout(IN ULONG CtrlEvent,
- IN PCONSOLE_PROCESS_DATA ProcessData,
- IN ULONG Timeout)
-{
- NTSTATUS Status = STATUS_SUCCESS;
-
- DPRINT("ConDrvConsoleCtrlEventTimeout Parent ProcessId = %x\n",
ProcessData->Process->ClientId.UniqueProcess);
-
- if (ProcessData->CtrlDispatcher)
- {
- _SEH2_TRY
- {
- HANDLE Thread = NULL;
-
- _SEH2_TRY
- {
- Thread = CreateRemoteThread(ProcessData->Process->ProcessHandle,
NULL, 0,
- ProcessData->CtrlDispatcher,
- UlongToPtr(CtrlEvent), 0, NULL);
- if (NULL == Thread)
- {
- Status = RtlGetLastNtStatus();
- DPRINT1("Failed thread creation, Status = 0x%08lx\n",
Status);
- }
- else
- {
- DPRINT("ProcessData->CtrlDispatcher remote thread creation
succeeded, ProcessId = %x, Process = 0x%p\n",
ProcessData->Process->ClientId.UniqueProcess, ProcessData->Process);
- WaitForSingleObject(Thread, Timeout);
- }
- }
- _SEH2_FINALLY
- {
- CloseHandle(Thread);
- }
- _SEH2_END;
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- Status = _SEH2_GetExceptionCode();
- DPRINT1("ConDrvConsoleCtrlEventTimeout - Caught an exception, Status =
0x%08lx\n", Status);
- }
- _SEH2_END;
- }
-
- return Status;
-}
-
-NTSTATUS
-ConDrvConsoleCtrlEvent(IN ULONG CtrlEvent,
- IN PCONSOLE_PROCESS_DATA ProcessData)
-{
- return ConDrvConsoleCtrlEventTimeout(CtrlEvent, ProcessData, 0);
-}
-
-VOID FASTCALL
-ConioPause(PCONSOLE Console, UINT Flags)
-{
- Console->PauseFlags |= Flags;
+VOID NTAPI
+ConDrvPause(PCONSOLE Console)
+{
if (!Console->UnpauseEvent)
Console->UnpauseEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
}
-VOID FASTCALL
-ConioUnpause(PCONSOLE Console, UINT Flags)
-{
- Console->PauseFlags &= ~Flags;
-
- // if ((Console->PauseFlags & (PAUSED_FROM_KEYBOARD | PAUSED_FROM_SCROLLBAR |
PAUSED_FROM_SELECTION)) == 0)
- if (Console->PauseFlags == 0 && Console->UnpauseEvent)
+VOID NTAPI
+ConDrvUnpause(PCONSOLE Console)
+{
+ if (Console->UnpauseEvent)
{
SetEvent(Console->UnpauseEvent);
CloseHandle(Console->UnpauseEvent);
Console->UnpauseEvent = NULL;
-
- CsrNotifyWait(&Console->WriteWaitQueue,
- TRUE,
- NULL,
- NULL);
- if (!IsListEmpty(&Console->WriteWaitQueue))
- {
- CsrDereferenceWait(&Console->WriteWaitQueue);
- }
}
}
@@ -452,7 +381,9 @@
HANDLE ConsoleHandle;
PCONSOLE Console;
PCONSOLE_SCREEN_BUFFER NewBuffer;
- // WCHAR DefaultTitle[128];
+#if 0
+ WCHAR DefaultTitle[128];
+#endif
if (NewConsoleHandle == NULL || NewConsole == NULL || ConsoleInfo == NULL)
return STATUS_INVALID_PARAMETER;
@@ -463,61 +394,12 @@
/*
* Allocate a console structure
*/
- Console = ConsoleAllocHeap(HEAP_ZERO_MEMORY, sizeof(CONSOLE));
+ Console = ConsoleAllocHeap(HEAP_ZERO_MEMORY, sizeof(*Console));
if (NULL == Console)
{
DPRINT1("Not enough memory for console creation.\n");
return STATUS_NO_MEMORY;
}
-
- /*
- * Load the console settings
- */
-
- /* 1. Load the default settings */
- // ConSrvGetDefaultSettings(ConsoleInfo, ProcessId);
-
- // /* 2. Get the title of the console (initialize ConsoleInfo.ConsoleTitle) */
- // Length = min(wcslen(ConsoleStartInfo->ConsoleTitle),
- // sizeof(ConsoleInfo.ConsoleTitle) /
sizeof(ConsoleInfo.ConsoleTitle[0]) - 1);
- // wcsncpy(ConsoleInfo.ConsoleTitle, ConsoleStartInfo->ConsoleTitle, Length);
- // ConsoleInfo.ConsoleTitle[Length] = L'\0';
-
- /*
- * 4. Load the remaining console settings via the registry.
- */
-#if 0
- if ((ConsoleStartInfo->dwStartupFlags & STARTF_TITLEISLINKNAME) == 0)
- {
- /*
- * Either we weren't created by an app launched via a shell-link,
- * or we failed to load shell-link console properties.
- * Therefore, load the console infos for the application from the registry.
- */
- ConSrvReadUserSettings(ConsoleInfo, ProcessId);
-
- /*
- * Now, update them with the properties the user might gave to us
- * via the STARTUPINFO structure before calling CreateProcess
- * (and which was transmitted via the ConsoleStartInfo structure).
- * We therefore overwrite the values read in the registry.
- */
- if (ConsoleStartInfo->dwStartupFlags & STARTF_USEFILLATTRIBUTE)
- {
- ConsoleInfo->ScreenAttrib = (USHORT)ConsoleStartInfo->FillAttribute;
- }
- if (ConsoleStartInfo->dwStartupFlags & STARTF_USECOUNTCHARS)
- {
- ConsoleInfo->ScreenBufferSize = ConsoleStartInfo->ScreenBufferSize;
- }
- if (ConsoleStartInfo->dwStartupFlags & STARTF_USESIZE)
- {
- // ConsoleInfo->ConsoleSize = ConsoleStartInfo->ConsoleWindowSize;
- ConsoleInfo->ConsoleSize.X =
(SHORT)ConsoleStartInfo->ConsoleWindowSize.cx;
- ConsoleInfo->ConsoleSize.Y =
(SHORT)ConsoleStartInfo->ConsoleWindowSize.cy;
- }
- }
-#endif
/*
* Fix the screen buffer size if needed. The rule is:
@@ -534,9 +416,6 @@
Console->State = CONSOLE_INITIALIZING;
Console->ReferenceCount = 0;
InitializeCriticalSection(&Console->Lock);
- InitializeListHead(&Console->ProcessList);
- Console->NotifiedLastCloseProcess = NULL;
- Console->NotifyLastClose = FALSE;
/* Initialize the frontend interface */
ResetFrontEnd(Console);
@@ -563,11 +442,9 @@
Console->InputBuffer.InputBufferSize = 0; // FIXME!
InitializeListHead(&Console->InputBuffer.InputEvents);
- InitializeListHead(&Console->InputBuffer.ReadWaitQueue);
Console->InputBuffer.Mode = ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT |
ENABLE_ECHO_INPUT | ENABLE_MOUSE_INPUT;
- Console->QuickEdit = ConsoleInfo->QuickEdit;
Console->InsertMode = ConsoleInfo->InsertMode;
Console->LineBuffer = NULL;
Console->LineMaxSize = Console->LineSize = Console->LinePos = 0;
@@ -600,8 +477,6 @@
}
/* Make the new screen buffer active */
Console->ActiveBuffer = NewBuffer;
- InitializeListHead(&Console->WriteWaitQueue);
- Console->PauseFlags = 0;
Console->UnpauseEvent = NULL;
/*
@@ -615,21 +490,25 @@
/* Initialize the console title */
ConsoleCreateUnicodeString(&Console->OriginalTitle,
ConsoleInfo->ConsoleTitle);
- // if (ConsoleInfo.ConsoleTitle[0] == L'\0')
- // {
- // if (LoadStringW(ConSrvDllInstance, IDS_CONSOLE_TITLE, DefaultTitle,
sizeof(DefaultTitle) / sizeof(DefaultTitle[0])))
- // {
- // ConsoleCreateUnicodeString(&Console->Title, DefaultTitle);
- // }
- // else
- // {
- // ConsoleCreateUnicodeString(&Console->Title, L"ReactOS
Console");
- // }
- // }
- // else
- // {
+#if 0
+ if (ConsoleInfo.ConsoleTitle[0] == L'\0')
+ {
+ if (LoadStringW(ConSrvDllInstance, IDS_CONSOLE_TITLE, DefaultTitle,
sizeof(DefaultTitle) / sizeof(DefaultTitle[0])))
+ {
+ ConsoleCreateUnicodeString(&Console->Title, DefaultTitle);
+ }
+ else
+ {
+ ConsoleCreateUnicodeString(&Console->Title, L"ReactOS
Console");
+ }
+ }
+ else
+ {
+#endif
ConsoleCreateUnicodeString(&Console->Title,
ConsoleInfo->ConsoleTitle);
- // }
+#if 0
+ }
+#endif
/* Lock the console until its initialization is finished */
// EnterCriticalSection(&Console->Lock);
@@ -670,15 +549,15 @@
/* FIXME: Lock the console before ?? */
/*
- * Attach the frontend to the console. Use now the TermIFace of the console,
+ * Attach the frontend to the console. Use now the FrontEndIFace of the console,
* and not the user-defined temporary FrontEnd pointer.
*/
- Console->TermIFace = *FrontEnd;
- Console->TermIFace.Console = Console;
+ Console->FrontEndIFace = *FrontEnd;
+ Console->FrontEndIFace.Console = Console;
/* Initialize the frontend AFTER having attached it to the console */
DPRINT("Finish initialization of frontend\n");
- Status = Console->TermIFace.Vtbl->InitFrontEnd(&Console->TermIFace,
Console);
+ Status =
Console->FrontEndIFace.Vtbl->InitFrontEnd(&Console->FrontEndIFace, Console);
if (!NT_SUCCESS(Status))
{
DPRINT1("FrontEnd initialization failed, Status = 0x%08lx\n", Status);
@@ -707,7 +586,7 @@
/* FIXME: Lock the console before ?? */
/* Deinitialize the frontend BEFORE detaching it from the console */
- Console->TermIFace.Vtbl->DeinitFrontEnd(&Console->TermIFace/*,
Console*/);
+ Console->FrontEndIFace.Vtbl->DeinitFrontEnd(&Console->FrontEndIFace/*,
Console*/);
/*
* Detach the frontend from the console:
@@ -1086,81 +965,4 @@
return STATUS_SUCCESS;
}
-PCONSOLE_PROCESS_DATA NTAPI
-ConDrvGetConsoleLeaderProcess(IN PCONSOLE Console)
-{
- if (Console == NULL) return NULL;
-
- return CONTAINING_RECORD(Console->ProcessList.Blink,
- CONSOLE_PROCESS_DATA,
- ConsoleLink);
-}
-
-NTSTATUS NTAPI
-ConDrvGetConsoleProcessList(IN PCONSOLE Console,
- IN OUT PULONG ProcessIdsList,
- IN ULONG MaxIdListItems,
- OUT PULONG ProcessIdsTotal)
-{
- PCONSOLE_PROCESS_DATA current;
- PLIST_ENTRY current_entry;
-
- if (Console == NULL || ProcessIdsList == NULL || ProcessIdsTotal == NULL)
- return STATUS_INVALID_PARAMETER;
-
- *ProcessIdsTotal = 0;
-
- for (current_entry = Console->ProcessList.Flink;
- current_entry != &Console->ProcessList;
- current_entry = current_entry->Flink)
- {
- current = CONTAINING_RECORD(current_entry, CONSOLE_PROCESS_DATA, ConsoleLink);
- if (++(*ProcessIdsTotal) <= MaxIdListItems)
- {
- *ProcessIdsList++ =
HandleToUlong(current->Process->ClientId.UniqueProcess);
- }
- }
-
- return STATUS_SUCCESS;
-}
-
-// ConDrvGenerateConsoleCtrlEvent
-NTSTATUS NTAPI
-ConDrvConsoleProcessCtrlEvent(IN PCONSOLE Console,
- IN ULONG ProcessGroupId,
- IN ULONG CtrlEvent)
-{
- NTSTATUS Status = STATUS_SUCCESS;
- PLIST_ENTRY current_entry;
- PCONSOLE_PROCESS_DATA current;
-
- /* If the console is already being destroyed, just return */
- if (!ConDrvValidateConsoleState(Console, CONSOLE_RUNNING))
- return STATUS_UNSUCCESSFUL;
-
- /*
- * Loop through the process list, from the most recent process
- * (the active one) to the oldest one (the first created, i.e.
- * the console leader process), and for each, send an event
- * (new processes are inserted at the head of the console process list).
- */
- current_entry = Console->ProcessList.Flink;
- while (current_entry != &Console->ProcessList)
- {
- current = CONTAINING_RECORD(current_entry, CONSOLE_PROCESS_DATA, ConsoleLink);
- current_entry = current_entry->Flink;
-
- /*
- * Only processes belonging to the same process group are signaled.
- * If the process group ID is zero, then all the processes are signaled.
- */
- if (ProcessGroupId == 0 || current->Process->ProcessGroupId ==
ProcessGroupId)
- {
- Status = ConDrvConsoleCtrlEvent(CtrlEvent, current);
- }
- }
-
- return Status;
-}
-
/* EOF */
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyfrontend.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyfrontend.c [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/dummyfrontend.c [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -206,8 +206,8 @@
if (!Console) return;
/* Reinitialize the frontend interface */
- RtlZeroMemory(&Console->TermIFace, sizeof(Console->TermIFace));
- Console->TermIFace.Vtbl = &DummyVtbl;
+ RtlZeroMemory(&Console->FrontEndIFace, sizeof(Console->FrontEndIFace));
+ Console->FrontEndIFace.Vtbl = &DummyVtbl;
}
/* EOF */
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/condrv/text.c [iso-8859-1] Fri
May 2 16:46:13 2014
@@ -33,7 +33,7 @@
};
-static VOID FASTCALL
+static VOID
ClearLineBuffer(PTEXTMODE_SCREEN_BUFFER Buff);
@@ -126,7 +126,7 @@
return &Buff->Buffer[((Y + Buff->VirtualY) % Buff->ScreenBufferSize.Y) *
Buff->ScreenBufferSize.X + X];
}
-static VOID FASTCALL
+static VOID
ClearLineBuffer(PTEXTMODE_SCREEN_BUFFER Buff)
{
PCHAR_INFO Ptr = ConioCoordToPointer(Buff, 0, Buff->CursorPosition.Y);
@@ -199,7 +199,7 @@
return TRUE;
}
-static VOID FASTCALL
+static VOID
ConioComputeUpdateRect(IN PTEXTMODE_SCREEN_BUFFER Buff,
IN OUT PSMALL_RECT UpdateRect,
IN PCOORD Start,
@@ -233,7 +233,7 @@
* Move from one rectangle to another. We must be careful about the order that
* this is done, to avoid overwriting parts of the source before they are moved.
*/
-static VOID FASTCALL
+static VOID
ConioMoveRegion(PTEXTMODE_SCREEN_BUFFER ScreenBuffer,
PSMALL_RECT SrcRegion,
PSMALL_RECT DstRegion,
@@ -293,7 +293,7 @@
}
}
-DWORD FASTCALL
+DWORD
ConioEffectiveCursorSize(PCONSOLE Console, DWORD Scale)
{
DWORD Size = (Console->ActiveBuffer->CursorInfo.dwSize * Scale + 99) / 100;
@@ -422,7 +422,7 @@
return STATUS_SUCCESS;
}
-static VOID FASTCALL
+static VOID
ConioNextLine(PTEXTMODE_SCREEN_BUFFER Buff, PSMALL_RECT UpdateRect, PUINT ScrolledLines)
{
/* If we hit bottom, slide the viewable screen */
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.c [iso-8859-1] Fri May
2 16:46:13 2014
@@ -51,7 +51,7 @@
RtlMoveMemory(CapturedInputInfo, InputInfo, sizeof(GET_INPUT_INFO));
- if (!CsrCreateWait(&InputInfo->InputBuffer->ReadWaitQueue,
+ if
(!CsrCreateWait(&InputInfo->InputBuffer->Header.Console->ReadWaitQueue,
WaitFunction,
InputInfo->CallingThread,
ApiMessage,
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/coninput.h [iso-8859-1] Fri May
2 16:46:13 2014
@@ -9,7 +9,7 @@
#pragma once
-VOID FASTCALL PurgeInputBuffer(PCONSOLE Console);
+VOID PurgeInputBuffer(PCONSOLE Console);
VOID NTAPI
ConDrvProcessKey(IN PCONSOLE Console,
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/conoutput.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/conoutput.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/conoutput.h [iso-8859-1] Fri
May 2 16:46:13 2014
@@ -33,12 +33,12 @@
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked) \
ConSrvReleaseObject(&(Buff)->Header, (IsConsoleLocked))
-NTSTATUS FASTCALL ConDrvCreateScreenBuffer(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
+NTSTATUS ConDrvCreateScreenBuffer(OUT PCONSOLE_SCREEN_BUFFER* Buffer,
IN OUT PCONSOLE Console,
IN ULONG BufferType,
IN PVOID ScreenBufferInfo);
VOID NTAPI ConioDeleteScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer);
-// VOID FASTCALL ConioSetActiveScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer);
+// VOID ConioSetActiveScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer);
PCONSOLE_SCREEN_BUFFER
ConDrvGetActiveScreenBuffer(IN PCONSOLE Console);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/console.c [iso-8859-1] Fri May
2 16:46:13 2014
@@ -22,6 +22,9 @@
#define NDEBUG
#include <debug.h>
+
+// FIXME: Add this prototype to winternl.h / rtlfuncs.h / ...
+NTSTATUS NTAPI RtlGetLastNtStatus(VOID);
/* GLOBALS ********************************************************************/
@@ -90,26 +93,22 @@
/* PRIVATE FUNCTIONS **********************************************************/
-#if 0000
-VOID FASTCALL
+VOID
ConioPause(PCONSOLE Console, UINT Flags)
{
Console->PauseFlags |= Flags;
- if (!Console->UnpauseEvent)
- Console->UnpauseEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
-}
-
-VOID FASTCALL
+ ConDrvPause(Console);
+}
+
+VOID
ConioUnpause(PCONSOLE Console, UINT Flags)
{
Console->PauseFlags &= ~Flags;
// if ((Console->PauseFlags & (PAUSED_FROM_KEYBOARD | PAUSED_FROM_SCROLLBAR |
PAUSED_FROM_SELECTION)) == 0)
- if (Console->PauseFlags == 0 && Console->UnpauseEvent)
- {
- SetEvent(Console->UnpauseEvent);
- CloseHandle(Console->UnpauseEvent);
- Console->UnpauseEvent = NULL;
+ if (Console->PauseFlags == 0)
+ {
+ ConDrvUnpause(Console);
CsrNotifyWait(&Console->WriteWaitQueue,
TRUE,
@@ -121,10 +120,8 @@
}
}
}
-#endif
-
-
-NTSTATUS FASTCALL
+
+NTSTATUS
ConSrvGetConsole(PCONSOLE_PROCESS_DATA ProcessData,
PCONSOLE* Console,
BOOL LockConsole)
@@ -144,7 +141,7 @@
return Status;
}
-VOID FASTCALL
+VOID
ConSrvReleaseConsole(PCONSOLE Console,
BOOL WasConsoleLocked)
{
@@ -268,6 +265,15 @@
ASSERT(Console);
DPRINT("Console initialized\n");
+ /*** Register ConSrv features ***/
+ InitializeListHead(&Console->ProcessList);
+ Console->NotifiedLastCloseProcess = NULL;
+ Console->NotifyLastClose = FALSE;
+ InitializeListHead(&Console->ReadWaitQueue);
+ InitializeListHead(&Console->WriteWaitQueue);
+ Console->PauseFlags = 0;
+ Console->QuickEdit = ConsoleInfo.QuickEdit;
+
Status = ConDrvRegisterFrontEnd(Console, &FrontEnd);
if (!NT_SUCCESS(Status))
{
@@ -292,6 +298,146 @@
/* Just call the driver. ConSrvDeregisterFrontEnd is called on-demand. */
ConDrvDeleteConsole(Console);
}
+
+
+
+
+
+
+static NTSTATUS
+ConSrvConsoleCtrlEventTimeout(IN ULONG CtrlEvent,
+ IN PCONSOLE_PROCESS_DATA ProcessData,
+ IN ULONG Timeout)
+{
+ NTSTATUS Status = STATUS_SUCCESS;
+
+ DPRINT("ConSrvConsoleCtrlEventTimeout Parent ProcessId = %x\n",
ProcessData->Process->ClientId.UniqueProcess);
+
+ if (ProcessData->CtrlDispatcher)
+ {
+ _SEH2_TRY
+ {
+ HANDLE Thread = NULL;
+
+ _SEH2_TRY
+ {
+ Thread = CreateRemoteThread(ProcessData->Process->ProcessHandle,
NULL, 0,
+ ProcessData->CtrlDispatcher,
+ UlongToPtr(CtrlEvent), 0, NULL);
+ if (NULL == Thread)
+ {
+ Status = RtlGetLastNtStatus();
+ DPRINT1("Failed thread creation, Status = 0x%08lx\n",
Status);
+ }
+ else
+ {
+ DPRINT("ProcessData->CtrlDispatcher remote thread creation
succeeded, ProcessId = %x, Process = 0x%p\n",
ProcessData->Process->ClientId.UniqueProcess, ProcessData->Process);
+ WaitForSingleObject(Thread, Timeout);
+ }
+ }
+ _SEH2_FINALLY
+ {
+ CloseHandle(Thread);
+ }
+ _SEH2_END;
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ Status = _SEH2_GetExceptionCode();
+ DPRINT1("ConSrvConsoleCtrlEventTimeout - Caught an exception, Status =
0x%08lx\n", Status);
+ }
+ _SEH2_END;
+ }
+
+ return Status;
+}
+
+NTSTATUS
+ConSrvConsoleCtrlEvent(IN ULONG CtrlEvent,
+ IN PCONSOLE_PROCESS_DATA ProcessData)
+{
+ return ConSrvConsoleCtrlEventTimeout(CtrlEvent, ProcessData, 0);
+}
+
+PCONSOLE_PROCESS_DATA NTAPI
+ConSrvGetConsoleLeaderProcess(IN PCONSOLE Console)
+{
+ if (Console == NULL) return NULL;
+
+ return CONTAINING_RECORD(Console->ProcessList.Blink,
+ CONSOLE_PROCESS_DATA,
+ ConsoleLink);
+}
+
+NTSTATUS NTAPI
+ConSrvGetConsoleProcessList(IN PCONSOLE Console,
+ IN OUT PULONG ProcessIdsList,
+ IN ULONG MaxIdListItems,
+ OUT PULONG ProcessIdsTotal)
+{
+ PCONSOLE_PROCESS_DATA current;
+ PLIST_ENTRY current_entry;
+
+ if (Console == NULL || ProcessIdsList == NULL || ProcessIdsTotal == NULL)
+ return STATUS_INVALID_PARAMETER;
+
+ *ProcessIdsTotal = 0;
+
+ for (current_entry = Console->ProcessList.Flink;
+ current_entry != &Console->ProcessList;
+ current_entry = current_entry->Flink)
+ {
+ current = CONTAINING_RECORD(current_entry, CONSOLE_PROCESS_DATA, ConsoleLink);
+ if (++(*ProcessIdsTotal) <= MaxIdListItems)
+ {
+ *ProcessIdsList++ =
HandleToUlong(current->Process->ClientId.UniqueProcess);
+ }
+ }
+
+ return STATUS_SUCCESS;
+}
+
+// ConSrvGenerateConsoleCtrlEvent
+NTSTATUS NTAPI
+ConSrvConsoleProcessCtrlEvent(IN PCONSOLE Console,
+ IN ULONG ProcessGroupId,
+ IN ULONG CtrlEvent)
+{
+ NTSTATUS Status = STATUS_SUCCESS;
+ PLIST_ENTRY current_entry;
+ PCONSOLE_PROCESS_DATA current;
+
+ /* If the console is already being destroyed, just return */
+ if (!ConDrvValidateConsoleState(Console, CONSOLE_RUNNING))
+ return STATUS_UNSUCCESSFUL;
+
+ /*
+ * Loop through the process list, from the most recent process
+ * (the active one) to the oldest one (the first created, i.e.
+ * the console leader process), and for each, send an event
+ * (new processes are inserted at the head of the console process list).
+ */
+ current_entry = Console->ProcessList.Flink;
+ while (current_entry != &Console->ProcessList)
+ {
+ current = CONTAINING_RECORD(current_entry, CONSOLE_PROCESS_DATA, ConsoleLink);
+ current_entry = current_entry->Flink;
+
+ /*
+ * Only processes belonging to the same process group are signaled.
+ * If the process group ID is zero, then all the processes are signaled.
+ */
+ if (ProcessGroupId == 0 || current->Process->ProcessGroupId ==
ProcessGroupId)
+ {
+ Status = ConSrvConsoleCtrlEvent(CtrlEvent, current);
+ }
+ }
+
+ return Status;
+}
+
+
+
/* PUBLIC SERVER APIS *********************************************************/
@@ -591,11 +737,6 @@
return Status;
}
-NTSTATUS NTAPI
-ConDrvGetConsoleProcessList(IN PCONSOLE Console,
- IN OUT PULONG ProcessIdsList,
- IN ULONG MaxIdListItems,
- OUT PULONG ProcessIdsTotal);
CSR_API(SrvGetConsoleProcessList)
{
NTSTATUS Status;
@@ -613,7 +754,7 @@
Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
- Status = ConDrvGetConsoleProcessList(Console,
+ Status = ConSrvGetConsoleProcessList(Console,
GetProcessListRequest->ProcessIdsList,
GetProcessListRequest->ProcessCount,
&GetProcessListRequest->ProcessCount);
@@ -631,7 +772,7 @@
Status = ConSrvGetConsole(ConsoleGetPerProcessData(CsrGetClientThread()->Process),
&Console, TRUE);
if (!NT_SUCCESS(Status)) return Status;
- Status = ConDrvConsoleProcessCtrlEvent(Console,
+ Status = ConSrvConsoleProcessCtrlEvent(Console,
GenerateCtrlEventRequest->ProcessGroupId,
GenerateCtrlEventRequest->CtrlEvent);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/console.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/console.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/console.h [iso-8859-1] Fri May
2 16:46:13 2014
@@ -8,9 +8,6 @@
#pragma once
-// FIXME: Fix compilation
-struct _CONSOLE;
-
NTSTATUS NTAPI
ConSrvInitConsole(OUT PHANDLE NewConsoleHandle,
OUT struct _CONSOLE** /* PCONSOLE* */ NewConsole,
@@ -18,8 +15,8 @@
IN ULONG ConsoleLeaderProcessId);
VOID NTAPI ConSrvDeleteConsole(struct _CONSOLE* /* PCONSOLE */ Console);
-NTSTATUS FASTCALL ConSrvGetConsole(PCONSOLE_PROCESS_DATA ProcessData,
+NTSTATUS ConSrvGetConsole(PCONSOLE_PROCESS_DATA ProcessData,
struct _CONSOLE** /* PCONSOLE* */ Console,
BOOL LockConsole);
-VOID FASTCALL ConSrvReleaseConsole(struct _CONSOLE* /* PCONSOLE */ Console,
+VOID ConSrvReleaseConsole(struct _CONSOLE* /* PCONSOLE */ Console,
BOOL WasConsoleLocked);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontendctl.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontendctl.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontendctl.c [iso-8859-1] Fri
May 2 16:46:13 2014
@@ -30,7 +30,7 @@
* with NT's, but values are not.
*/
#if 0
-static NTSTATUS FASTCALL
+static NTSTATUS
SetConsoleHardwareState(PCONSOLE Console, ULONG ConsoleHwState)
{
DPRINT1("Console Hardware State: %d\n", ConsoleHwState);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/conwnd.c [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -48,7 +48,7 @@
PCONSOLE_PROCESS_DATA ProcessData;
CLIENT_ID ConsoleLeaderCID;
- ProcessData = ConDrvGetConsoleLeaderProcess(GuiData->Console);
+ ProcessData = ConSrvGetConsoleLeaderProcess(GuiData->Console);
ConsoleLeaderCID = ProcessData->Process->ClientId;
SetWindowLongPtrW(GuiData->hWindow, GWLP_CONSOLE_LEADER_PID,
(LONG_PTR)(ConsoleLeaderCID.UniqueProcess));
@@ -1155,7 +1155,7 @@
* We shouldn't wait here, though, since the console lock is entered.
* A copy of the thread list probably needs to be made.
*/
- ConDrvConsoleProcessCtrlEvent(Console, 0, CTRL_CLOSE_EVENT);
+ ConSrvConsoleProcessCtrlEvent(Console, 0, CTRL_CLOSE_EVENT);
LeaveCriticalSection(&Console->Lock);
return FALSE;
@@ -1670,7 +1670,6 @@
// HACK: This functionality is standard for general scrollbars. Don't add it by
hand.
VOID
-FASTCALL
GuiConsoleHandleScrollbarMenu(VOID)
{
HMENU hMenu;
Modified:
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guisettings.c [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -357,7 +357,7 @@
NtUnmapViewOfSection(NtCurrentProcess(), pSharedInfo);
/* Get the console leader process, our client */
- ProcessData = ConDrvGetConsoleLeaderProcess(Console);
+ ProcessData = ConSrvGetConsoleLeaderProcess(Console);
/* Duplicate the section handle for the client */
Status = NtDuplicateObject(NtCurrentProcess(),
@@ -433,7 +433,7 @@
if (!ConDrvValidateConsoleUnsafe(Console, CONSOLE_RUNNING, TRUE)) return;
/* Get the console leader process, our client */
- ProcessData = ConDrvGetConsoleLeaderProcess(Console);
+ ProcessData = ConSrvGetConsoleLeaderProcess(Console);
/* Duplicate the section handle for ourselves */
Status = NtDuplicateObject(ProcessData->Process->ProcessHandle,
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -429,7 +429,7 @@
DPRINT1("CONSRV: Failed to create GUI_CONSOLE_DATA\n");
return STATUS_UNSUCCESSFUL;
}
- ///// /* HACK */ Console->TermIFace.Data = (PVOID)GuiData; /* HACK */
+ ///// /* HACK */ Console->FrontEndIFace.Data = (PVOID)GuiData; /* HACK */
GuiData->Console = Console;
GuiData->ActiveBuffer = Console->ActiveBuffer;
GuiData->hWindow = NULL;
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/gui/guiterm.h [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -14,7 +14,7 @@
#include "guisettings.h"
#include "conwnd.h"
-NTSTATUS FASTCALL GuiInitConsole(PCONSOLE Console,
+NTSTATUS GuiInitConsole(PCONSOLE Console,
/*IN*/ PCONSOLE_START_INFO ConsoleStartInfo,
PCONSOLE_INFO ConsoleInfo,
DWORD ProcessId,
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/input.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/input.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/input.c [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -20,7 +20,7 @@
/* PRIVATE FUNCTIONS **********************************************************/
-static DWORD FASTCALL
+static DWORD
ConioGetShiftState(PBYTE KeyState, LPARAM lParam)
{
DWORD ssOut = 0;
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.c [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -164,7 +164,7 @@
/**\
\******************************************************************************/
-static BOOL FASTCALL
+static BOOL
TuiSwapConsole(INT Next)
{
static PTUI_CONSOLE_DATA SwapConsole = NULL; /* Console we are thinking about
swapping with */
@@ -231,7 +231,7 @@
}
}
-static VOID FASTCALL
+static VOID
TuiCopyRect(PCHAR Dest, PTEXTMODE_SCREEN_BUFFER Buff, SMALL_RECT* Region)
{
UINT SrcDelta, DestDelta;
@@ -459,7 +459,7 @@
// return STATUS_INVALID_PARAMETER;
// /* Initialize the console */
- // Console->TermIFace.Vtbl = &TuiVtbl;
+ // Console->FrontEndIFace.Vtbl = &TuiVtbl;
TuiData = ConsoleAllocHeap(HEAP_ZERO_MEMORY, sizeof(TUI_CONSOLE_DATA));
if (!TuiData)
@@ -467,7 +467,7 @@
DPRINT1("CONSRV: Failed to create TUI_CONSOLE_DATA\n");
return STATUS_UNSUCCESSFUL;
}
- // Console->TermIFace.Data = (PVOID)TuiData;
+ // Console->FrontEndIFace.Data = (PVOID)TuiData;
TuiData->Console = Console;
TuiData->hWindow = NULL;
@@ -525,7 +525,7 @@
TuiDeinitFrontEnd(IN OUT PFRONTEND This)
{
// PCONSOLE Console = This->Console;
- PTUI_CONSOLE_DATA TuiData = This->Data; // Console->TermIFace.Data;
+ PTUI_CONSOLE_DATA TuiData = This->Data; // Console->FrontEndIFace.Data;
/* Close the notification window */
DestroyWindow(TuiData->hWindow);
@@ -556,7 +556,7 @@
/* Switch to the next console */
if (NULL != ActiveConsole) ConioDrawConsole(ActiveConsole->Console);
- // Console->TermIFace.Data = NULL;
+ // Console->FrontEndIFace.Data = NULL;
This->Data = NULL;
DeleteCriticalSection(&TuiData->Lock);
ConsoleFreeHeap(TuiData);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
---
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.h [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/frontends/tui/tuiterm.h [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -11,7 +11,7 @@
#pragma once
-NTSTATUS FASTCALL TuiInitConsole(PCONSOLE Console,
+NTSTATUS TuiInitConsole(PCONSOLE Console,
/*IN*/ PCONSOLE_START_INFO ConsoleStartInfo,
PCONSOLE_INFO ConsoleInfo,
DWORD ProcessId);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.c [iso-8859-1] Fri May
2 16:46:13 2014
@@ -72,7 +72,8 @@
*/
if (Object->Type == INPUT_BUFFER)
{
- PCONSOLE_INPUT_BUFFER InputBuffer = (PCONSOLE_INPUT_BUFFER)Object;
+ // PCONSOLE_INPUT_BUFFER InputBuffer = (PCONSOLE_INPUT_BUFFER)Object;
+ PCONSOLE Console = Object->Console;
/*
* Wake up all the writing waiters related to this handle for this
@@ -83,13 +84,13 @@
* whether or not they are related to this handle and if so, they
* return.
*/
- CsrNotifyWait(&InputBuffer->ReadWaitQueue,
+ CsrNotifyWait(&Console->ReadWaitQueue,
TRUE,
NULL,
(PVOID)Entry);
- if (!IsListEmpty(&InputBuffer->ReadWaitQueue))
+ if (!IsListEmpty(&Console->ReadWaitQueue))
{
- CsrDereferenceWait(&InputBuffer->ReadWaitQueue);
+ CsrDereferenceWait(&Console->ReadWaitQueue);
}
}
@@ -290,7 +291,6 @@
}
VOID
-FASTCALL
ConSrvInitObject(IN OUT PCONSOLE_IO_OBJECT Object,
IN CONSOLE_IO_OBJECT_TYPE Type,
IN PCONSOLE Console)
@@ -306,7 +306,6 @@
}
NTSTATUS
-FASTCALL
ConSrvInsertObject(PCONSOLE_PROCESS_DATA ProcessData,
PHANDLE Handle,
PCONSOLE_IO_OBJECT Object,
@@ -372,7 +371,6 @@
}
NTSTATUS
-FASTCALL
ConSrvRemoveObject(PCONSOLE_PROCESS_DATA ProcessData,
HANDLE Handle)
{
@@ -399,7 +397,6 @@
}
NTSTATUS
-FASTCALL
ConSrvGetObject(PCONSOLE_PROCESS_DATA ProcessData,
HANDLE Handle,
PCONSOLE_IO_OBJECT* Object,
@@ -464,7 +461,6 @@
}
VOID
-FASTCALL
ConSrvReleaseObject(PCONSOLE_IO_OBJECT Object,
BOOL IsConsoleLocked)
{
@@ -472,7 +468,6 @@
}
NTSTATUS
-FASTCALL
ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData,
PHANDLE pInputHandle,
PHANDLE pOutputHandle,
@@ -551,7 +546,6 @@
}
NTSTATUS
-FASTCALL
ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData,
HANDLE ConsoleHandle,
BOOL CreateNewHandlesTable,
@@ -634,7 +628,6 @@
}
VOID
-FASTCALL
ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData)
{
PCONSOLE Console;
@@ -649,7 +642,7 @@
CONSOLE_RUNNING, TRUE))
{
/* Retrieve the console leader process */
- PCONSOLE_PROCESS_DATA ConsoleLeaderProcess =
ConDrvGetConsoleLeaderProcess(Console);
+ PCONSOLE_PROCESS_DATA ConsoleLeaderProcess =
ConSrvGetConsoleLeaderProcess(Console);
DPRINT("ConSrvRemoveConsole - Locking OK\n");
@@ -684,7 +677,7 @@
* and then send the last close notification.
*/
Console->NotifyLastClose = FALSE;
- ConDrvConsoleCtrlEvent(CTRL_LAST_CLOSE_EVENT,
Console->NotifiedLastCloseProcess);
+ ConSrvConsoleCtrlEvent(CTRL_LAST_CLOSE_EVENT,
Console->NotifiedLastCloseProcess);
/* Only now, reset the pointer */
Console->NotifiedLastCloseProcess = NULL;
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/handle.h [iso-8859-1] Fri May
2 16:46:13 2014
@@ -10,23 +10,23 @@
#pragma once
-VOID FASTCALL ConSrvInitObject(IN OUT PCONSOLE_IO_OBJECT Object,
+VOID ConSrvInitObject(IN OUT PCONSOLE_IO_OBJECT Object,
IN CONSOLE_IO_OBJECT_TYPE Type,
IN PCONSOLE Console);
-NTSTATUS FASTCALL ConSrvInsertObject(PCONSOLE_PROCESS_DATA ProcessData,
+NTSTATUS ConSrvInsertObject(PCONSOLE_PROCESS_DATA ProcessData,
PHANDLE Handle,
PCONSOLE_IO_OBJECT Object,
DWORD Access,
BOOL Inheritable,
DWORD ShareMode);
-NTSTATUS FASTCALL ConSrvRemoveObject(PCONSOLE_PROCESS_DATA ProcessData,
+NTSTATUS ConSrvRemoveObject(PCONSOLE_PROCESS_DATA ProcessData,
HANDLE Handle);
-NTSTATUS FASTCALL ConSrvGetObject(PCONSOLE_PROCESS_DATA ProcessData,
+NTSTATUS ConSrvGetObject(PCONSOLE_PROCESS_DATA ProcessData,
HANDLE Handle,
PCONSOLE_IO_OBJECT* Object,
PVOID* Entry OPTIONAL,
DWORD Access,
BOOL LockConsole,
CONSOLE_IO_OBJECT_TYPE Type);
-VOID FASTCALL ConSrvReleaseObject(PCONSOLE_IO_OBJECT Object,
+VOID ConSrvReleaseObject(PCONSOLE_IO_OBJECT Object,
BOOL IsConsoleLocked);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -1,7 +1,7 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Console Server DLL
- * FILE: win32ss/user/winsrv/consrv/include/conio.h
+ * FILE: consrv/include/conio.h
* PURPOSE: Public Console I/O Interface
* PROGRAMMERS: Gé van Geldorp
* Jeffrey Morlan
@@ -64,8 +64,6 @@
LIST_ENTRY ListEntry; /* Entry in console's list of buffers */
- // PVOID Data; /* Private data for the frontend to use */
-
COORD ScreenBufferSize; /* Size of this screen buffer. (Rows, Columns)
for text-mode and (Width, Height) for graphics-mode */
COORD ViewSize; /* Associated "view" (i.e. console)
size */
@@ -90,6 +88,8 @@
// WORD ScreenDefaultAttrib; /* Default screen char attribute */
// WORD PopupDefaultAttrib; /* Default popup char attribute */
USHORT Mode; /* Output buffer modes */
+
+ // PVOID Data; /* Private data for the frontend to use */
};
@@ -125,8 +125,8 @@
COORD ScreenBufferSize;
USHORT ScreenAttrib;
USHORT PopupAttrib;
+ ULONG CursorSize;
BOOLEAN IsCursorVisible;
- ULONG CursorSize;
} TEXTMODE_BUFFER_INFO, *PTEXTMODE_BUFFER_INFO;
typedef struct _TEXTMODE_SCREEN_BUFFER
@@ -158,6 +158,7 @@
ULONG BitMapUsage; /* See the uUsage parameter of GetDIBits */
HANDLE hSection; /* Handle to the memory shared section for the bitmap
buffer */
PVOID BitMap; /* Our bitmap buffer */
+
PVOID ClientBitMap; /* A copy of the client view of our bitmap buffer */
HANDLE Mutex; /* Our mutex, used to synchronize read / writes to
the bitmap buffer */
HANDLE ClientMutex; /* A copy of the client handle to our mutex */
@@ -173,97 +174,95 @@
ULONG InputBufferSize; /* Size of this input buffer */
LIST_ENTRY InputEvents; /* List head for input event queue */
HANDLE ActiveEvent; /* Event set when an input event is added in its
queue */
- LIST_ENTRY ReadWaitQueue; /* List head for the queue of read wait blocks */
USHORT Mode; /* Input buffer modes */
} CONSOLE_INPUT_BUFFER, *PCONSOLE_INPUT_BUFFER;
-typedef struct _FRONTEND FRONTEND, *PFRONTEND;
+typedef struct _TERMINAL TERMINAL, *PTERMINAL;
/* HACK: */ typedef struct _CONSOLE_INFO *PCONSOLE_INFO;
-typedef struct _FRONTEND_VTBL
+typedef struct _TERMINAL_VTBL
{
/*
* Internal interface (functions called by the console server only)
*/
- NTSTATUS (NTAPI *InitFrontEnd)(IN OUT PFRONTEND This,
+ NTSTATUS (NTAPI *InitFrontEnd)(IN OUT PTERMINAL This,
IN struct _CONSOLE* Console);
- VOID (NTAPI *DeinitFrontEnd)(IN OUT PFRONTEND This);
+ VOID (NTAPI *DeinitFrontEnd)(IN OUT PTERMINAL This);
/* Interface used for both text-mode and graphics screen buffers */
- VOID (NTAPI *DrawRegion)(IN OUT PFRONTEND This,
+ VOID (NTAPI *DrawRegion)(IN OUT PTERMINAL This,
SMALL_RECT* Region);
/* Interface used only for text-mode screen buffers */
- VOID (NTAPI *WriteStream)(IN OUT PFRONTEND This,
+ VOID (NTAPI *WriteStream)(IN OUT PTERMINAL This,
SMALL_RECT* Block,
SHORT CursorStartX,
SHORT CursorStartY,
UINT ScrolledLines,
PWCHAR Buffer,
UINT Length);
- BOOL (NTAPI *SetCursorInfo)(IN OUT PFRONTEND This,
+ BOOL (NTAPI *SetCursorInfo)(IN OUT PTERMINAL This,
PCONSOLE_SCREEN_BUFFER ScreenBuffer);
- BOOL (NTAPI *SetScreenInfo)(IN OUT PFRONTEND This,
+ BOOL (NTAPI *SetScreenInfo)(IN OUT PTERMINAL This,
PCONSOLE_SCREEN_BUFFER ScreenBuffer,
SHORT OldCursorX,
SHORT OldCursorY);
- VOID (NTAPI *ResizeTerminal)(IN OUT PFRONTEND This);
- VOID (NTAPI *SetActiveScreenBuffer)(IN OUT PFRONTEND This);
- VOID (NTAPI *ReleaseScreenBuffer)(IN OUT PFRONTEND This,
+ VOID (NTAPI *ResizeTerminal)(IN OUT PTERMINAL This);
+ VOID (NTAPI *SetActiveScreenBuffer)(IN OUT PTERMINAL This);
+ VOID (NTAPI *ReleaseScreenBuffer)(IN OUT PTERMINAL This,
IN PCONSOLE_SCREEN_BUFFER ScreenBuffer);
- BOOL (NTAPI *ProcessKeyCallback)(IN OUT PFRONTEND This,
+ BOOL (NTAPI *ProcessKeyCallback)(IN OUT PTERMINAL This,
MSG* msg,
BYTE KeyStateMenu,
DWORD ShiftState,
UINT VirtualKeyCode,
BOOL Down);
- VOID (NTAPI *RefreshInternalInfo)(IN OUT PFRONTEND This);
+ VOID (NTAPI *RefreshInternalInfo)(IN OUT PTERMINAL This);
/*
* External interface (functions corresponding to the Console API)
*/
- VOID (NTAPI *ChangeTitle)(IN OUT PFRONTEND This);
- BOOL (NTAPI *ChangeIcon)(IN OUT PFRONTEND This,
+ VOID (NTAPI *ChangeTitle)(IN OUT PTERMINAL This);
+ BOOL (NTAPI *ChangeIcon)(IN OUT PTERMINAL This,
HICON IconHandle);
- HWND (NTAPI *GetConsoleWindowHandle)(IN OUT PFRONTEND This);
- VOID (NTAPI *GetLargestConsoleWindowSize)(IN OUT PFRONTEND This,
+ HWND (NTAPI *GetConsoleWindowHandle)(IN OUT PTERMINAL This);
+ VOID (NTAPI *GetLargestConsoleWindowSize)(IN OUT PTERMINAL This,
PCOORD pSize);
- BOOL (NTAPI *GetSelectionInfo)(IN OUT PFRONTEND This,
+ BOOL (NTAPI *GetSelectionInfo)(IN OUT PTERMINAL This,
PCONSOLE_SELECTION_INFO pSelectionInfo);
- BOOL (NTAPI *SetPalette)(IN OUT PFRONTEND This,
+ BOOL (NTAPI *SetPalette)(IN OUT PTERMINAL This,
HPALETTE PaletteHandle,
UINT PaletteUsage);
- ULONG (NTAPI *GetDisplayMode)(IN OUT PFRONTEND This);
- BOOL (NTAPI *SetDisplayMode)(IN OUT PFRONTEND This,
+ ULONG (NTAPI *GetDisplayMode)(IN OUT PTERMINAL This);
+ BOOL (NTAPI *SetDisplayMode)(IN OUT PTERMINAL This,
ULONG NewMode);
- INT (NTAPI *ShowMouseCursor)(IN OUT PFRONTEND This,
+ INT (NTAPI *ShowMouseCursor)(IN OUT PTERMINAL This,
BOOL Show);
- BOOL (NTAPI *SetMouseCursor)(IN OUT PFRONTEND This,
+ BOOL (NTAPI *SetMouseCursor)(IN OUT PTERMINAL This,
HCURSOR CursorHandle);
- HMENU (NTAPI *MenuControl)(IN OUT PFRONTEND This,
+ HMENU (NTAPI *MenuControl)(IN OUT PTERMINAL This,
UINT CmdIdLow,
UINT CmdIdHigh);
- BOOL (NTAPI *SetMenuClose)(IN OUT PFRONTEND This,
+ BOOL (NTAPI *SetMenuClose)(IN OUT PTERMINAL This,
BOOL Enable);
#if 0 // Possible future front-end interface
- BOOL (NTAPI *GetFrontEndProperty)(IN OUT PFRONTEND This,
+ BOOL (NTAPI *GetFrontEndProperty)(IN OUT PTERMINAL This,
ULONG Flag,
PVOID Info,
ULONG Size);
- BOOL (NTAPI *SetFrontEndProperty)(IN OUT PFRONTEND This,
+ BOOL (NTAPI *SetFrontEndProperty)(IN OUT PTERMINAL This,
ULONG Flag,
PVOID Info /*,
ULONG Size */);
#endif
-} FRONTEND_VTBL, *PFRONTEND_VTBL;
-
-struct _FRONTEND
-{
- PFRONTEND_VTBL Vtbl; /* Virtual table */
+} TERMINAL_VTBL, *PTERMINAL_VTBL;
+
+struct _TERMINAL
+{
+ PTERMINAL_VTBL Vtbl; /* Virtual table */
struct _CONSOLE* Console; /* Console to which the frontend is attached to */
PVOID Data; /* Private data */
- PVOID OldData; /* Reserved */
};
/*
@@ -277,20 +276,28 @@
CONSOLE_IN_DESTRUCTION /* Console in destruction */
} CONSOLE_STATE, *PCONSOLE_STATE;
+// HACK!!
+struct _CONSOLE;
+struct _WINSRV_CONSOLE;
+/* HACK: */ typedef struct _CONSOLE *PCONSOLE;
+#include "conio_winsrv.h"
+
typedef struct _CONSOLE
{
+/******************************* Console Set-up *******************************/
LONG ReferenceCount; /* Is incremented each time a handle to
something in the console (a screen-buffer or the input buffer of this console) gets
referenced */
CRITICAL_SECTION Lock;
+
+ /**/WINSRV_CONSOLE;/**/ // HACK HACK!!
+
CONSOLE_STATE State; /* State of the console */
-
- LIST_ENTRY ProcessList; /* List of processes owning the console. The
first one is the so-called "Console Leader Process" */
- PCONSOLE_PROCESS_DATA NotifiedLastCloseProcess; /* Pointer to the unique process that
needs to be notified when the console leader process is killed */
- BOOLEAN NotifyLastClose; /* TRUE if the console should send a control
event when the console leader process is killed */
-
- FRONTEND TermIFace; /* Frontend-specific interface */
+ TERMINAL TermIFace; /* Frontend-specific interface */
+
+ ULONG ConsoleID; /* The ID of the console */
/**************************** Input buffer and data ***************************/
CONSOLE_INPUT_BUFFER InputBuffer; /* Input buffer of the console */
+ UINT CodePage;
/** Put those things in TEXTMODE_SCREEN_BUFFER ?? **/
PWCHAR LineBuffer; /* Current line being input, in line buffered
mode */
@@ -303,16 +310,11 @@
ULONG LineWakeupMask; /* Bitmap of which control characters will
end line input */
/***************************************************/
- BOOLEAN QuickEdit;
BOOLEAN InsertMode;
- UINT CodePage;
/******************************* Screen buffers *******************************/
LIST_ENTRY BufferList; /* List of all screen buffers for this
console */
PCONSOLE_SCREEN_BUFFER ActiveBuffer; /* Pointer to currently active screen buffer
*/
- BYTE PauseFlags;
- HANDLE UnpauseEvent;
- LIST_ENTRY WriteWaitQueue; /* List head for the queue of write wait
blocks */
UINT OutputCodePage;
/**************************** Aliases and Histories ***************************/
@@ -326,38 +328,39 @@
UNICODE_STRING OriginalTitle; /* Original title of console, the one defined
when the console leader is launched; it never changes. Always NULL-terminated */
UNICODE_STRING Title; /* Title of console. Always NULL-terminated
*/
+ HANDLE UnpauseEvent; /* When != NULL, event for pausing the
console */
+
COORD ConsoleSize; /* The current size of the console, for
text-mode only */
BOOLEAN FixedSize; /* TRUE if the console is of fixed size */
COLORREF Colors[16]; /* Colour palette */
-} CONSOLE, *PCONSOLE;
-
-/* PauseFlags values (internal only) */
-#define PAUSED_FROM_KEYBOARD 0x1
-#define PAUSED_FROM_SCROLLBAR 0x2
-#define PAUSED_FROM_SELECTION 0x4
+} CONSOLE; // , *PCONSOLE;
+
+// #include "conio_winsrv.h"
/* console.c */
-VOID FASTCALL ConioPause(PCONSOLE Console, UINT Flags);
-VOID FASTCALL ConioUnpause(PCONSOLE Console, UINT Flags);
+VOID NTAPI
+ConDrvPause(PCONSOLE Console);
+VOID NTAPI
+ConDrvUnpause(PCONSOLE Console);
PCONSOLE_PROCESS_DATA NTAPI
-ConDrvGetConsoleLeaderProcess(IN PCONSOLE Console);
+ConSrvGetConsoleLeaderProcess(IN PCONSOLE Console);
NTSTATUS
-ConDrvConsoleCtrlEvent(IN ULONG CtrlEvent,
+ConSrvConsoleCtrlEvent(IN ULONG CtrlEvent,
IN PCONSOLE_PROCESS_DATA ProcessData);
NTSTATUS NTAPI
-ConDrvConsoleProcessCtrlEvent(IN PCONSOLE Console,
+ConSrvConsoleProcessCtrlEvent(IN PCONSOLE Console,
IN ULONG ProcessGroupId,
IN ULONG CtrlEvent);
/* coninput.c */
VOID NTAPI ConioProcessKey(PCONSOLE Console, MSG* msg);
-NTSTATUS FASTCALL ConioAddInputEvent(PCONSOLE Console,
+NTSTATUS ConioAddInputEvent(PCONSOLE Console,
PINPUT_RECORD InputEvent,
BOOLEAN AppendToEnd);
-NTSTATUS FASTCALL ConioProcessInputEvent(PCONSOLE Console,
+NTSTATUS ConioProcessInputEvent(PCONSOLE Console,
PINPUT_RECORD InputEvent);
/* conoutput.c */
@@ -382,7 +385,7 @@
MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1)
PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y);
-VOID FASTCALL ConioDrawConsole(PCONSOLE Console);
+VOID ConioDrawConsole(PCONSOLE Console);
NTSTATUS ConioResizeBuffer(PCONSOLE Console,
PTEXTMODE_SCREEN_BUFFER ScreenBuffer,
COORD Size);
@@ -391,7 +394,7 @@
PWCHAR Buffer,
DWORD Length,
BOOL Attrib);
-DWORD FASTCALL ConioEffectiveCursorSize(PCONSOLE Console,
+DWORD ConioEffectiveCursorSize(PCONSOLE Console,
DWORD Scale);
/* EOF */
Copied: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h
(from r63104, branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h)
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio.h [iso-8859-1]
(original)
+++
branches/condrv_restructure/win32ss/user/winsrv/consrv/include/conio_winsrv.h [iso-8859-1]
Fri May 2 16:46:13 2014
@@ -1,7 +1,7 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Console Server DLL
- * FILE: win32ss/user/winsrv/consrv/include/conio.h
+ * FILE: consrv/include/conio_winsrv.h
* PURPOSE: Public Console I/O Interface
* PROGRAMMERS: Gé van Geldorp
* Jeffrey Morlan
@@ -12,177 +12,12 @@
#define CSR_DEFAULT_CURSOR_SIZE 25
-/* Default attributes */
-#define DEFAULT_SCREEN_ATTRIB (FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED)
-#define DEFAULT_POPUP_ATTRIB (FOREGROUND_BLUE | FOREGROUND_RED | \
- BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED |
BACKGROUND_INTENSITY)
-
-/* Object type magic numbers */
-typedef enum _CONSOLE_IO_OBJECT_TYPE
-{
-// ANY_TYPE_BUFFER = 0x00, // --> Match any types of IO handles
- TEXTMODE_BUFFER = 0x01, // --> Output-type handles for text SBs
- GRAPHICS_BUFFER = 0x02, // --> Output-type handles for graphics SBs
- SCREEN_BUFFER = 0x03, // --> Any SB type
- INPUT_BUFFER = 0x04 // --> Input-type handles
-} CONSOLE_IO_OBJECT_TYPE;
-
-typedef struct _CONSOLE_IO_OBJECT
-{
- CONSOLE_IO_OBJECT_TYPE Type;
- struct _CONSOLE* /* PCONSOLE */ Console;
- LONG AccessRead, AccessWrite;
- LONG ExclusiveRead, ExclusiveWrite;
- LONG HandleCount;
-} CONSOLE_IO_OBJECT, *PCONSOLE_IO_OBJECT;
-
-
-/******************************************************************************\
-|* *|
-|* Abstract "class" for screen-buffers, be they text-mode or graphics
*|
-|* *|
-\******************************************************************************/
-
-/*
- * See conoutput.c for the implementation
- */
-
-typedef struct _CONSOLE_SCREEN_BUFFER CONSOLE_SCREEN_BUFFER,
- *PCONSOLE_SCREEN_BUFFER;
-
-typedef struct _CONSOLE_SCREEN_BUFFER_VTBL
-{
- CONSOLE_IO_OBJECT_TYPE (*GetType)(PCONSOLE_SCREEN_BUFFER This);
-} CONSOLE_SCREEN_BUFFER_VTBL, *PCONSOLE_SCREEN_BUFFER_VTBL;
-
-#define GetType(This) (This)->Vtbl->GetType(This)
-
-struct _CONSOLE_SCREEN_BUFFER
-{
- CONSOLE_IO_OBJECT Header; /* Object header - MUST BE IN FIRST PLACE */
- PCONSOLE_SCREEN_BUFFER_VTBL Vtbl; /* Virtual table */
-
- LIST_ENTRY ListEntry; /* Entry in console's list of buffers */
-
- // PVOID Data; /* Private data for the frontend to use */
-
- COORD ScreenBufferSize; /* Size of this screen buffer. (Rows, Columns)
for text-mode and (Width, Height) for graphics-mode */
- COORD ViewSize; /* Associated "view" (i.e. console)
size */
-
- COORD OldScreenBufferSize; /* Old size of this screen buffer */
- COORD OldViewSize; /* Old associated view size */
-
- COORD ViewOrigin; /* Beginning offset for the actual display area
*/
-
-/***** Put that VV in TEXTMODE_SCREEN_BUFFER ?? *****/
- USHORT VirtualY; /* Top row of buffer being displayed, reported to
callers */
-
- COORD CursorPosition; /* Current cursor position */
- BOOLEAN CursorBlinkOn;
- BOOLEAN ForceCursorOff;
-// ULONG CursorSize;
- CONSOLE_CURSOR_INFO CursorInfo; // FIXME: Keep this member or not ??
-/*********************************************/
-
- HPALETTE PaletteHandle; /* Handle to the color palette associated to this
buffer */
- UINT PaletteUsage; /* The new use of the system palette. See
SetSystemPaletteUse 'uUsage' parameter */
-
-// WORD ScreenDefaultAttrib; /* Default screen char attribute */
-// WORD PopupDefaultAttrib; /* Default popup char attribute */
- USHORT Mode; /* Output buffer modes */
-};
-
-
-
-/******************************************************************************\
-|* *|
-|* Text-mode and graphics-mode screen-buffer "classes"
*|
-|* *|
-\******************************************************************************/
-
-/*
- * See text.c for the implementation
- */
-
-/************************************************************************
- * Screen buffer structure represents the win32 screen buffer object. *
- * Internally, the portion of the buffer being shown CAN loop past the *
- * bottom of the virtual buffer and wrap around to the top. Win32 does *
- * not do this. I decided to do this because it eliminates the need to *
- * do a massive memcpy() to scroll the contents of the buffer up to *
- * scroll the screen on output, instead I just shift down the position *
- * to be displayed, and let it wrap around to the top again. *
- * The VirtualY member keeps track of the top Y coord that win32 *
- * clients THINK is currently being displayed, because they think that *
- * when the display reaches the bottom of the buffer and another line *
- * being printed causes another line to scroll down, that the buffer IS *
- * memcpy()'s up, and the bottom of the buffer is still displayed, but *
- * internally, I just wrap back to the top of the buffer. *
- ************************************************************************/
-
-typedef struct _TEXTMODE_BUFFER_INFO
-{
- COORD ScreenBufferSize;
- USHORT ScreenAttrib;
- USHORT PopupAttrib;
- BOOLEAN IsCursorVisible;
- ULONG CursorSize;
-} TEXTMODE_BUFFER_INFO, *PTEXTMODE_BUFFER_INFO;
-
-typedef struct _TEXTMODE_SCREEN_BUFFER
-{
- CONSOLE_SCREEN_BUFFER; /* Screen buffer base class - MUST BE IN FIRST PLACE */
-
- PCHAR_INFO Buffer; /* Pointer to UNICODE screen buffer
(Buffer->Char.UnicodeChar only is valid, not Char.AsciiChar) */
-
- WORD ScreenDefaultAttrib; /* Default screen char attribute */
- WORD PopupDefaultAttrib; /* Default popup char attribute */
-} TEXTMODE_SCREEN_BUFFER, *PTEXTMODE_SCREEN_BUFFER;
-
-
-/*
- * See graphics.c for the implementation
- */
-
-typedef struct _GRAPHICS_BUFFER_INFO
-{
- CONSOLE_GRAPHICS_BUFFER_INFO Info;
-} GRAPHICS_BUFFER_INFO, *PGRAPHICS_BUFFER_INFO;
-
-typedef struct _GRAPHICS_SCREEN_BUFFER
-{
- CONSOLE_SCREEN_BUFFER; /* Screen buffer base class - MUST BE IN FIRST PLACE
*/
-
- ULONG BitMapInfoLength; /* Real size of the structure pointed by BitMapInfo
*/
- LPBITMAPINFO BitMapInfo; /* Information on the bitmap buffer */
- ULONG BitMapUsage; /* See the uUsage parameter of GetDIBits */
- HANDLE hSection; /* Handle to the memory shared section for the bitmap
buffer */
- PVOID BitMap; /* Our bitmap buffer */
- PVOID ClientBitMap; /* A copy of the client view of our bitmap buffer */
- HANDLE Mutex; /* Our mutex, used to synchronize read / writes to
the bitmap buffer */
- HANDLE ClientMutex; /* A copy of the client handle to our mutex */
- HANDLE ClientProcess; /* Handle to the client process who opened the
buffer, to unmap the view */
-} GRAPHICS_SCREEN_BUFFER, *PGRAPHICS_SCREEN_BUFFER;
-
-
-
-typedef struct _CONSOLE_INPUT_BUFFER
-{
- CONSOLE_IO_OBJECT Header; /* Object header - MUST BE IN FIRST PLACE */
-
- ULONG InputBufferSize; /* Size of this input buffer */
- LIST_ENTRY InputEvents; /* List head for input event queue */
- HANDLE ActiveEvent; /* Event set when an input event is added in its
queue */
- LIST_ENTRY ReadWaitQueue; /* List head for the queue of read wait blocks */
-
- USHORT Mode; /* Input buffer modes */
-} CONSOLE_INPUT_BUFFER, *PCONSOLE_INPUT_BUFFER;
-
-
typedef struct _FRONTEND FRONTEND, *PFRONTEND;
/* HACK: */ typedef struct _CONSOLE_INFO *PCONSOLE_INFO;
typedef struct _FRONTEND_VTBL
{
+ // NTSTATUS (NTAPI *UnloadFrontEnd)(IN OUT PFRONTEND This);
+
/*
* Internal interface (functions called by the console server only)
*/
@@ -245,17 +80,6 @@
UINT CmdIdHigh);
BOOL (NTAPI *SetMenuClose)(IN OUT PFRONTEND This,
BOOL Enable);
-
-#if 0 // Possible future front-end interface
- BOOL (NTAPI *GetFrontEndProperty)(IN OUT PFRONTEND This,
- ULONG Flag,
- PVOID Info,
- ULONG Size);
- BOOL (NTAPI *SetFrontEndProperty)(IN OUT PFRONTEND This,
- ULONG Flag,
- PVOID Info /*,
- ULONG Size */);
-#endif
} FRONTEND_VTBL, *PFRONTEND_VTBL;
struct _FRONTEND
@@ -266,98 +90,55 @@
PVOID OldData; /* Reserved */
};
-/*
- * WARNING: Change the state of the console ONLY when the console is locked !
- */
-typedef enum _CONSOLE_STATE
-{
- CONSOLE_INITIALIZING, /* Console is initializing */
- CONSOLE_RUNNING , /* Console running */
- CONSOLE_TERMINATING , /* Console about to be destroyed (but still not) */
- CONSOLE_IN_DESTRUCTION /* Console in destruction */
-} CONSOLE_STATE, *PCONSOLE_STATE;
-
-typedef struct _CONSOLE
-{
- LONG ReferenceCount; /* Is incremented each time a handle to
something in the console (a screen-buffer or the input buffer of this console) gets
referenced */
- CRITICAL_SECTION Lock;
- CONSOLE_STATE State; /* State of the console */
-
- LIST_ENTRY ProcessList; /* List of processes owning the console. The
first one is the so-called "Console Leader Process" */
- PCONSOLE_PROCESS_DATA NotifiedLastCloseProcess; /* Pointer to the unique process that
needs to be notified when the console leader process is killed */
- BOOLEAN NotifyLastClose; /* TRUE if the console should send a control
event when the console leader process is killed */
-
- FRONTEND TermIFace; /* Frontend-specific interface */
-
-/**************************** Input buffer and data ***************************/
- CONSOLE_INPUT_BUFFER InputBuffer; /* Input buffer of the console */
-
- /** Put those things in TEXTMODE_SCREEN_BUFFER ?? **/
- PWCHAR LineBuffer; /* Current line being input, in line buffered
mode */
- WORD LineMaxSize; /* Maximum size of line in characters
(including CR+LF) */
- WORD LineSize; /* Current size of line */
- WORD LinePos; /* Current position within line */
- BOOLEAN LineComplete; /* User pressed enter, ready to send back to
client */
- BOOLEAN LineUpPressed;
- BOOLEAN LineInsertToggle; /* Replace character over cursor instead of
inserting */
- ULONG LineWakeupMask; /* Bitmap of which control characters will
end line input */
- /***************************************************/
-
- BOOLEAN QuickEdit;
- BOOLEAN InsertMode;
- UINT CodePage;
-
-/******************************* Screen buffers *******************************/
- LIST_ENTRY BufferList; /* List of all screen buffers for this
console */
- PCONSOLE_SCREEN_BUFFER ActiveBuffer; /* Pointer to currently active screen buffer
*/
- BYTE PauseFlags;
- HANDLE UnpauseEvent;
- LIST_ENTRY WriteWaitQueue; /* List head for the queue of write wait
blocks */
- UINT OutputCodePage;
-
-/**************************** Aliases and Histories ***************************/
- struct _ALIAS_HEADER *Aliases;
- LIST_ENTRY HistoryBuffers;
- ULONG HistoryBufferSize; /* Size for newly created history buffers */
- ULONG NumberOfHistoryBuffers; /* Maximum number of history buffers allowed
*/
- BOOLEAN HistoryNoDup; /* Remove old duplicate history entries */
-
-/****************************** Other properties ******************************/
- UNICODE_STRING OriginalTitle; /* Original title of console, the one defined
when the console leader is launched; it never changes. Always NULL-terminated */
- UNICODE_STRING Title; /* Title of console. Always NULL-terminated
*/
-
- COORD ConsoleSize; /* The current size of the console, for
text-mode only */
- BOOLEAN FixedSize; /* TRUE if the console is of fixed size */
-
- COLORREF Colors[16]; /* Colour palette */
-
-} CONSOLE, *PCONSOLE;
-
/* PauseFlags values (internal only) */
#define PAUSED_FROM_KEYBOARD 0x1
#define PAUSED_FROM_SCROLLBAR 0x2
#define PAUSED_FROM_SELECTION 0x4
+typedef struct _WINSRV_CONSOLE
+{
+/******************************* Console Set-up *******************************/
+ /* This **MUST** be FIRST!! */
+ // CONSOLE;
+
+ // LONG ReferenceCount; /* Is incremented each time a handle to
something in the console (a screen-buffer or the input buffer of this console) gets
referenced */
+ // CRITICAL_SECTION Lock;
+ // CONSOLE_STATE State; /* State of the console */
+
+ FRONTEND FrontEndIFace; /* Frontend-specific interface */
+
+ LIST_ENTRY ProcessList; /* List of processes owning the console. The first
one is the so-called "Console Leader Process" */
+ PCONSOLE_PROCESS_DATA NotifiedLastCloseProcess; /* Pointer to the unique process that
needs to be notified when the console leader process is killed */
+ BOOLEAN NotifyLastClose; /* TRUE if the console should send a control event
when the console leader process is killed */
+
+ BOOLEAN QuickEdit;
+
+ BYTE PauseFlags;
+ LIST_ENTRY ReadWaitQueue; /* List head for the queue of unique input buffer
read wait blocks */
+ LIST_ENTRY WriteWaitQueue; /* List head for the queue of current screen-buffer
write wait blocks */
+
+} WINSRV_CONSOLE, *PWINSRV_CONSOLE;
+
/* console.c */
-VOID FASTCALL ConioPause(PCONSOLE Console, UINT Flags);
-VOID FASTCALL ConioUnpause(PCONSOLE Console, UINT Flags);
+VOID ConioPause(PCONSOLE Console, UINT Flags);
+VOID ConioUnpause(PCONSOLE Console, UINT Flags);
PCONSOLE_PROCESS_DATA NTAPI
-ConDrvGetConsoleLeaderProcess(IN PCONSOLE Console);
+ConSrvGetConsoleLeaderProcess(IN PCONSOLE Console);
NTSTATUS
-ConDrvConsoleCtrlEvent(IN ULONG CtrlEvent,
+ConSrvConsoleCtrlEvent(IN ULONG CtrlEvent,
IN PCONSOLE_PROCESS_DATA ProcessData);
NTSTATUS NTAPI
-ConDrvConsoleProcessCtrlEvent(IN PCONSOLE Console,
+ConSrvConsoleProcessCtrlEvent(IN PCONSOLE Console,
IN ULONG ProcessGroupId,
IN ULONG CtrlEvent);
/* coninput.c */
VOID NTAPI ConioProcessKey(PCONSOLE Console, MSG* msg);
-NTSTATUS FASTCALL ConioAddInputEvent(PCONSOLE Console,
+NTSTATUS ConioAddInputEvent(PCONSOLE Console,
PINPUT_RECORD InputEvent,
BOOLEAN AppendToEnd);
-NTSTATUS FASTCALL ConioProcessInputEvent(PCONSOLE Console,
+NTSTATUS ConioProcessInputEvent(PCONSOLE Console,
PINPUT_RECORD InputEvent);
/* conoutput.c */
@@ -382,7 +163,7 @@
MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1)
PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y);
-VOID FASTCALL ConioDrawConsole(PCONSOLE Console);
+VOID ConioDrawConsole(PCONSOLE Console);
NTSTATUS ConioResizeBuffer(PCONSOLE Console,
PTEXTMODE_SCREEN_BUFFER ScreenBuffer,
COORD Size);
@@ -391,7 +172,7 @@
PWCHAR Buffer,
DWORD Length,
BOOL Attrib);
-DWORD FASTCALL ConioEffectiveCursorSize(PCONSOLE Console,
+DWORD ConioEffectiveCursorSize(PCONSOLE Console,
DWORD Scale);
/* EOF */
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/include/term.h [iso-8859-1] Fri
May 2 16:46:13 2014
@@ -11,48 +11,48 @@
/* Macros used to call functions in the FRONTEND_VTBL virtual table */
#define TermDrawRegion(Console, Region) \
- (Console)->TermIFace.Vtbl->DrawRegion(&(Console)->TermIFace, (Region))
+ (Console)->FrontEndIFace.Vtbl->DrawRegion(&(Console)->FrontEndIFace,
(Region))
#define TermWriteStream(Console, Block, CurStartX, CurStartY, ScrolledLines, Buffer,
Length) \
- (Console)->TermIFace.Vtbl->WriteStream(&(Console)->TermIFace, (Block),
(CurStartX), (CurStartY), \
+ (Console)->FrontEndIFace.Vtbl->WriteStream(&(Console)->FrontEndIFace,
(Block), (CurStartX), (CurStartY), \
(ScrolledLines), (Buffer), (Length))
#define TermSetCursorInfo(Console, ScreenBuffer) \
- (Console)->TermIFace.Vtbl->SetCursorInfo(&(Console)->TermIFace,
(ScreenBuffer))
+ (Console)->FrontEndIFace.Vtbl->SetCursorInfo(&(Console)->FrontEndIFace,
(ScreenBuffer))
#define TermSetScreenInfo(Console, ScreenBuffer, OldCursorX, OldCursorY) \
- (Console)->TermIFace.Vtbl->SetScreenInfo(&(Console)->TermIFace,
(ScreenBuffer), (OldCursorX), (OldCursorY))
+ (Console)->FrontEndIFace.Vtbl->SetScreenInfo(&(Console)->FrontEndIFace,
(ScreenBuffer), (OldCursorX), (OldCursorY))
#define TermResizeTerminal(Console) \
- (Console)->TermIFace.Vtbl->ResizeTerminal(&(Console)->TermIFace)
+
(Console)->FrontEndIFace.Vtbl->ResizeTerminal(&(Console)->FrontEndIFace)
#define TermSetActiveScreenBuffer(Console) \
- (Console)->TermIFace.Vtbl->SetActiveScreenBuffer(&(Console)->TermIFace)
+
(Console)->FrontEndIFace.Vtbl->SetActiveScreenBuffer(&(Console)->FrontEndIFace)
#define TermReleaseScreenBuffer(Console, ScreenBuffer) \
- (Console)->TermIFace.Vtbl->ReleaseScreenBuffer(&(Console)->TermIFace,
(ScreenBuffer))
+
(Console)->FrontEndIFace.Vtbl->ReleaseScreenBuffer(&(Console)->FrontEndIFace,
(ScreenBuffer))
#define TermProcessKeyCallback(Console, Msg, KeyStateMenu, ShiftState, VirtualKeyCode,
Down) \
- (Console)->TermIFace.Vtbl->ProcessKeyCallback(&(Console)->TermIFace,
(Msg), (KeyStateMenu), (ShiftState), (VirtualKeyCode), (Down))
+
(Console)->FrontEndIFace.Vtbl->ProcessKeyCallback(&(Console)->FrontEndIFace,
(Msg), (KeyStateMenu), (ShiftState), (VirtualKeyCode), (Down))
#define TermRefreshInternalInfo(Console) \
- (Console)->TermIFace.Vtbl->RefreshInternalInfo(&(Console)->TermIFace)
+
(Console)->FrontEndIFace.Vtbl->RefreshInternalInfo(&(Console)->FrontEndIFace)
#define TermChangeTitle(Console) \
- (Console)->TermIFace.Vtbl->ChangeTitle(&(Console)->TermIFace)
+ (Console)->FrontEndIFace.Vtbl->ChangeTitle(&(Console)->FrontEndIFace)
#define TermChangeIcon(Console, IconHandle) \
- (Console)->TermIFace.Vtbl->ChangeIcon(&(Console)->TermIFace,
(IconHandle))
+ (Console)->FrontEndIFace.Vtbl->ChangeIcon(&(Console)->FrontEndIFace,
(IconHandle))
#define TermGetConsoleWindowHandle(Console) \
-
(Console)->TermIFace.Vtbl->GetConsoleWindowHandle(&(Console)->TermIFace)
+
(Console)->FrontEndIFace.Vtbl->GetConsoleWindowHandle(&(Console)->FrontEndIFace)
#define TermGetLargestConsoleWindowSize(Console, pSize) \
-
(Console)->TermIFace.Vtbl->GetLargestConsoleWindowSize(&(Console)->TermIFace,
(pSize))
+
(Console)->FrontEndIFace.Vtbl->GetLargestConsoleWindowSize(&(Console)->FrontEndIFace,
(pSize))
#define TermGetSelectionInfo(Console, pSelectionInfo) \
- (Console)->TermIFace.Vtbl->GetSelectionInfo(&(Console)->TermIFace,
(pSelectionInfo))
+
(Console)->FrontEndIFace.Vtbl->GetSelectionInfo(&(Console)->FrontEndIFace,
(pSelectionInfo))
#define TermSetPalette(Console, PaletteHandle, PaletteUsage) \
- (Console)->TermIFace.Vtbl->SetPalette(&(Console)->TermIFace,
(PaletteHandle), (PaletteUsage))
+ (Console)->FrontEndIFace.Vtbl->SetPalette(&(Console)->FrontEndIFace,
(PaletteHandle), (PaletteUsage))
#define TermGetDisplayMode(Console) \
- (Console)->TermIFace.Vtbl->GetDisplayMode(&(Console)->TermIFace)
+
(Console)->FrontEndIFace.Vtbl->GetDisplayMode(&(Console)->FrontEndIFace)
#define TermSetDisplayMode(Console, NewMode) \
- (Console)->TermIFace.Vtbl->SetDisplayMode(&(Console)->TermIFace,
(NewMode))
+ (Console)->FrontEndIFace.Vtbl->SetDisplayMode(&(Console)->FrontEndIFace,
(NewMode))
#define TermShowMouseCursor(Console, Show) \
- (Console)->TermIFace.Vtbl->ShowMouseCursor(&(Console)->TermIFace,
(Show))
+
(Console)->FrontEndIFace.Vtbl->ShowMouseCursor(&(Console)->FrontEndIFace,
(Show))
#define TermSetMouseCursor(Console, CursorHandle) \
- (Console)->TermIFace.Vtbl->SetMouseCursor(&(Console)->TermIFace,
(CursorHandle))
+ (Console)->FrontEndIFace.Vtbl->SetMouseCursor(&(Console)->FrontEndIFace,
(CursorHandle))
#define TermMenuControl(Console, CmdIdLow, CmdIdHigh) \
- (Console)->TermIFace.Vtbl->MenuControl(&(Console)->TermIFace,
(CmdIdLow), (CmdIdHigh))
+ (Console)->FrontEndIFace.Vtbl->MenuControl(&(Console)->FrontEndIFace,
(CmdIdLow), (CmdIdHigh))
#define TermSetMenuClose(Console, Enable) \
- (Console)->TermIFace.Vtbl->SetMenuClose(&(Console)->TermIFace,
(Enable))
+ (Console)->FrontEndIFace.Vtbl->SetMenuClose(&(Console)->FrontEndIFace,
(Enable))
/* EOF */
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/lineinput.c
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/lineinput.c [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/lineinput.c [iso-8859-1] Fri
May 2 16:46:13 2014
@@ -151,7 +151,7 @@
ConsoleFreeHeap(Hist);
}
-VOID FASTCALL
+VOID
HistoryDeleteBuffers(PCONSOLE Console)
{
PLIST_ENTRY CurrentEntry;
@@ -244,7 +244,7 @@
Hist->Entries[Hist->Position].Buffer);
}
-VOID FASTCALL
+VOID
LineInputKeyDown(PCONSOLE Console, KEY_EVENT_RECORD *KeyEvent)
{
UINT Pos = Console->LinePos;
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/lineinput.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/lineinput.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/lineinput.h [iso-8859-1] Fri
May 2 16:46:13 2014
@@ -8,5 +8,5 @@
#pragma once
-VOID FASTCALL HistoryDeleteBuffers(PCONSOLE Console);
-VOID FASTCALL LineInputKeyDown(PCONSOLE Console, KEY_EVENT_RECORD *KeyEvent);
+VOID HistoryDeleteBuffers(PCONSOLE Console);
+VOID LineInputKeyDown(PCONSOLE Console, KEY_EVENT_RECORD *KeyEvent);
Modified: branches/condrv_restructure/win32ss/user/winsrv/consrv/procinit.h
URL:
http://svn.reactos.org/svn/reactos/branches/condrv_restructure/win32ss/user…
==============================================================================
--- branches/condrv_restructure/win32ss/user/winsrv/consrv/procinit.h [iso-8859-1]
(original)
+++ branches/condrv_restructure/win32ss/user/winsrv/consrv/procinit.h [iso-8859-1] Fri May
2 16:46:13 2014
@@ -8,15 +8,15 @@
#pragma once
-NTSTATUS FASTCALL ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData,
+NTSTATUS ConSrvAllocateConsole(PCONSOLE_PROCESS_DATA ProcessData,
PHANDLE pInputHandle,
PHANDLE pOutputHandle,
PHANDLE pErrorHandle,
PCONSOLE_START_INFO ConsoleStartInfo);
-NTSTATUS FASTCALL ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData,
+NTSTATUS ConSrvInheritConsole(PCONSOLE_PROCESS_DATA ProcessData,
HANDLE ConsoleHandle,
BOOL CreateNewHandlesTable,
PHANDLE pInputHandle,
PHANDLE pOutputHandle,
PHANDLE pErrorHandle);
-VOID FASTCALL ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData);
+VOID ConSrvRemoveConsole(PCONSOLE_PROCESS_DATA ProcessData);