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.

976 lines
37 KiB

  1. /*======================================================================================//
  2. | Process Control //
  3. | //
  4. |Copyright (c) 1998 Sequent Computer Systems, Incorporated. All rights reserved. //
  5. | //
  6. |File Name: BaseNode.h //
  7. | //
  8. |Description: Class definitions for all container nodes //
  9. | //
  10. |Created: Paul Skoglund 07-1998 //
  11. | //
  12. |Rev History: //
  13. | //
  14. |=======================================================================================*/
  15. #ifndef _CLASS_BASENODE_
  16. #define _CLASS_BASENODE_
  17. #include "resource.h"
  18. #include "HelpTopics.h"
  19. #include "DataObj.h"
  20. #pragma warning(push)
  21. #include <string>
  22. #pragma warning(pop)
  23. #pragma warning(push)
  24. #pragma warning(4 : 4284)
  25. #include <list>
  26. #pragma warning(pop)
  27. using std::basic_string;
  28. using std::list;
  29. typedef basic_string<TCHAR> tstring;
  30. typedef struct _CONTEXTMENUITEMBYID
  31. {
  32. int strNameID;
  33. int strStatusBarTextID;
  34. LONG lCommandID;
  35. LONG lInsertionPointID;
  36. } CONTEXTMENUITEMBYID;
  37. typedef enum tagNODETYPE {
  38. UNINIZALIZED_NODE = 0x00L,
  39. ROOT_NODE = 0x01L,
  40. MANAGEMENTRULE_NODE = 0x02L,
  41. NAMERULE_NODE = 0x04L,
  42. PROCESSRULE_NODE = 0x08L,
  43. JOBRULE_NODE = 0x10L,
  44. PROCESS_NODE = 0x20L,
  45. JOB_NODE = 0x40L,
  46. JOBITEM_NODE = 0x80L,
  47. } NODETYPE;
  48. typedef enum _PC_VIEW_UPDATE_HINT
  49. {
  50. PC_VIEW_UPDATEALL = 0x1, // cache has been invalidated
  51. PC_VIEW_SETITEM = 0x2, // cache is valid, set single item
  52. PC_VIEW_UPDATEITEM = 0x4, // cache is valid, update single item
  53. PC_VIEW_ADDITEM = 0x8, // cache is valid, add single item
  54. PC_VIEW_DELETEITEM = 0x10, // cache is valid, remove single item
  55. PC_VIEW_REDRAWALL = 0x11, // cache is valid, redraw all items
  56. } PC_VIEW_UPDATE_HINT;
  57. const int PROCESS_ALIAS_COLUMN_WIDTH = 140;
  58. const int DESCRIPTION_COLUMN_WIDTH = 200;
  59. const int MATCH_COLUMN_WIDTH = 200;
  60. const int TYPE_COLUMN_WIDTH = 110;
  61. const int NAME_COLUMN_WIDTH = 225;
  62. const int APPLY_JOB_COLUMN_WIDTH = 155;
  63. const int JOB_COLUMN_WIDTH = 140;
  64. const int APPLY_AFFINITY_COLUMN_WIDTH = 95;
  65. const int AFFINITY_COLUMN_WIDTH = 130;
  66. const int APPLY_PRIORITY_COLUMN_WIDTH = 100;
  67. const int PRIORITY_COLUMN_WIDTH = 95;
  68. const int APPLY_SCHEDULING_CLASS_COLUMN_WIDTH = 150;
  69. const int SCHEDULING_CLASS_COLUMN_WIDTH = 120;
  70. const int IMAGE_NAME_COLUMN_WIDTH = 120;
  71. const int PID_COLUMN_WIDTH = 50;
  72. const int ACTIVE_PROCESS_COUNT_COLUMN_WIDTH = 115;
  73. const int STATUS_COLUMN_WIDTH = 65;
  74. const int JOB_OWNER_COLUMN_WIDTH = 105;
  75. const int APPLY_MINMAXWS_COLUMN_WIDTH = 100;
  76. const int MINWS_COLUMN_WIDTH = 115;
  77. const int MAXWS_COLUMN_WIDTH = 115;
  78. const int APPLY_PROC_CMEM_LIMIT_COLUMN_WIDTH = 200;
  79. const int PROC_CMEM_LIMIT_COLUMN_WIDTH = 195;
  80. const int APPLY_JOB_CMEM_LIMIT_COLUMN_WIDTH = 195;
  81. const int JOB_CMEM_LIMIT_COLUMN_WIDTH = 185;
  82. const int APPLY_PROCCOUNT_LIMIT_COLUMN_WIDTH = 160;
  83. const int PROCCOUNT_LIMIT_COLUMN_WIDTH = 120;
  84. const int APPLY_PROC_CPUTIME_LIMIT_COLUMN_WIDTH=170;
  85. const int PROC_CPUTIME_LIMIT_COLUMN_WIDTH = 150;
  86. const int APPLY_JOB_CPUTIME_LIMIT_COLUMN_WIDTH= 150;
  87. const int JOB_CPUTIME_LIMIT_COLUMN_WIDTH = 150;
  88. const int ACTION_JOB_CPUTIME_LIMIT_COLUMN_WIDTH=165;
  89. const int ENDJOB_ON_NO_PROC_COLUMN_WIDTH = 180;
  90. const int DIE_ON_UNHANDLED_EXCEPT_COLUMN_WIDTH= 150;
  91. const int ALLOW_BREAKAWAY_COLUMN_WIDTH = 150;
  92. const int ALLOW_SILENT_BREAKAWAY_COLUMN_WIDTH = 165;
  93. const int USER_TIME_COLUMN_WIDTH = 105;
  94. const int KERNEL_TIME_COLUMN_WIDTH = 105;
  95. const int CREATE_TIME_COLUMN_WIDTH = 130;
  96. const int PERIOD_USER_TIME_COLUMN_WIDTH = 130;
  97. const int PERIOD_KERNEL_TIME_COLUMN_WIDTH = 140;
  98. const int PAGE_FAULT_COUNT_COLUMN_WIDTH = 100;
  99. const int PROCESS_COUNT_COLUMN_WIDTH = 110;
  100. const int TERMINATED_PROCESS_COUNT_COLUMN_WIDTH=140;
  101. const int READOP_COUNT_COLUMN_WIDTH = 120;
  102. const int WRITEOP_COUNT_COLUMN_WIDTH = 120;
  103. const int OTHEROP_COUNT_COLUMN_WIDTH = 120;
  104. const int READTRANS_COUNT_COLUMN_WIDTH = 140;
  105. const int WRITETRANS_COUNT_COLUMN_WIDTH = 140;
  106. const int OTHERTRANS_COUNT_COLUMN_WIDTH = 140;
  107. const int PEAK_PROC_MEM_COLUMN_WIDTH = 160;
  108. const int PEAK_JOB_MEM_COLUMN_WIDTH = 150;
  109. // Scope node image numbers
  110. const int PROCCON_SNAPIN_IMAGE = 0;
  111. const int PROCCON_SNAPIN_OPENIMAGE = 0;
  112. const int RULES_IMAGE = 1;
  113. const int RULES_OPENIMAGE = 1;
  114. const int ALIASRULES_IMAGE = 2;
  115. const int ALIASRULES_OPENIMAGE = 2;
  116. const int PROCRULES_IMAGE = 3;
  117. const int PROCRULES_OPENIMAGE = 3;
  118. const int JOBRULES_IMAGE = 4;
  119. const int JOBRULES_OPENIMAGE = 4;
  120. const int PROCESSES_IMAGE = 5;
  121. const int PROCESSES_OPENIMAGE = 5;
  122. const int JOBS_IMAGE = 6;
  123. const int JOBS_OPENIMAGE = 6;
  124. const int ITEMIMAGE_ERROR = 11;
  125. const int EMPTY_IMAGE = 12;
  126. const int PROCESSRULEITEMIMAGE = PROCRULES_IMAGE;
  127. const int JOBRULEITEMIMAGE = JOBRULES_IMAGE;
  128. const int PROCITEMIMAGE = 7;
  129. const int PROCITEMIMAGE_NODEFINITION = EMPTY_IMAGE; // 8;
  130. const int JOBITEMIMAGE = 9;
  131. const int JOBITEMIMAGE_NODEFINITION = 10;
  132. const int JOBIMAGE_NODEFINITION = 10;
  133. const int FOLDER = 13;
  134. const int OPEN_FOLDER = 14;
  135. HRESULT InsertProcessHeaders(IHeaderCtrl2* ipHeaderCtrl);
  136. HRESULT PCProcListGetDisplayInfo(RESULTDATAITEM &ResultItem, const PCProcListItem &ref, ITEM_STR &StorageStr);
  137. class CBaseNode
  138. {
  139. private:
  140. CBaseNode();
  141. public:
  142. CBaseNode(NODETYPE nNodeType, CBaseNode *pParent = NULL ) :
  143. m_NodeType(nNodeType), m_pParent(pParent), nUpdateCtr(0), m_refcount(1)
  144. {
  145. }
  146. virtual ~CBaseNode() { ATLTRACE(_T("~CBaseNode\n"));}
  147. void AddRef()
  148. {
  149. ++m_refcount;
  150. }
  151. void Release()
  152. {
  153. if (--m_refcount == 0)
  154. delete this;
  155. }
  156. virtual LPCTSTR GetNodeName() = 0;
  157. virtual HRESULT GetDisplayInfo(RESULTDATAITEM &ResultItem) = 0;
  158. virtual const GUID *GetGUIDptr() = 0;
  159. virtual const TCHAR *GetGUIDsz() = 0;
  160. virtual BOOL IsPersisted() = 0; // support for CCF_SNODEID, and CCF_SNODEID2 formats
  161. virtual BOOL GetPreload() { return FALSE; } // support for CCF_SNAPIN_PRELOADS format
  162. virtual const int sImage() = 0;
  163. virtual const int sOpenImage() = 0;
  164. virtual void SetID(HSCOPEITEM ID) = 0;
  165. virtual HSCOPEITEM GetID() = 0;
  166. virtual int GetChildrenCount() { return 0; }
  167. virtual CBaseNode* GetParentNode() { return m_pParent; }
  168. virtual const TCHAR *GetWindowTitle() // support for CCF_WINDOW_TITLE format
  169. {
  170. if ( !GetParentNode() )
  171. {
  172. ASSERT(FALSE); // the parent node must override this function and provide the handle!
  173. return _T("");
  174. }
  175. CBaseNode *pParent = GetParentNode();
  176. while (pParent->GetParentNode())
  177. pParent = pParent->GetParentNode();
  178. return pParent->GetNodeName();
  179. }
  180. virtual void GetComputerConnectionInfo(COMPUTER_CONNECTION_INFO &out)
  181. {
  182. if ( !GetParentNode() )
  183. {
  184. out.bLocalComputer = FALSE;
  185. memcpy(out.RemoteComputer, 0, sizeof(out.RemoteComputer));
  186. ASSERT(FALSE); // the parent node must override this function and provide the handle!
  187. return;
  188. }
  189. CBaseNode *pParent = GetParentNode();
  190. while (pParent->GetParentNode())
  191. pParent = pParent->GetParentNode();
  192. pParent->GetComputerConnectionInfo(out);
  193. }
  194. virtual const PCid GetPCid()
  195. {
  196. if ( !GetParentNode() )
  197. {
  198. ASSERT(FALSE); // the parent node must override this function and provide the handle!
  199. return NULL;
  200. }
  201. CBaseNode *pParent = GetParentNode();
  202. while (pParent->GetParentNode())
  203. pParent = pParent->GetParentNode();
  204. return pParent->GetPCid();
  205. }
  206. virtual BOOL ReportPCError(PCULONG32 nLastError)
  207. {
  208. if ( !GetParentNode() )
  209. {
  210. ASSERT(FALSE); // the parent node must override this function and provide the handle!
  211. return FALSE;
  212. }
  213. CBaseNode *pParent = GetParentNode();
  214. while (pParent->GetParentNode())
  215. pParent = pParent->GetParentNode();
  216. return pParent->ReportPCError(nLastError);
  217. }
  218. virtual BOOL ReportPCError()
  219. {
  220. if ( !GetParentNode() )
  221. {
  222. ASSERT(FALSE); // the parent node must override this function and provide the handle!
  223. return FALSE;
  224. }
  225. CBaseNode *pParent = GetParentNode();
  226. while (pParent->GetParentNode())
  227. pParent = pParent->GetParentNode();
  228. return pParent->ReportPCError();
  229. }
  230. virtual PCULONG32 GetLastPCError()
  231. {
  232. if ( !GetParentNode() )
  233. {
  234. ASSERT(FALSE); // the parent node must override this function and provide the handle!
  235. return FALSE;
  236. }
  237. CBaseNode *pParent = GetParentNode();
  238. while (pParent->GetParentNode())
  239. pParent = pParent->GetParentNode();
  240. return pParent->GetLastPCError();
  241. }
  242. //IComponentData::Notify
  243. virtual HRESULT OnExpand(BOOL bExpand, HSCOPEITEM hItem, IConsoleNameSpace2 *ipConsoleNameSpace2) { return S_OK; } // return value not used
  244. virtual HRESULT OnRename(LPOLESTR pszNewName) { return S_FALSE; } // rename not allowed
  245. virtual HRESULT OnRemoveChildren(HSCOPEITEM hID) { return S_OK; } // return value not used
  246. //IComponent::Notify
  247. virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2* ipHeaderCtrl, IConsole2 *ipConsole2) { ASSERT(hItem == GetID()); return S_OK; } // return value used
  248. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb) { return S_OK; } // return value not used
  249. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb, LPARAM Cookie) { return S_OK; } // return value not used
  250. virtual HRESULT OnDelete (IConsole2 *ipConsole2, LPARAM Cookie) { return S_FALSE; } // return value not used
  251. virtual HRESULT OnDblClick(IConsole2 *ipConsole2, LPARAM Cookie) { return S_FALSE; } // return S_FALSE to get default verb
  252. virtual HRESULT OnHelpCmd(IDisplayHelp *ipDisplayHelp) { return S_FALSE; } // return value not used
  253. virtual HRESULT OnRefresh(IConsole2 *ipConsole2) { return S_FALSE; } // return value not used
  254. virtual HRESULT OnViewChange(IResultData *ipResultData, LPARAM data, LONG_PTR hint) { return S_OK; }
  255. #ifdef USE_IRESULTDATACOMPARE
  256. //IResultDataCompare
  257. virtual HRESULT ResultDataCompare(LPARAM lUserParam, MMC_COOKIE cookieA, MMC_COOKIE cookieB, int * pnResult ) { return E_UNEXPECTED; }
  258. #endif
  259. //IExtendContextMenu::Command
  260. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed) { return S_OK; }
  261. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed, LPARAM Cookie) { return S_OK; }
  262. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID) { return E_UNEXPECTED; }
  263. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID, LPARAM Cookie) { return E_UNEXPECTED; }
  264. //IExtendPropertySheet2
  265. virtual HRESULT OnCreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle, DATA_OBJECT_TYPES context) { return S_FALSE; }
  266. virtual HRESULT OnCreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle, DATA_OBJECT_TYPES context, LPARAM Cookie) { return S_FALSE; }
  267. virtual HRESULT QueryPagesFor() { return S_FALSE; }
  268. virtual HRESULT QueryPagesFor(LPARAM Cookie) { return S_FALSE; }
  269. // GetWatermarks handled at "global" level in CComponent, CComponentData
  270. virtual HRESULT SendViewChange(IConsole2 *ipConsole2, LPARAM ResultCookie, PC_VIEW_UPDATE_HINT hint)
  271. {
  272. ASSERT(ipConsole2);
  273. if (!ipConsole2)
  274. return E_UNEXPECTED;
  275. ASSERT( ((hint == PC_VIEW_UPDATEALL || hint == PC_VIEW_REDRAWALL) && !ResultCookie) ||
  276. ((hint != PC_VIEW_UPDATEALL && hint != PC_VIEW_REDRAWALL) && ResultCookie) );
  277. LPDATAOBJECT ipDataObject = NULL;
  278. CComObject<CDataObject>* pDataObj;
  279. CComObject<CDataObject>::CreateInstance( &pDataObj );
  280. if( ! pDataObj ) // DataObject was not created
  281. {
  282. ASSERT(pDataObj);
  283. return E_OUTOFMEMORY;
  284. }
  285. pDataObj->SetDataObject( CCT_RESULT, this );
  286. HRESULT hr = pDataObj->QueryInterface( IID_IDataObject, (void **)&ipDataObject);
  287. if (hr == S_OK)
  288. hr = ipConsole2->UpdateAllViews(ipDataObject, ResultCookie, hint);
  289. ipDataObject->Release();
  290. ASSERT(hr == S_OK);
  291. return hr;
  292. }
  293. virtual HRESULT OnPropertyChange(PROPERTY_CHANGE_HDR *pUpdate, IConsole2 *ipConsole2)
  294. {
  295. ATLTRACE(_T("Unhandled OnPropertyChange for %s.\n"), GetNodeName());
  296. return E_UNEXPECTED;
  297. }
  298. virtual const NODETYPE GetNodeType() { return m_NodeType; } // should try and remove the need for this...
  299. private:
  300. NODETYPE m_NodeType; // Describes the node type
  301. CBaseNode *m_pParent;
  302. int m_refcount;
  303. protected:
  304. PCINT32 nUpdateCtr;
  305. }; // end class CBaseNode
  306. class CRootFolder : public CBaseNode
  307. {
  308. public:
  309. CRootFolder();
  310. virtual ~CRootFolder();
  311. private:
  312. static const GUID m_GUID;
  313. static const TCHAR *const m_szGUID;
  314. public:
  315. virtual LPCTSTR GetNodeName();
  316. virtual HRESULT GetDisplayInfo(RESULTDATAITEM &ResultItem);
  317. virtual const GUID *GetGUIDptr() { return &m_GUID; }
  318. virtual const TCHAR *GetGUIDsz() { return m_szGUID; }
  319. virtual BOOL IsPersisted() { return TRUE; }
  320. virtual const int sImage() { return PROCCON_SNAPIN_IMAGE; }
  321. virtual const int sOpenImage() { return PROCCON_SNAPIN_IMAGE; }
  322. virtual void SetID(HSCOPEITEM ID) { m_ID = ID; }
  323. virtual HSCOPEITEM GetID() { return m_ID; }
  324. virtual int GetChildrenCount() { return 3; }
  325. virtual const PCid GetPCid();
  326. virtual BOOL ReportPCError();
  327. virtual BOOL ReportPCError(PCULONG32 nLastError);
  328. virtual PCULONG32 GetLastPCError();
  329. virtual HRESULT OnParentExpand(BOOL bExpand, HSCOPEITEM hItem, IConsoleNameSpace2 *ipConsoleNameSpace2);
  330. virtual HRESULT OnExpand(BOOL bExpand, HSCOPEITEM hItem, IConsoleNameSpace2 *ipConsoleNameSpace2 );
  331. virtual HRESULT OnParentRemoveChildren(HSCOPEITEM hID);
  332. virtual HRESULT OnRemoveChildren(HSCOPEITEM hID);
  333. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed);
  334. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID);
  335. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID, LPARAM Cookie);
  336. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb);
  337. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb, LPARAM Cookie);
  338. virtual HRESULT OnHelpCmd(IDisplayHelp *ipDisplayHelp);
  339. virtual HRESULT OnCreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle, DATA_OBJECT_TYPES context);
  340. virtual HRESULT QueryPagesFor();
  341. virtual HRESULT OnPropertyChange(PROPERTY_CHANGE_HDR *pUpdate, IConsole2 *ipConsole2);
  342. void Config(BOOL bUseLocal, TCHAR Computer[SNAPIN_MAX_COMPUTERNAME_LENGTH + 1]);
  343. void SetConsoleInterface(LPCONSOLE ipConsole2) { m_ipConsole2 = ipConsole2; }
  344. private:
  345. HSCOPEITEM m_ID;
  346. HSCOPEITEM m_ParentID; // when the snapin is an extension, we have a parent in the scope pane
  347. list<CBaseNode *> m_NodeList;
  348. ITEM_STR m_name;
  349. tstring m_machinedisplayname;
  350. tstring m_longname; // Node's display name including computer context...
  351. //ITEM_STR m_TypeDescriptionStr;
  352. ITEM_STR m_DescriptionStr;
  353. BOOL m_bUseLocalComputer;
  354. TCHAR m_Computer[SNAPIN_MAX_COMPUTERNAME_LENGTH + 1];
  355. BOOL m_bDirty;
  356. PCid m_hPC; // handle to service
  357. PCULONG32 m_PCLastError;
  358. LPCONSOLE m_ipConsole2;
  359. static const CONTEXTMENUITEMBYID TaskMenuItems[];
  360. private:
  361. HRESULT AddNodes(IConsoleNameSpace2 *ipConsoleNameSpace2);
  362. HRESULT AddNode (IConsoleNameSpace2 *ipConsoleNameSpace2, CBaseNode *pSubNode);
  363. void FreeNodes();
  364. LPCTSTR GetComputerDisplayName() const;
  365. HRESULT OnChangeComputerConnection();
  366. public:
  367. LPCTSTR GetComputerName() const;
  368. void SetComputerName(TCHAR Computer[SNAPIN_MAX_COMPUTERNAME_LENGTH + 1]);
  369. virtual void GetComputerConnectionInfo(COMPUTER_CONNECTION_INFO &out);
  370. // IStream implementation
  371. HRESULT IsDirty() const;
  372. HRESULT Load(IStream *pStm);
  373. HRESULT Save(IStream *pStm, BOOL fClearDirty);
  374. HRESULT GetSizeMax(ULARGE_INTEGER *pcbSize);
  375. }; // end class CRootFolder
  376. class CRuleFolder : public CBaseNode
  377. {
  378. public:
  379. CRuleFolder(CBaseNode *pParent);
  380. virtual ~CRuleFolder();
  381. private:
  382. static const GUID m_GUID;
  383. static const TCHAR *const m_szGUID;
  384. public:
  385. virtual LPCTSTR GetNodeName();
  386. virtual HRESULT GetDisplayInfo(RESULTDATAITEM &ResultItem);
  387. virtual const GUID *GetGUIDptr() { return &m_GUID; }
  388. virtual const TCHAR *GetGUIDsz() { return m_szGUID; }
  389. virtual BOOL IsPersisted() { return TRUE; }
  390. virtual const int sImage() { return RULES_IMAGE; }
  391. virtual const int sOpenImage() { return RULES_OPENIMAGE; }
  392. virtual void SetID(HSCOPEITEM ID) { m_ID = ID; }
  393. virtual HSCOPEITEM GetID() { return m_ID; }
  394. virtual int GetChildrenCount() { return 3; } //$$ determine dynamically...although really only zero/non-zero critical
  395. virtual HRESULT OnExpand(BOOL bExpand, HSCOPEITEM hItem, IConsoleNameSpace2 *ipConsoleNameSpace2);
  396. virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2* ipHeaderCtrl, IConsole2* ipConsole2);
  397. virtual HRESULT OnViewChange(IResultData *ipResultData, LPARAM thing, LONG_PTR hint);
  398. virtual HRESULT ShowAllItems(IResultData* ipResultData, BOOL bCacheValid);
  399. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb);
  400. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb, LPARAM Cookie);
  401. virtual HRESULT OnHelpCmd(IDisplayHelp *ipDisplayHelp);
  402. private:
  403. HSCOPEITEM m_ID;
  404. list<CBaseNode *> m_NodeList;
  405. ITEM_STR m_name; // Node's display name
  406. enum {
  407. NAME_COLUMN,
  408. };
  409. HRESULT AddNode (IConsoleNameSpace2 *ipConsoleNameSpace2, CBaseNode *pSubNode);
  410. void FreeNodes();
  411. }; // end class CRuleFolder
  412. class CNameRuleFolder : public CBaseNode
  413. {
  414. public:
  415. CNameRuleFolder(CBaseNode *pParent);
  416. virtual ~CNameRuleFolder();
  417. private:
  418. static const GUID m_GUID;
  419. static const TCHAR *const m_szGUID;
  420. public:
  421. virtual LPCTSTR GetNodeName();
  422. virtual HRESULT GetDisplayInfo(RESULTDATAITEM &ResultItem);
  423. virtual const GUID *GetGUIDptr() { return &m_GUID; }
  424. virtual const TCHAR *GetGUIDsz() { return m_szGUID; }
  425. virtual BOOL IsPersisted() { return TRUE; }
  426. virtual const int sImage() { return ALIASRULES_IMAGE; }
  427. virtual const int sOpenImage() { return ALIASRULES_OPENIMAGE; }
  428. virtual void SetID(HSCOPEITEM ID) { m_ID = ID; }
  429. virtual HSCOPEITEM GetID() { return m_ID; }
  430. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed);
  431. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed, LPARAM Cookie);
  432. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID);
  433. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID, LPARAM Cookie);
  434. virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2* ipHeaderCtrl, IConsole2* ipConsole2);
  435. virtual HRESULT OnDelete (IConsole2 *ipConsole2, LPARAM Cookie);
  436. virtual HRESULT OnDblClick(IConsole2 *ipConsole2, LPARAM Cookie);
  437. virtual HRESULT OnRefresh (IConsole2 *ipConsole2);
  438. virtual HRESULT OnViewChange(IResultData *ipResultData, LPARAM data, LONG_PTR hint);
  439. virtual HRESULT ShowAllItems(IResultData* ipResultData, BOOL bCacheValid);
  440. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb);
  441. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb, LPARAM Cookie);
  442. virtual HRESULT OnHelpCmd(IDisplayHelp *ipDisplayHelp);
  443. private:
  444. HSCOPEITEM m_ID;
  445. ITEM_STR m_name;
  446. ITEM_STR m_ResultStr;
  447. enum {
  448. PROCESS_ALIAS_COLUMN,
  449. DESCRIPTION_COLUMN,
  450. MATCH_COLUMN,
  451. TYPE_COLUMN
  452. };
  453. list<PCNameRule *> Cache;
  454. list<PCNameRule *> MemBlocks;
  455. static const CONTEXTMENUITEMBYID ResultsTopMenuItems[];
  456. BOOL OnInsertNameRule(IConsole2 *ipConsole2, PCNameRule *InsertPoint);
  457. HRESULT OnEdit(IConsole2 *ipConsole2,PCNameRule *InsertPoint, INT32 index, BOOL bReadOnly);
  458. void ClearCache();
  459. BOOL RefreshCache();
  460. }; // end class CNameRuleFolder
  461. class CProcessRuleFolder : public CBaseNode
  462. {
  463. public:
  464. CProcessRuleFolder(CBaseNode *pParent);
  465. virtual ~CProcessRuleFolder();
  466. private:
  467. static const GUID m_GUID;
  468. static const TCHAR *const m_szGUID;
  469. public:
  470. virtual LPCTSTR GetNodeName();
  471. virtual HRESULT GetDisplayInfo(RESULTDATAITEM &ResultItem);
  472. virtual const GUID *GetGUIDptr() { return &m_GUID; }
  473. virtual const TCHAR *GetGUIDsz() { return m_szGUID; }
  474. virtual BOOL IsPersisted() { return TRUE; }
  475. virtual const int sImage() { return PROCRULES_IMAGE; }
  476. virtual const int sOpenImage() { return PROCRULES_OPENIMAGE; }
  477. virtual void SetID(HSCOPEITEM ID) { m_ID = ID; }
  478. virtual HSCOPEITEM GetID() { return m_ID; }
  479. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed);
  480. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID);
  481. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID, LPARAM Cookie);
  482. virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2 *ipHeaderCtrl, IConsole2 *ipConsole2);
  483. virtual HRESULT OnDelete (IConsole2 *ipConsole2, LPARAM Cookie);
  484. virtual HRESULT OnRefresh(IConsole2 *ipConsole2);
  485. virtual HRESULT OnViewChange(IResultData *ipResultData, LPARAM data, LONG_PTR hint);
  486. virtual HRESULT ShowAllItems(IResultData* ipResultData, BOOL bCacheValid);
  487. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb);
  488. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb, LPARAM Cookie);
  489. virtual HRESULT OnHelpCmd(IDisplayHelp *ipDisplayHelp);
  490. virtual HRESULT OnCreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle, DATA_OBJECT_TYPES context, LPARAM Cookie);
  491. virtual HRESULT QueryPagesFor(LPARAM Cookie);
  492. virtual HRESULT OnPropertyChange(PROPERTY_CHANGE_HDR *pUpdate, IConsole2 *ipConsole2);
  493. private:
  494. HSCOPEITEM m_ID;
  495. ITEM_STR m_name; // Node's display name
  496. ITEM_STR m_ResultStr;
  497. enum {
  498. PROCESS_ALIAS_COLUMN,
  499. DESCRIPTION_COLUMN,
  500. APPLY_JOB_COLUMN,
  501. JOB_COLUMN,
  502. APPLY_AFFINITY_COLUMN,
  503. AFFINITY_COLUMN,
  504. APPLY_PRIORITY_COLUMN,
  505. PRIORITY_COLUMN,
  506. APPLY_MINMAXWS_COLUMN,
  507. MINWS_COLUMN,
  508. MAXWS_COLUMN,
  509. };
  510. list<PCProcSummary *> Cache;
  511. list<PCProcSummary *> MemBlocks;
  512. static const CONTEXTMENUITEMBYID TopMenuItems[];
  513. static const CONTEXTMENUITEMBYID NewMenuItems[];
  514. void ClearCache();
  515. BOOL RefreshCache();
  516. }; // end class CProcessRuleFolder
  517. class CJobRuleFolder : public CBaseNode
  518. {
  519. public:
  520. CJobRuleFolder(CBaseNode *pParent);
  521. virtual ~CJobRuleFolder();
  522. private:
  523. static const GUID m_GUID;
  524. static const TCHAR *const m_szGUID;
  525. public:
  526. virtual LPCTSTR GetNodeName();
  527. virtual HRESULT GetDisplayInfo(RESULTDATAITEM &ResultItem);
  528. virtual const GUID *GetGUIDptr() { return &m_GUID; }
  529. virtual const TCHAR *GetGUIDsz() { return m_szGUID; }
  530. virtual BOOL IsPersisted() { return TRUE; }
  531. virtual const int sImage() { return JOBRULES_IMAGE; }
  532. virtual const int sOpenImage() { return JOBRULES_OPENIMAGE; }
  533. virtual void SetID(HSCOPEITEM ID) { m_ID = ID; }
  534. virtual HSCOPEITEM GetID() { return m_ID; }
  535. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed);
  536. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID);
  537. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID, LPARAM Cookie);
  538. virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2* ipHeaderCtrl, IConsole2 *ipConsole2);
  539. virtual HRESULT OnDelete (IConsole2 *ipConsole2, LPARAM Cookie);
  540. virtual HRESULT OnRefresh(IConsole2 *ipConsole2);
  541. virtual HRESULT OnViewChange(IResultData *ipResultData, LPARAM data, LONG_PTR hint);
  542. virtual HRESULT ShowAllItems(IResultData* ipResultData, BOOL bCacheValid);
  543. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb);
  544. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb, LPARAM Cookie);
  545. virtual HRESULT OnHelpCmd(IDisplayHelp *ipDisplayHelp);
  546. virtual HRESULT OnCreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle, DATA_OBJECT_TYPES context, LPARAM Cookie);
  547. virtual HRESULT QueryPagesFor(LPARAM Cookie);
  548. virtual HRESULT OnPropertyChange(PROPERTY_CHANGE_HDR *pUpdate, IConsole2 *ipConsole2);
  549. private:
  550. HSCOPEITEM m_ID;
  551. ITEM_STR m_name; // Node's display name
  552. ITEM_STR m_ResultStr;
  553. enum {
  554. JOB_COLUMN,
  555. DESCRIPTION_COLUMN,
  556. APPLY_AFFINITY_COLUMN,
  557. AFFINITY_COLUMN,
  558. APPLY_PRIORITY_COLUMN,
  559. PRIORITY_COLUMN,
  560. APPLY_SCHEDULING_CLASS_COLUMN,
  561. SCHEDULING_CLASS_COLUMN,
  562. APPLY_MINMAXWS_COLUMN,
  563. MINWS_COLUMN,
  564. MAXWS_COLUMN,
  565. APPLY_PROC_CMEM_LIMIT_COLUMN,
  566. PROC_CMEM_LIMIT_COLUMN,
  567. APPLY_JOB_CMEM_LIMIT_COLUMN,
  568. JOB_CMEM_LIMIT_COLUMN,
  569. APPLY_PROCCOUNT_LIMIT_COLUMN,
  570. PROCCOUNT_LIMIT_COLUMN,
  571. APPLY_PROC_CPUTIME_LIMIT_COLUMN,
  572. PROC_CPUTIME_LIMIT_COLUMN,
  573. APPLY_JOB_CPUTIME_LIMIT_COLUMN,
  574. JOB_CPUTIME_LIMIT_COLUMN,
  575. ACTION_JOB_CPUTIME_LIMIT_COLUMN,
  576. ENDJOB_ON_NO_PROC_COLUMN,
  577. DIE_ON_UNHANDLED_EXCEPT_COLUMN,
  578. ALLOW_BREAKAWAY_COLUMN,
  579. ALLOW_SILENT_BREAKAWAY_COLUMN
  580. };
  581. list<PCJobSummary *> Cache;
  582. list<PCJobSummary *> MemBlocks;
  583. static const CONTEXTMENUITEMBYID TopMenuItems[];
  584. static const CONTEXTMENUITEMBYID NewMenuItems[];
  585. void ClearCache();
  586. BOOL RefreshCache();
  587. }; // end class CJobRuleFolder
  588. class CProcessFolder : public CBaseNode
  589. {
  590. public:
  591. CProcessFolder(CBaseNode *pParent);
  592. virtual ~CProcessFolder();
  593. private:
  594. static const GUID m_GUID;
  595. static const TCHAR *const m_szGUID;
  596. public:
  597. virtual LPCTSTR GetNodeName();
  598. virtual HRESULT GetDisplayInfo(RESULTDATAITEM &ResultItem);
  599. virtual const GUID *GetGUIDptr() { return &m_GUID; }
  600. virtual const TCHAR *GetGUIDsz() { return m_szGUID; }
  601. virtual BOOL IsPersisted() { return TRUE; }
  602. virtual const int sImage() { return PROCESSES_IMAGE; }
  603. virtual const int sOpenImage() { return PROCESSES_OPENIMAGE; }
  604. virtual void SetID(HSCOPEITEM ID) { m_ID = ID; }
  605. virtual HSCOPEITEM GetID() { return m_ID; }
  606. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed);
  607. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed, LPARAM Cookie);
  608. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID);
  609. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID, LPARAM Cookie);
  610. virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2* ipHeaderCtrl, IConsole2 *ipConsole2);
  611. virtual HRESULT OnRefresh(IConsole2 *ipConsole2);
  612. virtual HRESULT OnViewChange(IResultData *ipResultData, LPARAM data, LONG_PTR hint);
  613. virtual HRESULT ShowAllItems(IResultData* ipResultData, BOOL bCacheValid);
  614. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb);
  615. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb, LPARAM Cookie);
  616. virtual HRESULT OnHelpCmd(IDisplayHelp *ipDisplayHelp);
  617. virtual HRESULT OnCreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle, DATA_OBJECT_TYPES context, LPARAM Cookie);
  618. virtual HRESULT QueryPagesFor(LPARAM Cookie);
  619. virtual HRESULT OnPropertyChange(PROPERTY_CHANGE_HDR *pUpdate, IConsole2 *ipConsole2);
  620. private:
  621. HSCOPEITEM m_ID;
  622. ITEM_STR m_name; // Node's display name
  623. ITEM_STR m_ResultStr;
  624. LONG m_fViewOption;
  625. public:
  626. enum {
  627. PROCESS_ALIAS_COLUMN,
  628. IMAGE_NAME_COLUMN,
  629. PID_COLUMN,
  630. STATUS_COLUMN,
  631. AFFINITY_COLUMN,
  632. PRIORITY_COLUMN,
  633. JOB_OWNER_COLUMN,
  634. USER_TIME_COLUMN,
  635. KERNEL_TIME_COLUMN,
  636. CREATE_TIME_COLUMN
  637. };
  638. private:
  639. list<PCProcListItem *> Cache;
  640. list<PCProcListItem *> MemBlocks;
  641. static const CONTEXTMENUITEMBYID ResultsTopMenuItems[];
  642. static const CONTEXTMENUITEMBYID ViewMenuItems[];
  643. void ClearCache();
  644. BOOL RefreshCache();
  645. }; // end class CProcessFolder
  646. class CJobFolder : public CBaseNode
  647. {
  648. public:
  649. CJobFolder(CBaseNode *pParent);
  650. virtual ~CJobFolder();
  651. private:
  652. static const GUID m_GUID;
  653. static const TCHAR *const m_szGUID;
  654. public:
  655. virtual LPCTSTR GetNodeName();
  656. virtual HRESULT GetDisplayInfo(RESULTDATAITEM &ResultItem);
  657. virtual const GUID *GetGUIDptr() { return &m_GUID; }
  658. virtual const TCHAR *GetGUIDsz() { return m_szGUID; }
  659. virtual BOOL IsPersisted() { return TRUE; }
  660. virtual const int sImage() { return JOBS_IMAGE; }
  661. virtual const int sOpenImage() { return JOBS_OPENIMAGE; }
  662. virtual void SetID(HSCOPEITEM ID) { m_ID = ID; }
  663. virtual HSCOPEITEM GetID() { return m_ID; }
  664. virtual int GetChildrenCount() { return 1; } //$$ determine dynamically...although really only zero/non-zero critical
  665. virtual HRESULT OnExpand(BOOL bExpand, HSCOPEITEM hItem, IConsoleNameSpace2 *ipConsoleNameSpace2);
  666. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed);
  667. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed, LPARAM Cookie);
  668. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, IConsoleNameSpace2 *ipConsoleNameSpace2, long nCommandID);
  669. //virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID);
  670. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID, LPARAM Cookie);
  671. //virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2* ipHeaderCtrl, IConsole2 *ipConsole2);
  672. virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2* ipHeaderCtrl, IConsole2 *ipConsole2, IConsoleNameSpace2 *ipConsoleNameSpace2);
  673. //virtual HRESULT OnRefresh(IConsole2 *ipConsole2);
  674. virtual HRESULT OnRefresh(IConsole2 *ipConsole2, IConsoleNameSpace2 *ipConsoleNameSpace2);
  675. virtual HRESULT OnViewChange(IResultData *ipResultData, LPARAM data, LONG_PTR hint);
  676. virtual HRESULT ShowAllItems(IResultData* ipResultData, BOOL bCacheValid);
  677. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb);
  678. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb, LPARAM Cookie);
  679. virtual HRESULT OnHelpCmd(IDisplayHelp *ipDisplayHelp);
  680. private:
  681. HSCOPEITEM m_ID;
  682. list<CBaseNode *> m_NodeList;
  683. ITEM_STR m_name; // Node's display name
  684. ITEM_STR m_ResultStr;
  685. LONG m_fViewOption;
  686. public:
  687. enum {
  688. JOB_COLUMN,
  689. STATUS_COLUMN,
  690. ACTIVE_PROCESS_COUNT_COLUMN,
  691. AFFINITY_COLUMN,
  692. PRIORITY_COLUMN,
  693. SCHEDULING_CLASS_COLUMN,
  694. USER_TIME_COLUMN,
  695. KERNEL_TIME_COLUMN,
  696. PERIOD_USER_TIME_COLUMN,
  697. PERIOD_KERNEL_TIME_COLUMN,
  698. PAGE_FAULT_COUNT_COLUMN,
  699. PROCESS_COUNT_COLUMN,
  700. TERMINATED_PROCESS_COUNT_COLUMN,
  701. READOP_COUNT_COLUMN,
  702. WRITEOP_COUNT_COLUMN,
  703. OTHEROP_COUNT_COLUMN,
  704. READTRANS_COUNT_COLUMN,
  705. WRITETRANS_COUNT_COLUMN,
  706. OTHERTRANS_COUNT_COLUMN,
  707. PEAK_PROC_MEM_COLUMN,
  708. PEAK_JOB_MEM_COLUMN,
  709. };
  710. private:
  711. static const CONTEXTMENUITEMBYID ViewMenuItems[];
  712. HRESULT RePopulateScopePane(IConsoleNameSpace2 *ipConsoleNameSpace2);
  713. HRESULT AddNode(IConsoleNameSpace2 *ipConsoleNameSpace2, CBaseNode *pSubNode);
  714. void FreeNodes();
  715. int ScopeCount(HSCOPEITEM ID, IConsoleNameSpace2 *ipConsoleNameSpace2);
  716. }; // end class CJobFolder
  717. class CJobItemFolder : public CBaseNode
  718. {
  719. public:
  720. CJobItemFolder(CBaseNode *pParent, const PCJobListItem &thejob);
  721. virtual ~CJobItemFolder();
  722. private:
  723. static const GUID m_GUID;
  724. static const TCHAR *const m_szGUID;
  725. public:
  726. virtual LPCTSTR GetNodeName();
  727. virtual HRESULT GetDisplayInfo(RESULTDATAITEM &ResultItem);
  728. virtual const GUID *GetGUIDptr() { return &m_GUID; }
  729. virtual const TCHAR *GetGUIDsz() { return m_szGUID; }
  730. virtual BOOL IsPersisted() { return FALSE; }
  731. virtual const int sImage() { if (m_JobItem.lFlags & PCLFLAG_IS_DEFINED) return JOBITEMIMAGE; else return JOBIMAGE_NODEFINITION; }
  732. virtual const int sOpenImage() { return sImage(); }
  733. virtual void SetID(HSCOPEITEM ID) { m_ID = ID; }
  734. virtual HSCOPEITEM GetID() { return m_ID; }
  735. virtual HRESULT AddMenuItems(LPCONTEXTMENUCALLBACK piCallback, long * pInsertionAllowed);
  736. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, IConsoleNameSpace2 *ipConsoleNameSpace2, long nCommandID);
  737. virtual HRESULT OnMenuCommand(IConsole2 *ipConsole2, long nCommandID);
  738. virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2* ipHeaderCtrl, IConsole2 *ipConsole2, IConsoleNameSpace2 *ipConsoleNameSpace2);
  739. //virtual HRESULT OnShow(BOOL bSelecting, HSCOPEITEM hItem, IHeaderCtrl2* ipHeaderCtrl, IConsole2 *ipConsole2);
  740. virtual HRESULT OnRefresh(IConsole2 *ipConsole2);
  741. virtual HRESULT OnViewChange(IResultData *ipResultData, LPARAM data, LONG_PTR hint);
  742. virtual HRESULT ShowAllItems(IResultData* ipResultData, BOOL bCacheValid);
  743. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb);
  744. virtual HRESULT OnSelect(BOOL bScope, BOOL bSelect, IConsoleVerb* ipConsoleVerb, LPARAM Cookie);
  745. virtual HRESULT OnHelpCmd(IDisplayHelp *ipDisplayHelp);
  746. virtual HRESULT OnCreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle, DATA_OBJECT_TYPES context);
  747. virtual HRESULT OnCreatePropertyPages(LPPROPERTYSHEETCALLBACK lpProvider, LONG_PTR handle, DATA_OBJECT_TYPES context, LPARAM Cookie);
  748. virtual HRESULT QueryPagesFor();
  749. virtual HRESULT QueryPagesFor(LPARAM Cookie);
  750. virtual HRESULT OnPropertyChange(PROPERTY_CHANGE_HDR *pUpdate, IConsole2 *ipConsole2);
  751. private:
  752. HSCOPEITEM m_ID;
  753. PCJobListItem m_JobItem;
  754. ITEM_STR m_ResultStr;
  755. list<PCProcListItem *> Cache;
  756. list<PCProcListItem *> MemBlocks;
  757. static const CONTEXTMENUITEMBYID ResultsTopMenuItems[];
  758. void ClearCache();
  759. BOOL RefreshCache(IConsole2 *ipConsole2);
  760. HRESULT PCJobListGetDisplayInfo(RESULTDATAITEM &ResultItem, const PCJobListItem &ref, ITEM_STR &StorageStr);
  761. }; // end class CJobItemFolder
  762. #endif // _CLASS_BASENODE_