ReactOS  0.4.15-dev-488-gc7a1924
frontendctl.c File Reference
#include "consrv.h"
#include <debug.h>
Include dependency graph for frontendctl.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

 CON_API (SrvGetConsoleHardwareState, CONSOLE_GETSETHWSTATE, HardwareStateRequest)
 
 CON_API (SrvSetConsoleHardwareState, CONSOLE_GETSETHWSTATE, HardwareStateRequest)
 
 CON_API (SrvGetConsoleDisplayMode, CONSOLE_GETDISPLAYMODE, GetDisplayModeRequest)
 
 CON_API (SrvSetConsoleDisplayMode, CONSOLE_SETDISPLAYMODE, SetDisplayModeRequest)
 
 CON_API (SrvGetLargestConsoleWindowSize, CONSOLE_GETLARGESTWINDOWSIZE, GetLargestWindowSizeRequest)
 
 CON_API (SrvShowConsoleCursor, CONSOLE_SHOWCURSOR, ShowCursorRequest)
 
 CON_API (SrvSetConsoleCursor, CONSOLE_SETCURSOR, SetCursorRequest)
 
 CON_API (SrvConsoleMenuControl, CONSOLE_MENUCONTROL, MenuControlRequest)
 
 CON_API (SrvSetConsoleMenuClose, CONSOLE_SETMENUCLOSE, SetMenuCloseRequest)
 
NTSTATUS NTAPI GetThreadConsoleDesktop (IN ULONG_PTR ThreadId, OUT HDESK *ConsoleDesktop)
 
 CON_API (SrvGetConsoleWindow, CONSOLE_GETWINDOW, GetWindowRequest)
 
 CON_API (SrvSetConsoleIcon, CONSOLE_SETICON, SetIconRequest)
 
 CON_API (SrvGetConsoleSelectionInfo, CONSOLE_GETSELECTIONINFO, GetSelectionInfoRequest)
 
 CON_API (SrvGetConsoleNumberOfFonts, CONSOLE_GETNUMFONTS, GetNumFontsRequest)
 
 CON_API (SrvGetConsoleFontInfo, CONSOLE_GETFONTINFO, GetFontInfoRequest)
 
 CON_API (SrvGetConsoleFontSize, CONSOLE_GETFONTSIZE, GetFontSizeRequest)
 
 CON_API (SrvGetConsoleCurrentFont, CONSOLE_GETCURRENTFONT, GetCurrentFontRequest)
 
 CON_API (SrvSetConsoleFont, CONSOLE_SETFONT, SetFontRequest)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file frontendctl.c.

Function Documentation

◆ CON_API() [1/17]

CON_API ( SrvGetConsoleHardwareState  ,
CONSOLE_GETSETHWSTATE  ,
HardwareStateRequest   
)

Definition at line 56 of file frontendctl.c.

58 {
59 #if 0
62 
63  Status = ConSrvGetTextModeBuffer(ProcessData,
64  HardwareStateRequest->OutputHandle,
65  &Buff,
67  TRUE);
68  if (!NT_SUCCESS(Status))
69  return Status;
70 
72 
73  HardwareStateRequest->State = Console->HardwareState;
74 
76  return STATUS_SUCCESS;
77 #else
80 #endif
81 }
#define TRUE
Definition: types.h:120
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
#define ConSrvGetTextModeBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:12
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define GENERIC_READ
Definition: compat.h:124
Status
Definition: gdiplustypes.h:24
CConsole Console
#define UNIMPLEMENTED
Definition: debug.h:115
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [2/17]

CON_API ( SrvSetConsoleHardwareState  ,
CONSOLE_GETSETHWSTATE  ,
HardwareStateRequest   
)

Definition at line 84 of file frontendctl.c.

