home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / sdktools / tlist / common.h < prev    next >
Text File  |  1996-10-08  |  2KB  |  83 lines

  1.  
  2. /******************************************************************************\
  3. *       This is a part of the Microsoft Source Code Samples. 
  4. *          Copyright (C) 1994-1996 Microsoft Corporation.
  5. *       All rights reserved. 
  6. *       This source code is only intended as a supplement to 
  7. *       Microsoft Development Tools and/or WinHelp documentation.
  8. *       See these sources for detailed information regarding the 
  9. *       Microsoft samples programs.
  10. \******************************************************************************/
  11.  
  12. #define TITLE_SIZE          64
  13. #define PROCESS_SIZE        MAX_PATH
  14.  
  15.  
  16. //
  17. // task list structure
  18. //
  19. typedef struct _TASK_LIST {
  20.     DWORD       dwProcessId;
  21.     DWORD       dwInheritedFromProcessId;
  22.     BOOL        flags;
  23.     HANDLE      hwnd;
  24.     CHAR        ProcessName[PROCESS_SIZE];
  25.     CHAR        WindowTitle[TITLE_SIZE];
  26. } TASK_LIST, *PTASK_LIST;
  27.  
  28. typedef struct _TASK_LIST_ENUM {
  29.     PTASK_LIST  tlist;
  30.     DWORD       numtasks;
  31. } TASK_LIST_ENUM, *PTASK_LIST_ENUM;
  32.  
  33.  
  34. //
  35. // Function pointer types for accessing platform-specific functions
  36. //
  37. typedef DWORD (*LPGetTaskList)(PTASK_LIST, DWORD);
  38. typedef BOOL  (*LPEnableDebugPriv)(VOID);
  39.  
  40.  
  41. //
  42. // Function prototypes
  43. //
  44. DWORD
  45. GetTaskList95(
  46.     PTASK_LIST  pTask,
  47.     DWORD       dwNumTasks
  48.     );
  49.  
  50. DWORD
  51. GetTaskListNT(
  52.     PTASK_LIST  pTask,
  53.     DWORD       dwNumTasks
  54.     );
  55.  
  56.  
  57. BOOL
  58. EnableDebugPriv95(
  59.     VOID
  60.     );
  61.  
  62. BOOL
  63. EnableDebugPrivNT(
  64.     VOID
  65.     );
  66.  
  67. BOOL
  68. KillProcess(
  69.     PTASK_LIST tlist,
  70.     BOOL       fForce
  71.     );
  72.  
  73. VOID
  74. GetWindowTitles(
  75.     PTASK_LIST_ENUM te
  76.     );
  77.  
  78. BOOL
  79. MatchPattern(
  80.     PUCHAR String,
  81.     PUCHAR Pattern
  82.     );
  83.