Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. proc.h
  5. Abstract:
  6. Definitions for dumping information about processes using the NT API
  7. rather than the win32 API.
  8. Environment:
  9. User mode only
  10. Revision History:
  11. 03-26-96 : Created
  12. --*/
  13. #pragma warning(disable:4200) // array[0]
  14. #pragma warning(disable:4201) // nameless struct/unions
  15. #pragma warning(disable:4214) // bit fields other than int
  16. #ifdef DBG
  17. #define dbg(x) x
  18. #define HELP_ME() printf("Reached line %4d\n", __LINE__);
  19. #else
  20. #define dbg(x) /* x */
  21. #define HELP_ME() /* printf("Reached line %4d\n", __LINE__); */
  22. #endif
  23. #define ARGUMENT_USED(x) (x == NULL)
  24. #define TEST_FLAG(Flags, Bit) ((Flags) & (Bit))
  25. typedef struct {
  26. ULONG Flag;
  27. PUCHAR Name;
  28. } FLAG_NAME, *PFLAG_NAME;
  29. #define FLAG_NAME(flag) {flag, #flag}
  30. typedef struct _COMMAND COMMAND, *PCOMMAND;
  31. struct _COMMAND {
  32. char *Name;
  33. char *Description;
  34. char *ExtendedHelp;
  35. DWORD (*Function)(PCOMMAND CommandEntry, int argc, char *argv[]);
  36. };
  37. extern COMMAND CommandArray[];
  38. VOID
  39. GetAllProcessInfo(
  40. VOID
  41. );
  42. VOID
  43. PrintProcessInfo(
  44. DWORD_PTR ProcessId
  45. );
  46. DWORD
  47. QueryJobCommand(
  48. PCOMMAND commandEntry,
  49. int argc,
  50. char *argv[]
  51. );
  52. VOID
  53. xprintf(
  54. ULONG Depth,
  55. PTSTR Format,
  56. ...
  57. );
  58. VOID
  59. DumpFlags(
  60. ULONG Depth,
  61. PTSTR Name,
  62. ULONG Flags,
  63. PFLAG_NAME FlagTable
  64. );
  65. LPCTSTR
  66. TicksToString(
  67. LARGE_INTEGER TimeInTicks
  68. );