ReactOS  0.4.13-dev-100-gc8611ae
concmd.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Drivers
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * FILE: drivers/sac/driver/concmd.c
5  * PURPOSE: Driver for the Server Administration Console (SAC) for EMS
6  * PROGRAMMERS: ReactOS Portable Systems Group
7  */
8 
9 /* INCLUDES *******************************************************************/
10 
11 #include "sacdrv.h"
12 
13 #include <ndk/exfuncs.h>
14 
15 /* GLOBALS ********************************************************************/
16 
19 
20 /* FUNCTIONS ******************************************************************/
21 
24  VOID
25  )
26 {
28 }
29 
32  IN PCHAR Count
33  )
34 {
36 }
37 
40  IN ULONG ChannelIndex
41  )
42 {
44 }
45 
48  IN PCHAR Count
49  )
50 {
52 }
53 
56  IN ULONG ChannelIndex
57  )
58 {
60 }
61 
63 {
70  // SYSTEM_PAGEFILE_INFORMATION PageFileInfo;
71  // SYSTEM_PROCESS_INFORMATION ProcessInfo;
73 
75 NTAPI
77  IN ULONG InputSize,
78  OUT PULONG TotalSize)
79 {
81  ULONG BufferLength, ReturnLength, RemainingSize;
82  PSYSTEM_PAGEFILE_INFORMATION PageFileInfo;
83  PSYSTEM_PROCESS_INFORMATION ProcessInfo;
84  ULONG_PTR P;
85  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering.\n");
86 
87  /* Assume failure */
88  *TotalSize = 0;
89 
90  /* Bail out if the buffer is way too small */
91  if (InputSize < 4)
92  {
93  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, no memory.\n");
94  return STATUS_NO_MEMORY;
95  }
96 
97  /* Make sure it's at least big enough to hold the static structure */
98  BufferLength = InputSize - sizeof(SAC_SYSTEM_INFORMATION);
99  if (InputSize < sizeof(SAC_SYSTEM_INFORMATION))
100  {
101  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, no memory (2).\n");
102  return STATUS_NO_MEMORY;
103  }
104 
105  /* Query the time */
107  &SacInfo->TimeInfo,
108  sizeof(SacInfo->TimeInfo),
109  NULL);
110  if (!NT_SUCCESS(Status))
111  {
112  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, error.\n");
113  return Status;
114  }
115 
116  /* Query basic information */
118  &SacInfo->BasicInfo,
119  sizeof(SacInfo->BasicInfo),
120  NULL);
121  if (!NT_SUCCESS(Status))
122  {
123  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, error (2).\n");
124  return Status;
125  }
126 
127  /* Now query the pagefile information, which comes right after */
128  P = (ULONG_PTR)(SacInfo + 1);
129  PageFileInfo = (PSYSTEM_PAGEFILE_INFORMATION)P;
131  PageFileInfo,
132  BufferLength,
133  &ReturnLength);
134  if (!NT_SUCCESS(Status) || !(ReturnLength))
135  {
136  /* We failed -- is it because our buffer was too small? */
138  {
139  /* Bail out */
140  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, no memory(5).\n");
141  return STATUS_NO_MEMORY;
142  }
143 
144  /* Some other reason, assume the buffer is now full */
145  SacInfo->RemainingSize = 0;
146  }
147  else
148  {
149  /* This is the leftover data */
150  SacInfo->RemainingSize = InputSize - BufferLength;
151 
152  /* This much has now been consumed, and where we are now */
154  P += ReturnLength;
155 
156  /* Are we out of memory? */
157  if ((LONG)BufferLength < 0)
158  {
159  /* Bail out */
160  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, no memory(3).\n");
161  return STATUS_NO_MEMORY;
162  }
163 
164  /* All good, loop the pagefile data now */
165  while (TRUE)
166  {
167  /* Is the pagefile name too big to fit? */
168  if (PageFileInfo->PageFileName.Length > (LONG)BufferLength)
169  {
170  /* Bail out */
171  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, error(3).\n");
173  }
174 
175  /* Copy the name into our own buffer */
177  PageFileInfo->PageFileName.Buffer,
178  PageFileInfo->PageFileName.Length);
179  PageFileInfo->PageFileName.Buffer = (PWCHAR)P;
180 
181  /* Update buffer lengths and offset */
182  BufferLength -= PageFileInfo->PageFileName.Length;
183  P += PageFileInfo->PageFileName.Length;
184 
185  /* Are we out of memory? */
186  if ((LONG)BufferLength < 0)
187  {
188  /* Bail out */
189  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, no memory(4).\n");
190  return STATUS_NO_MEMORY;
191  }
192 
193  /* If this was the only pagefile, break out */
194  if (!PageFileInfo->NextEntryOffset) break;
195 
196  /* Otherwise, move to the next one */
197  PageFileInfo = (PVOID)((ULONG_PTR)PageFileInfo +
198  PageFileInfo->NextEntryOffset);
199  }
200  }
201 
202  /* Next, query the file cache information */
204  &SacInfo->CacheInfo,
205  sizeof(SacInfo->CacheInfo),
206  NULL);
207  if (!NT_SUCCESS(Status))
208  {
209  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, error (4).\n");
210  return Status;
211  }
212 
213  /* And then the performance information */
215  &SacInfo->PerfInfo,
216  sizeof(SacInfo->PerfInfo),
217  NULL);
218  if (!NT_SUCCESS(Status))
219  {
220  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, error(5).\n");
221  return Status;
222  }
223 
224  /* Finally, align the buffer to query process and thread information */
226  RemainingSize = (ULONG_PTR)SacInfo + InputSize - P;
227 
228  /* Are we out of memory? */
229  if ((LONG)RemainingSize < 0)
230  {
231  /* Bail out */
232  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, no memory (6).\n");
233  return STATUS_NO_MEMORY;
234  }
235 
236  /* Now query the processes and threads */
237  ProcessInfo = (PSYSTEM_PROCESS_INFORMATION)P;
239  ProcessInfo,
240  RemainingSize,
241  &ReturnLength);
242  if (!NT_SUCCESS(Status))
243  {
244  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, error(6).\n");
245  return Status;
246  }
247 
248  /* The first process name will be right after this buffer */
249  P += ReturnLength;
250 
251  /* The caller should look for process info over here */
252  SacInfo->ProcessDataOffset = InputSize - RemainingSize;
253 
254  /* This is how much buffer data we have left -- are we out? */
255  BufferLength = RemainingSize - ReturnLength;
256  if ((LONG)BufferLength < 0)
257  {
258  /* Bail out */
259  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, no memory(7).\n");
260  return STATUS_NO_MEMORY;
261  }
262 
263  /* All good and ready to parse the process and thread list */
264  while (TRUE)
265  {
266  /* Does the process have a name? */
267  if (ProcessInfo->ImageName.Buffer)
268  {
269  /* Is the process name too big to fit? */
270  if ((LONG)BufferLength < ProcessInfo->ImageName.Length)
271  {
272  /* Bail out */
273  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, error(7).\n");
275  }
276 
277  /* Copy the name into our own buffer */
279  ProcessInfo->ImageName.Buffer,
280  ProcessInfo->ImageName.Length);
281  ProcessInfo->ImageName.Buffer = (PWCHAR)P;
282 
283  /* Update buffer lengths and offset */
284  BufferLength -= ProcessInfo->ImageName.Length;
285  P += ProcessInfo->ImageName.Length;
286 
287  /* Are we out of memory? */
288  if ((LONG)BufferLength < 0)
289  {
290  /* Bail out */
291  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting, no memory(8).\n");
292  return STATUS_NO_MEMORY;
293  }
294  }
295 
296  /* If this was the only process, break out */
297  if (!ProcessInfo->NextEntryOffset) break;
298 
299  /* Otherwise, move to the next one */
300  ProcessInfo = (PVOID)((ULONG_PTR)ProcessInfo +
301  ProcessInfo->NextEntryOffset);
302  }
303 
304  /* All done! */
305  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Exiting.\n");
306  *TotalSize = InputSize - BufferLength;
307  return STATUS_SUCCESS;
308 }
309 
310 VOID
311 NTAPI
313 {
314  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Testing: %d %d %I64d\n",
315  SacInfo->BasicInfo.NumberOfPhysicalPages,
316  SacInfo->PerfInfo.AvailablePages,
317  SacInfo->TimeInfo.BootTime);
318 }
319 
320 VOID
321 NTAPI
322 PutMore(OUT PBOOLEAN ScreenFull)
323 {
324  *ScreenFull = FALSE;
325 }
326 
327 BOOLEAN
329  IN PWCHAR IpString,
330  OUT PULONG IpAddress
331  )
332 {
333  return FALSE;
334 }
335 
336 NTSTATUS
338  IN HANDLE DriverHandle,
340  IN HANDLE WaitEvent,
347  OUT PBOOLEAN MessagePrinted
348  )
349 {
350  return STATUS_NOT_IMPLEMENTED;
351 }
352 
353 VOID
354 NTAPI
356 {
357  LARGE_INTEGER Timeout, TickCount;
359  KEVENT Event;
360  SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoRebootCommand: Entering.\n");
361 
362  /* Get the current time now, and setup a timeout in 1 second */
363  KeQueryTickCount(&TickCount);
364  Timeout.QuadPart = TickCount.QuadPart / (10000000 / KeQueryTimeIncrement());
365 
366  /* Check if the timeout is small enough */
367  if (Timeout.QuadPart < 60 )
368  {
369  /* Show the prompt */
371  SAC_RESTART_PROMPT : SAC_SHUTDOWN_PROMPT,
372  TRUE);
373 
374  /* Do the wait */
376  Timeout.QuadPart = -10000000 * (60 - Timeout.LowPart);
378  }
379 
380  /* Do a shutdown or a reboot, based on the request */
382 
383  /* Check if anyone in the command channel already allocated this */
384  if (!GlobalBuffer)
385  {
386  /* Allocate it */
388  if (!GlobalBuffer)
389  {
390  /* We need the global buffer, bail out without it*/
391  SacPutSimpleMessage(SAC_OUT_OF_MEMORY_PROMPT);
392  SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoRebootCommand: Exiting (1).\n");
393  return;
394  }
395 
396  /* Set the size of the buffer */
398  }
399 
400  /* We came back from a reboot, this doesn't make sense, tell the user */
401  SacPutSimpleMessage(Reboot ? SAC_RESTART_FAIL_PROMPT : SAC_SHUTDOWN_FAIL_PROMPT);
402  swprintf(GlobalBuffer, GetMessage(SAC_FAIL_PROMPT), Status);
404  SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoRebootCommand: Exiting.\n");
405 }
406 
407 VOID
408 NTAPI
410 {
411  /* Flip the flag */
413 
414  /* Print out the new state */
416 }
417 
418 VOID
419 NTAPI
421 {
422  /* Flip the flag */
424 
425  /* Print out the new state */
427 }
428 
429 VOID
430 NTAPI
432 {
433  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
434 }
435 
436 VOID
437 NTAPI
438 DoKillCommand(IN PCHAR KillString)
439 {
440  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
441 }
442 
443 VOID
444 NTAPI
446 {
447  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
448 }
449 
450 VOID
451 NTAPI
453 {
454  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
455 }
456 
457 VOID
458 NTAPI
460 {
461  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
462 }
463 
464 VOID
465 NTAPI
467 {
468  SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoCrashCommand: Entering.\n");
469 
470  /* Crash the machine */
471  KeBugCheckEx(MANUALLY_INITIATED_CRASH, 0, 0, 0, 0);
472  __debugbreak();
473 }
474 
475 VOID
476 NTAPI
478 {
479  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
480 }
481 
482 VOID
483 NTAPI
484 DoChannelCommand(IN PCHAR ChannelString)
485 {
486  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
487 }
488 
489 VOID
490 NTAPI
491 DoCmdCommand(IN PCHAR InputString)
492 {
493  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
494 }
495 
496 VOID
497 NTAPI
499 {
500  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
501 }
502 
504 BOOLEAN
506  IN OUT PULONG Count)
507 {
508  BOOLEAN ScreenFull;
509  ULONG NewCount;
510 
511  /* Get the amount of lines this message will take */
512  NewCount = GetMessageLineCount(MessageId);
513  if ((NewCount + *Count) > SAC_VTUTF8_ROW_HEIGHT)
514  {
515  /* We are going to overflow the screen, wait for input */
516  PutMore(&ScreenFull);
517  if (ScreenFull) return FALSE;
518  *Count = 0;
519  }
520 
521  /* Print out the message and update the amount of lines printed */
522  SacPutSimpleMessage(MessageId);
523  *Count += NewCount;
524  return TRUE;
525 }
526 
527 VOID
528 NTAPI
530 {
531  ULONG Count = 0;
532 
533  /* Print out all the help messages */
534  if (!PrintHelpMessage(112, &Count)) return;
535  if (!PrintHelpMessage(12, &Count)) return;
536  if (!PrintHelpMessage(13, &Count)) return;
537  if (!PrintHelpMessage(14, &Count)) return;
538  if (!PrintHelpMessage(15, &Count)) return;
539  if (!PrintHelpMessage(16, &Count)) return;
540  if (!PrintHelpMessage(31, &Count)) return;
541  if (!PrintHelpMessage(18, &Count)) return;
542  if (!PrintHelpMessage(19, &Count)) return;
543  if (!PrintHelpMessage(32, &Count)) return;
544  if (!PrintHelpMessage(20, &Count)) return;
545  if (!PrintHelpMessage(21, &Count)) return;
546  if (!PrintHelpMessage(22, &Count)) return;
547  if (!PrintHelpMessage(23, &Count)) return;
548  if (!PrintHelpMessage(24, &Count)) return;
549  if (!PrintHelpMessage(25, &Count)) return;
550  if (!PrintHelpMessage(27, &Count)) return;
551  if (!PrintHelpMessage(28, &Count)) return;
552  if (!PrintHelpMessage(29, &Count)) return;
553 }
554 
555 VOID
556 NTAPI
558 {
559  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
560 }
561 
562 VOID
563 NTAPI
565 {
566  SAC_DBG(SAC_DBG_ENTRY_EXIT, "Entering\n");
567 }
568 
569 VOID
570 NTAPI
572 {
574  PVOID NewGlobalBuffer;
575  ULONG Size;
576  SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Entering.\n");
577 
578  /* Check if a global buffer already exists */
579  if (!GlobalBuffer)
580  {
581  /* It doesn't, allocate one */
583  if (GlobalBuffer)
584  {
585  /* Remember its current size */
586  GlobalBufferSize = 4096;
587  }
588  else
589  {
590  /* Out of memory, bail out */
592  SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n");
593  return;
594  }
595  }
596 
597  /* Loop as long as the buffer is too small */
598  while (TRUE)
599  {
600  /* Get the process list */
602  if ((Status != STATUS_NO_MEMORY) &&
604  {
605  /* It fits! Bail out */
606  break;
607  }
608 
609  /* We need a new bigger buffer */
610  NewGlobalBuffer = SacAllocatePool(GlobalBufferSize + 4096,
612  if (!NewGlobalBuffer)
613  {
614  /* Out of memory, bail out */
616  SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n");
617  return;
618  }
619 
620  /* Free the old one, update state */
622  GlobalBufferSize += 4096;
623  GlobalBuffer = NewGlobalBuffer;
624  }
625 
626  /* Did we get here because we have the whole list? */
627  if (!NT_SUCCESS(Status))
628  {
629  /* Nope, print out a failure message */
633  }
634  else
635  {
636  /* Yep, print out the list */
638  }
639 
640  SAC_DBG(SAC_DBG_ENTRY_EXIT, "SAC DoTlistCommand: Exiting.\n");
641 }
BOOLEAN GlobalDoThreads
Definition: conmgr.c:35
signed char * PCHAR
Definition: retypes.h:7
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
Definition: dumpinfo.c:39
VOID NTAPI DoMachineInformationCommand(VOID)
Definition: concmd.c:477
#define IN
Definition: typedefs.h:38
struct _SAC_SYSTEM_INFORMATION SAC_SYSTEM_INFORMATION
#define TRUE
Definition: types.h:120
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
NTSTATUS DoChannelCloseByIndexCommand(IN ULONG ChannelIndex)
Definition: concmd.c:39
SYSTEM_PERFORMANCE_INFORMATION PerfInfo
Definition: concmd.c:67
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
#define ALIGN_UP(size, type)
Definition: umtypes.h:91
VOID NTAPI DoFullInfoCommand(VOID)
Definition: concmd.c:409
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
SYSTEM_FILECACHE_INFORMATION CacheInfo
Definition: concmd.c:66
VOID NTAPI DoCmdCommand(IN PCHAR InputString)
Definition: concmd.c:491
BOOLEAN GlobalPagingNeeded
Definition: conmgr.c:35
NTSTATUS DoChannelSwitchByNameCommand(IN PCHAR Count)
Definition: concmd.c:47
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI DoSetTimeCommand(IN PCHAR InputTime)
Definition: concmd.c:431
ULONG GlobalBufferSize
Definition: concmd.c:18
ULONG NTAPI KeQueryTimeIncrement(VOID)
Definition: clock.c:153
SYSTEM_TIMEOFDAY_INFORMATION TimeInfo
Definition: concmd.c:65
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG _In_ ULONG OutputBufferLength
Definition: fltkernel.h:1374
#define SAC_VTUTF8_ROW_HEIGHT
Definition: sacdrv.h:158
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
VOID NTAPI DoPagingCommand(VOID)
Definition: concmd.c:420
char DoPrint
Definition: rsym64.c:9
uint16_t * PWCHAR
Definition: typedefs.h:54
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
Definition: wait.c:416
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
BOOLEAN RetrieveIpAddressFromString(IN PWCHAR IpString, OUT PULONG IpAddress)
Definition: concmd.c:328
CHAR InputBuffer[80]
Definition: conmgr.c:33
VOID NTAPI DoHelpCommand(VOID)
Definition: concmd.c:529
#define GLOBAL_BLOCK_TAG
Definition: sacdrv.h:141
uint32_t ULONG_PTR
Definition: typedefs.h:63
VOID NTAPI DoCrashCommand(VOID)
Definition: concmd.c:466
struct _SYSTEM_PAGEFILE_INFORMATION * PSYSTEM_PAGEFILE_INFORMATION
static void PrintMessage(UINT msg,...)
Definition: vfdcmd.c:3340
UNICODE_STRING PageFileName
Definition: extypes.h:1063
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
NTSTATUS DoChannelListCommand(VOID)
Definition: concmd.c:23
long LONG
Definition: pedump.c:60
_In_ ULONG BufferLength
Definition: usbdlib.h:225
ULONG NTAPI GetMessageLineCount(IN ULONG MessageIndex)
Definition: util.c:1230
_In_ PVOID _In_ ULONG Event
Definition: iotypes.h:434
NTSYSAPI NTSTATUS NTAPI ZwQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
Definition: bl.h:892
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
#define FORCEINLINE
Definition: ntbasedef.h:221
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
#define SystemPerformanceInformation
Definition: memtest.h:87
#define SacAllocatePool(Length, Tag)
Definition: sacdrv.h:24
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
void * PVOID
Definition: retypes.h:9
VOID NTAPI KeQueryTickCount(IN PLARGE_INTEGER TickCount)
Definition: clock.c:165
PVOID GlobalBuffer
Definition: concmd.c:17
VOID NTAPI SacPutString(IN PWCHAR String)
Definition: conmgr.c:41
struct _SAC_SYSTEM_INFORMATION * PSAC_SYSTEM_INFORMATION
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
VOID NTAPI PrintTListInfo(IN PSAC_SYSTEM_INFORMATION SacInfo)
Definition: concmd.c:312
VOID NTAPI DoLowerPriorityCommand(IN PCHAR PrioString)
Definition: concmd.c:445
#define swprintf(buf, format,...)
Definition: sprintf.c:56
#define SacFreePool(Pointer)
Definition: sacdrv.h:26
VOID NTAPI DoRaisePriorityCommand(IN PCHAR PrioString)
Definition: concmd.c:452
UNICODE_STRING ImageName
Definition: extypes.h:890
NTSTATUS DoChannelSwitchByIndexCommand(IN ULONG ChannelIndex)
Definition: concmd.c:55
static const char * ImageName
Definition: image.c:34
char * PBOOLEAN
Definition: retypes.h:11
#define SAC_DBG(x,...)
Definition: sacdrv.h:37
NTSTATUS NTAPI NtShutdownSystem(IN SHUTDOWN_ACTION Action)
Definition: shutdown.c:43
VOID NTAPI DoChannelCommand(IN PCHAR ChannelString)
Definition: concmd.c:484
#define PAGE_SIZE
Definition: env_spec_w32.h:49
NTSTATUS DoChannelCloseByNameCommand(IN PCHAR Count)
Definition: concmd.c:31
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ ULONG InputBufferLength
Definition: fltkernel.h:1372
#define P(row, col)
NTSTATUS NTAPI GetTListInfo(IN PSAC_SYSTEM_INFORMATION SacInfo, IN ULONG InputSize, OUT PULONG TotalSize)
Definition: concmd.c:76
VOID NTAPI DoLockCommand(VOID)
Definition: concmd.c:498
Status
Definition: gdiplustypes.h:24
struct _SYSTEM_PROCESS_INFORMATION * PSYSTEM_PROCESS_INFORMATION
SYSTEM_BASIC_INFORMATION BasicInfo
Definition: concmd.c:64
BOOLEAN NTAPI SacPutSimpleMessage(IN ULONG MessageIndex)
Definition: conmgr.c:57
static ULONG Timeout
Definition: ping.c:61
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define STATUS_NO_MEMORY
Definition: ntstatus.h:246
#define SystemBasicInformation
Definition: xboxvmp.h:35
VOID NTAPI DoSetIpAddressCommand(IN PCHAR IpString)
Definition: concmd.c:564
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
unsigned int * PULONG
Definition: retypes.h:1
VOID NTAPI DoKillCommand(IN PCHAR KillString)
Definition: concmd.c:438
#define GetMessage
Definition: winuser.h:5656
BOOLEAN NTAPI ConMgrSimpleEventMessage(IN ULONG MessageIndex, IN BOOLEAN LockHeld)
Definition: conmgr.c:252
VOID NTAPI DoRebootCommand(IN BOOLEAN Reboot)
Definition: concmd.c:355
VOID NTAPI DoTlistCommand(VOID)
Definition: concmd.c:571
#define OUT
Definition: typedefs.h:39
FORCEINLINE BOOLEAN PrintHelpMessage(IN ULONG MessageId, IN OUT PULONG Count)
Definition: concmd.c:505
unsigned int ULONG
Definition: retypes.h:1
#define SAC_DBG_ENTRY_EXIT
Definition: sacdrv.h:32
#define ULONG_PTR
Definition: config.h:101
VOID NTAPI DoGetNetInfo(IN BOOLEAN DoPrint)
Definition: concmd.c:557
VOID NTAPI PutMore(OUT PBOOLEAN ScreenFull)
Definition: concmd.c:322
VOID NTAPI DoLimitMemoryCommand(IN PCHAR LimitString)
Definition: concmd.c:459
return STATUS_SUCCESS
Definition: btrfs.c:2725
NTSTATUS CallQueryIPIOCTL(IN HANDLE DriverHandle, IN PVOID DriverObject, IN HANDLE WaitEvent, IN PIO_STATUS_BLOCK IoStatusBlock, IN PVOID InputBuffer, IN ULONG InputBufferLength, IN PVOID OutputBuffer, IN ULONG OutputBufferLength, IN BOOLEAN PrintMessage, OUT PBOOLEAN MessagePrinted)
Definition: concmd.c:337
VOID NTAPI KeBugCheckEx(_In_ ULONG BugCheckCode, _In_ ULONG_PTR BugCheckParameter1, _In_ ULONG_PTR BugCheckParameter2, _In_ ULONG_PTR BugCheckParameter3, _In_ ULONG_PTR BugCheckParameter4)
Definition: rtlcompat.c:107
LONGLONG QuadPart
Definition: typedefs.h:112