86 {
87 #if 0
90 
91  Status = ConSrvGetTextModeBuffer(ProcessData,
92  HardwareStateRequest->OutputHandle,
93  &Buff,
95  TRUE);
96  if (!NT_SUCCESS(Status))
97  return Status;
98 
100 
101  DPRINT("Setting console hardware state.\n");
102  Status = SetConsoleHardwareState(Console, HardwareStateRequest->State);
103 
105  return STATUS_SUCCESS;
106 #else
108  return STATUS_NOT_IMPLEMENTED;
109 #endif
110 }
#define TRUE
Definition: types.h:120
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
#define GENERIC_WRITE
Definition: nt_native.h:90
BOOL WINAPI SetConsoleHardwareState(HANDLE hConsoleOutput, DWORD Flags, DWORD State)
Definition: console.c:944
void DPRINT(...)
Definition: polytest.cpp:61
#define ConSrvGetTextModeBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:12
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Status
Definition: gdiplustypes.h:24
CConsole Console
#define UNIMPLEMENTED
Definition: debug.h:115
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [3/17]

CON_API ( SrvGetConsoleDisplayMode  ,
CONSOLE_GETDISPLAYMODE  ,
GetDisplayModeRequest   
)

Definition at line 113 of file frontendctl.c.

115 {
116  GetDisplayModeRequest->DisplayMode = TermGetDisplayMode(Console);
117  return STATUS_SUCCESS;
118 }
CConsole Console
#define TermGetDisplayMode(Console)
Definition: term.h:56
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [4/17]

CON_API ( SrvSetConsoleDisplayMode  ,
CONSOLE_SETDISPLAYMODE  ,
SetDisplayModeRequest   
)

Definition at line 121 of file frontendctl.c.

123 {
126 
127  Status = ConSrvGetScreenBuffer(ProcessData,
128  SetDisplayModeRequest->OutputHandle,
129  &Buff,
131  TRUE);
132  if (!NT_SUCCESS(Status))
133  return Status;
134 
135  ASSERT((PCONSOLE)Console == Buff->Header.Console);
136 
137  if (TermSetDisplayMode(Console, SetDisplayModeRequest->DisplayMode))
138  {
139  SetDisplayModeRequest->NewSBDim = Buff->ScreenBufferSize;
141  }
142  else
143  {
145  }
146 
148  return Status;
149 }
#define TRUE
Definition: types.h:120
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define TermSetDisplayMode(Console, NewMode)
Definition: term.h:58
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
COORD ScreenBufferSize
Definition: conio.h:62
#define GENERIC_WRITE
Definition: nt_native.h:90
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
#define ConSrvGetScreenBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:26
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Status
Definition: gdiplustypes.h:24
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [5/17]

CON_API ( SrvGetLargestConsoleWindowSize  ,
CONSOLE_GETLARGESTWINDOWSIZE  ,
GetLargestWindowSizeRequest   
)

Definition at line 152 of file frontendctl.c.

154 {
157 
158  Status = ConSrvGetTextModeBuffer(ProcessData,
159  GetLargestWindowSizeRequest->OutputHandle,
160  &Buff,
161  GENERIC_READ,
162  TRUE);
163  if (!NT_SUCCESS(Status))
164  return Status;
165 
166  ASSERT((PCONSOLE)Console == Buff->Header.Console);
167 
168  /*
169  * Retrieve the largest possible console window size, without
170  * taking into account the size of the console screen buffer
171  * (thus differs from ConDrvGetConsoleScreenBufferInfo).
172  */
173  TermGetLargestConsoleWindowSize(Console, &GetLargestWindowSizeRequest->Size);
174 
176  return STATUS_SUCCESS;
177 }
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
#define ConSrvGetTextModeBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:12
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define TermGetLargestConsoleWindowSize(Console, pSize)
Definition: term.h:34
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define GENERIC_READ
Definition: compat.h:124
Status
Definition: gdiplustypes.h:24
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [6/17]

CON_API ( SrvShowConsoleCursor  ,
CONSOLE_SHOWCURSOR  ,
ShowCursorRequest   
)

Definition at line 180 of file frontendctl.c.

