ReactOS  0.4.15-dev-1074-gffc96d2
console.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _CONSOLE_INIT_INFO
 

Typedefs

typedef struct _CONSOLE_INIT_INFO CONSOLE_INIT_INFO
 
typedef struct _CONSOLE_INIT_INFOPCONSOLE_INIT_INFO
 

Functions

VOID NTAPI ConSrvInitConsoleSupport (VOID)
 
NTSTATUS NTAPI ConSrvInitConsole (OUT PHANDLE NewConsoleHandle, OUT struct _CONSRV_CONSOLE **NewConsole, IN OUT PCONSOLE_INIT_INFO ConsoleInitInfo, IN PCSR_PROCESS ConsoleLeaderProcess)
 
VOID NTAPI ConSrvDeleteConsole (struct _CONSRV_CONSOLE *Console)
 
NTSTATUS ConSrvGetConsole (IN PCONSOLE_PROCESS_DATA ProcessData, OUT struct _CONSRV_CONSOLE **Console, IN BOOLEAN LockConsole)
 
VOID ConSrvReleaseConsole (IN struct _CONSRV_CONSOLE *Console, IN BOOLEAN IsConsoleLocked)
 
BOOLEAN NTAPI ConSrvValidateConsole (OUT struct _CONSRV_CONSOLE **Console, IN HANDLE ConsoleHandle, IN CONSOLE_STATE ExpectedState, IN BOOLEAN LockConsole)
 
NTSTATUS ConSrvConsoleCtrlEventTimeout (IN ULONG CtrlEvent, IN PCONSOLE_PROCESS_DATA ProcessData, IN ULONG Timeout)
 

Typedef Documentation

◆ CONSOLE_INIT_INFO

◆ PCONSOLE_INIT_INFO

Function Documentation

◆ ConSrvConsoleCtrlEventTimeout()

NTSTATUS ConSrvConsoleCtrlEventTimeout ( IN ULONG  CtrlEvent,
IN PCONSOLE_PROCESS_DATA  ProcessData,
IN ULONG  Timeout 
)

Definition at line 1305 of file console.c.

1308 {
1310 
1311  DPRINT("ConSrvConsoleCtrlEventTimeout Parent ProcessId = %x\n", ProcessData->Process->ClientId.UniqueProcess);
1312 
1313  /*
1314  * Be sure we effectively have a control routine. It resides in kernel32.dll (client).
1315  */
1316  if (ProcessData->CtrlRoutine == NULL) return Status;
1317 
1318  _SEH2_TRY
1319  {
1320  HANDLE Thread = NULL;
1321 
1322  _SEH2_TRY
1323  {
1324  Thread = CreateRemoteThread(ProcessData->Process->ProcessHandle, NULL, 0,
1325  ProcessData->CtrlRoutine,
1326  UlongToPtr(CtrlEvent), 0, NULL);
1327  if (NULL == Thread)
1328  {
1330  DPRINT1("Failed thread creation, Status = 0x%08lx\n", Status);
1331  }
1332  else
1333  {
1334  DPRINT("ProcessData->CtrlRoutine remote thread creation succeeded, ProcessId = %x, Process = 0x%p\n",
1335  ProcessData->Process->ClientId.UniqueProcess, ProcessData->Process);
1337  }
1338  }
1340  {
1342  }
1343  _SEH2_END;
1344  }
1346  {
1348  DPRINT1("ConSrvConsoleCtrlEventTimeout - Caught an exception, Status = 0x%08lx\n", Status);
1349  }
1350  _SEH2_END;
1351 
1352  return Status;
1353 }
#define CloseHandle
Definition: compat.h:487
LONG NTSTATUS
Definition: precomp.h:26
_SEH2_TRY
Definition: create.c:4226
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
#define UlongToPtr(u)
Definition: config.h:106
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
NTSYSAPI NTSTATUS WINAPI RtlGetLastNtStatus(void)
Definition: error.c:114
Status
Definition: gdiplustypes.h:24
_SEH2_END
Definition: create.c:4400
static ULONG Timeout
Definition: ping.c:61
_SEH2_FINALLY
Definition: create.c:4371
#define DPRINT1
Definition: precomp.h:8
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:12
return STATUS_SUCCESS
Definition: btrfs.c:3014
HANDLE WINAPI CreateRemoteThread(IN HANDLE hProcess, IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:158

Referenced by ConSrvConsoleCtrlEvent(), and NotifyConsoleProcessForShutdown().

◆ ConSrvDeleteConsole()

VOID NTAPI ConSrvDeleteConsole ( struct _CONSRV_CONSOLE Console)

◆ ConSrvGetConsole()

NTSTATUS ConSrvGetConsole ( IN PCONSOLE_PROCESS_DATA  ProcessData,
OUT struct _CONSRV_CONSOLE **  Console,
IN BOOLEAN  LockConsole 
)

◆ ConSrvInitConsole()

NTSTATUS NTAPI ConSrvInitConsole ( OUT PHANDLE  NewConsoleHandle,
OUT struct _CONSRV_CONSOLE **  NewConsole,
IN OUT PCONSOLE_INIT_INFO  ConsoleInitInfo,
IN PCSR_PROCESS  ConsoleLeaderProcess 
)

◆ ConSrvInitConsoleSupport()

VOID NTAPI ConSrvInitConsoleSupport ( VOID  )

Definition at line 347 of file console.c.

348 {
349  DPRINT("CONSRV: ConSrvInitConsoleSupport()\n");
350 
351  /* Initialize the console list and its lock */
352  ConsoleListSize = 0;
353  ConsoleList = NULL;
354  // InitializeListHead(&ConDrvConsoleList);
356 
357  /* Should call LoadKeyboardLayout */
358 }
static PCONSRV_CONSOLE * ConsoleList
Definition: console.c:34
static ULONG ConsoleListSize
Definition: console.c:33
static RTL_RESOURCE ListLock
Definition: console.c:36
smooth NULL
Definition: ftsmooth.c:416
void DPRINT(...)
Definition: polytest.cpp:61
NTSYSAPI VOID NTAPI RtlInitializeResource(_In_ PRTL_RESOURCE Resource)

Referenced by CSR_SERVER_DLL_INIT().

◆ ConSrvReleaseConsole()

VOID ConSrvReleaseConsole ( IN struct _CONSRV_CONSOLE Console,
IN BOOLEAN  IsConsoleLocked 
)

◆ ConSrvValidateConsole()

BOOLEAN NTAPI ConSrvValidateConsole ( OUT struct _CONSRV_CONSOLE **  Console,
IN HANDLE  ConsoleHandle,
IN CONSOLE_STATE  ExpectedState,
IN BOOLEAN  LockConsole 
)