182 {
185 
186  Status = ConSrvGetScreenBuffer(ProcessData,
187  ShowCursorRequest->OutputHandle,
188  &Buff,
190  TRUE);
191  if (!NT_SUCCESS(Status))
192  return Status;
193 
194  ASSERT((PCONSOLE)Console == Buff->Header.Console);
195 
196  ShowCursorRequest->RefCount = TermShowMouseCursor(Console, ShowCursorRequest->Show);
197 
199  return STATUS_SUCCESS;
200 }
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
#define GENERIC_WRITE
Definition: nt_native.h:90
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define TermShowMouseCursor(Console, Show)
Definition: term.h:38
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
#define ConSrvGetScreenBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:26
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Status
Definition: gdiplustypes.h:24
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [7/17]

CON_API ( SrvSetConsoleCursor  ,
CONSOLE_SETCURSOR  ,
SetCursorRequest   
)

Definition at line 203 of file frontendctl.c.

205 {
207  BOOL Success;
209 
210  // NOTE: Tests show that this function is used only for graphics screen buffers
211  // and otherwise it returns FALSE and sets last error to ERROR_INVALID_HANDLE.
212  // I find that behaviour is ridiculous but ok, let's accept it at the moment...
213  Status = ConSrvGetGraphicsBuffer(ProcessData,
214  SetCursorRequest->OutputHandle,
215  &Buff,
217  TRUE);
218  if (!NT_SUCCESS(Status))
219  return Status;
220 
221  ASSERT((PCONSOLE)Console == Buff->Header.Console);
222 
223  Success = TermSetMouseCursor(Console, SetCursorRequest->CursorHandle);
224 
227 }
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
unsigned int BOOL
Definition: ntddk_ex.h:94
#define GENERIC_WRITE
Definition: nt_native.h:90
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
Status
Definition: gdiplustypes.h:24
#define ConSrvGetGraphicsBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:19
#define TermSetMouseCursor(Console, CursorHandle)
Definition: term.h:60
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [8/17]

CON_API ( SrvConsoleMenuControl  ,
CONSOLE_MENUCONTROL  ,
MenuControlRequest   
)

Definition at line 230 of file frontendctl.c.

232 {
235 
236  Status = ConSrvGetScreenBuffer(ProcessData,
237  MenuControlRequest->OutputHandle,
238  &Buff,
240  TRUE);
241  if (!NT_SUCCESS(Status))
242  return Status;
243 
244  ASSERT((PCONSOLE)Console == Buff->Header.Console);
245 
246  MenuControlRequest->MenuHandle = TermMenuControl(Console,
247  MenuControlRequest->CmdIdLow,
248  MenuControlRequest->CmdIdHigh);
249 
251  return STATUS_SUCCESS;
252 }
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
#define GENERIC_WRITE
Definition: nt_native.h:90
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
#define ConSrvGetScreenBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:26
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Status
Definition: gdiplustypes.h:24
#define TermMenuControl(Console, CmdIdLow, CmdIdHigh)
Definition: term.h:62
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [9/17]

CON_API ( SrvSetConsoleMenuClose  ,
CONSOLE_SETMENUCLOSE  ,
SetMenuCloseRequest   
)

Definition at line 255 of file frontendctl.c.

257 {
258  return (TermSetMenuClose(Console, SetMenuCloseRequest->Enable)
260 }
#define TermSetMenuClose(Console, Enable)
Definition: term.h:64
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [10/17]

CON_API ( SrvGetConsoleWindow  ,
CONSOLE_GETWINDOW  ,
GetWindowRequest   
)

Definition at line 299 of file frontendctl.c.

301 {
302  GetWindowRequest->WindowHandle = TermGetConsoleWindowHandle(Console);
303  return STATUS_SUCCESS;
304 }
#define TermGetConsoleWindowHandle(Console)
Definition: term.h:52
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [11/17]

CON_API ( SrvSetConsoleIcon  ,
CONSOLE_SETICON  ,
SetIconRequest   
)

Definition at line 307 of file frontendctl.c.

309 {
310  return (TermChangeIcon(Console, SetIconRequest->IconHandle)
312 }
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define TermChangeIcon(Console, IconHandle)
Definition: term.h:48

◆ CON_API() [12/17]

CON_API ( SrvGetConsoleSelectionInfo  ,
CONSOLE_GETSELECTIONINFO  ,
GetSelectionInfoRequest   
)

Definition at line 315 of file frontendctl.c.

317 {
318  return (TermGetSelectionInfo(Console, &GetSelectionInfoRequest->Info)
320 }
#define TermGetSelectionInfo(Console, pSelectionInfo)
Definition: term.h:54
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014

◆ CON_API() [13/17]

CON_API ( SrvGetConsoleNumberOfFonts  ,
CONSOLE_GETNUMFONTS  ,
GetNumFontsRequest   
)

Definition at line 323 of file frontendctl.c.

325 {
326  // FIXME!
327  // TermGetNumberOfFonts(Console, ...);
328  DPRINT1("%s not yet implemented\n", __FUNCTION__);
329  GetNumFontsRequest->NumFonts = 0;
330  return STATUS_SUCCESS;
331 }
#define DPRINT1
Definition: precomp.h:8
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define __FUNCTION__
Definition: types.h:112

◆ CON_API() [14/17]

CON_API ( SrvGetConsoleFontInfo  ,
CONSOLE_GETFONTINFO  ,
GetFontInfoRequest   
)

Definition at line 334 of file frontendctl.c.

336 {
339 
340  Status = ConSrvGetTextModeBuffer(ProcessData,
341  GetFontInfoRequest->OutputHandle,
342  &Buff,
343  GENERIC_READ,
344  TRUE);
345  if (!NT_SUCCESS(Status))
346  return Status;
347 
348  ASSERT((PCONSOLE)Console == Buff->Header.Console);
349 
350  // FIXME!
351  // TermGetFontInfo(Console, ...);
352  DPRINT1("%s not yet implemented\n", __FUNCTION__);
353  GetFontInfoRequest->NumFonts = 0;
354 
356  return STATUS_SUCCESS;
357 }
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
#define ConSrvGetTextModeBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:12
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define GENERIC_READ
Definition: compat.h:124
Status
Definition: gdiplustypes.h:24
CConsole Console
#define DPRINT1
Definition: precomp.h:8
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define __FUNCTION__
Definition: types.h:112

◆ CON_API() [15/17]

CON_API ( SrvGetConsoleFontSize  ,
CONSOLE_GETFONTSIZE  ,
GetFontSizeRequest   
)

Definition at line 360 of file frontendctl.c.

362 {
365 
366  Status = ConSrvGetTextModeBuffer(ProcessData,
367  GetFontSizeRequest->OutputHandle,
368  &Buff,
369  GENERIC_READ,
370  TRUE);
371  if (!NT_SUCCESS(Status))
372  return Status;
373 
374  ASSERT((PCONSOLE)Console == Buff->Header.Console);
375 
376  // FIXME!
377  // TermGetFontSize(Console, ...);
378  DPRINT1("%s not yet implemented\n", __FUNCTION__);
379 
381  return STATUS_SUCCESS;
382 }
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
#define ConSrvGetTextModeBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:12
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define GENERIC_READ
Definition: compat.h:124
Status
Definition: gdiplustypes.h:24
CConsole Console
#define DPRINT1
Definition: precomp.h:8
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define __FUNCTION__
Definition: types.h:112

◆ CON_API() [16/17]

CON_API ( SrvGetConsoleCurrentFont  ,
CONSOLE_GETCURRENTFONT  ,
GetCurrentFontRequest   
)

Definition at line 385 of file frontendctl.c.

387 {
390 
391  Status = ConSrvGetTextModeBuffer(ProcessData,
392  GetCurrentFontRequest->OutputHandle,
393  &Buff,
394  GENERIC_READ,
395  TRUE);
396  if (!NT_SUCCESS(Status))
397  return Status;
398 
399  ASSERT((PCONSOLE)Console == Buff->Header.Console);
400 
401  // FIXME!
402  // TermGetCurrentFont(Console, ...);
403  DPRINT1("%s not yet implemented\n", __FUNCTION__);
404  GetCurrentFontRequest->FontIndex = 0;
405 
407  return STATUS_SUCCESS;
408 }
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
#define ConSrvGetTextModeBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:12
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define GENERIC_READ
Definition: compat.h:124
Status
Definition: gdiplustypes.h:24
CConsole Console
#define DPRINT1
Definition: precomp.h:8
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define __FUNCTION__
Definition: types.h:112

◆ CON_API() [17/17]

CON_API ( SrvSetConsoleFont  ,
CONSOLE_SETFONT  ,
SetFontRequest   
)

Definition at line 411 of file frontendctl.c.

413 {
416 
417  Status = ConSrvGetTextModeBuffer(ProcessData,
418  SetFontRequest->OutputHandle,
419  &Buff,
421  TRUE);
422  if (!NT_SUCCESS(Status))
423  return Status;
424 
425  ASSERT((PCONSOLE)Console == Buff->Header.Console);
426 
427  // FIXME!
428  // TermSetFont(Console, ...);
429  DPRINT1("%s not yet implemented\n", __FUNCTION__);
430 
432  return STATUS_SUCCESS;
433 }
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
CONSOLE_IO_OBJECT Header
Definition: conio.h:58
struct _CONSOLE * Console
Definition: conio.h:36
#define GENERIC_WRITE
Definition: nt_native.h:90
#define ConSrvGetTextModeBuffer(ProcessData, Handle, Ptr, Access, LockConsole)
Definition: conoutput.h:12
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConSrvReleaseScreenBuffer(Buff, IsConsoleLocked)
Definition: conoutput.h:33
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Status
Definition: gdiplustypes.h:24
CConsole Console
#define DPRINT1
Definition: precomp.h:8
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define __FUNCTION__
Definition: types.h:112

◆ GetThreadConsoleDesktop()

NTSTATUS NTAPI GetThreadConsoleDesktop ( IN ULONG_PTR  ThreadId,
OUT HDESK *  ConsoleDesktop 
)

Definition at line 265 of file frontendctl.c.

268 {
270  PCSR_THREAD CsrThread;
272 
273  /* No console desktop handle by default */
274  *ConsoleDesktop = NULL;
275 
276  /* Retrieve and lock the thread */
277  Status = CsrLockThreadByClientId(ULongToHandle(ThreadId), &CsrThread);
278  if (!NT_SUCCESS(Status))
279  return Status;
280 
281  ASSERT(CsrThread->Process);
282 
283  /* Retrieve the console to which the process is attached, and unlock the thread */
285  &Console, TRUE);
286  CsrUnlockThread(CsrThread);
287 
288  if (!NT_SUCCESS(Status))
289  return Status;
290 
291  /* Retrieve the console desktop handle, and release the console */
292  *ConsoleDesktop = TermGetThreadConsoleDesktop(Console);
294 
295  return STATUS_SUCCESS;
296 }
#define ULongToHandle(h)
Definition: basetsd.h:81
NTSTATUS ConSrvGetConsole(IN PCONSOLE_PROCESS_DATA ProcessData, OUT PCONSRV_CONSOLE *Console, IN BOOLEAN LockConsole)
Definition: console.c:291
#define TRUE
Definition: types.h:120
LONG NTSTATUS
Definition: precomp.h:26
VOID ConSrvReleaseConsole(IN PCONSRV_CONSOLE Console, IN BOOLEAN IsConsoleLocked)
Definition: console.c:316
PCSR_PROCESS Process
Definition: csrsrv.h:69
smooth NULL
Definition: ftsmooth.c:416
NTSTATUS NTAPI CsrUnlockThread(IN PCSR_THREAD CsrThread)
Definition: thredsup.c:1074
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define ConsoleGetPerProcessData(Process)
Definition: consrv.h:37
NTSTATUS NTAPI CsrLockThreadByClientId(IN HANDLE Tid, OUT PCSR_THREAD *CsrThread)
Definition: thredsup.c:964
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Status
Definition: gdiplustypes.h:24
#define TermGetThreadConsoleDesktop(Console)
Definition: term.h:50
CConsole Console
return STATUS_SUCCESS
Definition: btrfs.c:3014

Referenced by CSR_API().