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.

661 lines
19 KiB

  1. #ifndef __DFRGSNAPIN_H_
  2. #define __DFRGSNAPIN_H_
  3. #include "resource.h"
  4. #include "DfrgCmn.h"
  5. #include "DfrgRes.h"
  6. #include "GetDfrgRes.h"
  7. #include "errmacro.h"
  8. #ifndef ATLASSERT
  9. #define ATLASSERT(expr) _ASSERTE(expr)
  10. #endif
  11. #include <atlsnap.h>
  12. #include "DfrgSnapHelp.h"
  13. #include "DfrgUI.h"
  14. //#pragma message ("Please add the following to DllMain right after _Module.Init")
  15. //#pragma message ("CSnapInItem::Init();")
  16. //#error ""
  17. ///////////////////////////////
  18. // mwp added for handling menu and toolbar messages
  19. enum {
  20. // Identifiers for each of the commands/views to be inserted into the context menu.
  21. IDM_NOTHING, //This has to be zero to take up the zero values because a bug in MMC doesn't show tooltips for buttons with an ID of zero.
  22. IDM_ANALYZE,
  23. IDM_DEFRAG,
  24. IDM_CONTINUE,
  25. IDM_PAUSE,
  26. IDM_STOP,
  27. IDM_REFRESH,
  28. IDM_REPORT
  29. };
  30. enum CUSTOM_VIEW_ID {
  31. VIEW_DEFAULT_LV = 0,
  32. VIEW_DEFRAG_OCX = 1,
  33. };
  34. #define NUM_DEFRAG_BUTTONS 6
  35. // end of ESI additions
  36. ///////////////////////////////
  37. class CDfrgSnapinComponent;
  38. class CDfrgSnapinData : public CSnapInItemImpl<CDfrgSnapinData>
  39. {
  40. public:
  41. ///////////////////////////////
  42. // ESI additions
  43. //TCHAR m_DefragmenterName[200];
  44. // end of ESI additions
  45. ///////////////////////////////
  46. static const GUID* m_NODETYPE;
  47. static const OLECHAR* m_SZNODETYPE;
  48. static const OLECHAR* m_SZDISPLAY_NAME;
  49. // esi OLECHAR* m_SZDISPLAY_NAME;
  50. static const CLSID* m_SNAPIN_CLASSID;
  51. CComPtr<IControlbar> m_spControlBar;
  52. BEGIN_SNAPINCOMMAND_MAP(CDfrgSnapinData, FALSE)
  53. END_SNAPINCOMMAND_MAP()
  54. BEGIN_SNAPINTOOLBARID_MAP(CDfrgSnapinData)
  55. // Create toolbar resources with button dimensions 16x16
  56. // and add an entry to the MAP. You can add multiple toolbars
  57. // SNAPINTOOLBARID_ENTRY(Toolbar ID)
  58. END_SNAPINTOOLBARID_MAP()
  59. CDfrgSnapinData( bool fRemoted )
  60. {
  61. m_pComponent = NULL;
  62. m_fScopeItem = false;
  63. m_fRemoted = fRemoted;
  64. wcscpy(m_wstrColumnName, L"");
  65. wcscpy(m_wstrColumnType, L"");
  66. wcscpy(m_wstrColumnDesc, L"");
  67. VString msg(IDS_PRODUCT_NAME, GetDfrgResHandle());
  68. m_bstrDisplayName = msg.GetBuffer(); // base class
  69. if (msg.GetBuffer()) {
  70. wcsncpy(m_wstrColumnName, msg.GetBuffer(), 50); // our copy
  71. m_wstrColumnName[50] = L'\0';
  72. }
  73. msg.Empty();
  74. msg.LoadString(IDS_COLUMN_TYPE, GetDfrgResHandle());
  75. if (msg.GetBuffer()) {
  76. wcsncpy(m_wstrColumnType, msg.GetBuffer(), 50);
  77. m_wstrColumnType[50] = L'\0';
  78. }
  79. msg.Empty();
  80. msg.LoadString(IDS_COLUMN_DESC, GetDfrgResHandle());
  81. if (msg.GetBuffer()) {
  82. wcsncpy(m_wstrColumnDesc, msg.GetBuffer(), 100);
  83. m_wstrColumnDesc[100] = L'\0';
  84. }
  85. // m_pResult = NULL; // pointer to the IResultData interface
  86. m_CustomViewID = VIEW_DEFRAG_OCX;
  87. // Image indexes may need to be modified depending on the images specific to
  88. // the snapin.
  89. memset(&m_scopeDataItem, 0, sizeof(SCOPEDATAITEM));
  90. m_scopeDataItem.mask = SDI_STR | SDI_IMAGE | SDI_OPENIMAGE | SDI_PARAM | SDI_CHILDREN;
  91. m_scopeDataItem.displayname = (LPOLESTR)MMC_CALLBACK;
  92. m_scopeDataItem.nImage = 0; // May need modification
  93. m_scopeDataItem.cChildren = 0;
  94. m_scopeDataItem.nOpenImage = 0; // May need modification
  95. m_scopeDataItem.lParam = (LPARAM) this;
  96. memset(&m_resultDataItem, 0, sizeof(RESULTDATAITEM));
  97. m_resultDataItem.mask = RDI_STR | RDI_IMAGE | RDI_PARAM;
  98. m_resultDataItem.str = (LPOLESTR)MMC_CALLBACK;
  99. m_resultDataItem.nImage = 0; // May need modification
  100. m_resultDataItem.lParam = (LPARAM) this;
  101. ///////////////////////////////
  102. // ESI additions
  103. //m_SZDISPLAY_NAME = (LPOLESTR) CoTaskMemAlloc(200 * sizeof(OLECHAR));
  104. //LoadString(GetDfrgResHandle(), IDS_PRODUCT_NAME, m_DefragmenterName, 200);
  105. //m_SZDISPLAY_NAME = m_DefragmenterName;
  106. // end of ESI additions
  107. ///////////////////////////////
  108. }
  109. ~CDfrgSnapinData()
  110. {
  111. GetDfrgResHandle(TRUE); // this resets it
  112. }
  113. STDMETHOD(GetScopePaneInfo)(SCOPEDATAITEM *pScopeDataItem);
  114. STDMETHOD(GetResultPaneInfo)(RESULTDATAITEM *pResultDataItem);
  115. STDMETHOD(Notify)( MMC_NOTIFY_TYPE event,
  116. LPARAM arg,
  117. LPARAM param,
  118. IComponentData* pComponentData,
  119. IComponent* pComponent,
  120. DATA_OBJECT_TYPES type);
  121. LPOLESTR GetResultPaneColInfo(int nCol);
  122. STDMETHOD(AddMenuItems)( LPCONTEXTMENUCALLBACK piCallback,
  123. long *pInsertionAllowed,
  124. DATA_OBJECT_TYPES type);
  125. STDMETHOD( GetResultViewType )( LPOLESTR* ppViewType, long* pViewOptions );
  126. STDMETHOD( FillData ) ( CLIPFORMAT cf, LPSTREAM pStream );
  127. /*
  128. //
  129. // This is really just stubbed out for compliance with com.
  130. // The lifetime is managed by the node itself.
  131. //
  132. STDMETHOD(QueryInterface)(REFIID riid,void** ppv);
  133. STDMETHODIMP_(ULONG) AddRef(void) { return InterlockedIncrement(&m_cRef); };
  134. STDMETHODIMP_(ULONG) Release(void);
  135. */
  136. void SetActiveControl( BOOL bActive, IComponent* pComponent );
  137. protected:
  138. bool m_fRemoted;
  139. BOOL m_fScopeItem;
  140. OLECHAR m_wstrColumnName[50 + 1];
  141. OLECHAR m_wstrColumnType[50 + 1];
  142. OLECHAR m_wstrColumnDesc[100 + 1];
  143. //
  144. // Used to track the last valid component, for
  145. // update purposes.
  146. //
  147. CDfrgSnapinComponent* m_pComponent;
  148. // HRESULT InitializeOCX(); // inits the Dispatch interface to the OCX
  149. CUSTOM_VIEW_ID m_CustomViewID;
  150. // LPCONSOLE m_pConsole; // Console's IFrame interface
  151. CComQIPtr<IDispatch,&IID_IDispatch> m_iDfrgCtlDispatch;
  152. // IDispatch FAR* m_iDfrgCtlDispatch; // Dispatch interface to the OCX
  153. // LPRESULTDATA m_pResult; // pointer to the IResultData interface
  154. HRESULT OnShow( LPARAM isShowing, IResultData* pResults );
  155. BOOL GetSessionState( LPDISPATCH pControl, UINT sessionState );
  156. // These are the Dispatch functions to get/send data from the OCX
  157. BOOL SendCommand( LPARAM lparamCommand );
  158. short GetEngineState();
  159. STDMETHOD( Command )(long lCommandID,
  160. CSnapInObjectRootBase* pObj,
  161. DATA_OBJECT_TYPES type);
  162. };
  163. //////////////////////////////////////
  164. // New Extension code
  165. class CDfrgSnapinExtData : public CSnapInItemImpl<CDfrgSnapinExtData, TRUE>
  166. {
  167. public:
  168. static const GUID* m_NODETYPE;
  169. static const OLECHAR* m_SZNODETYPE;
  170. static const OLECHAR* m_SZDISPLAY_NAME;
  171. static const CLSID* m_SNAPIN_CLASSID;
  172. CDfrgSnapinExtData()
  173. {
  174. m_pNode = NULL;
  175. memset(&m_scopeDataItem, 0, sizeof(SCOPEDATAITEM));
  176. memset(&m_resultDataItem, 0, sizeof(RESULTDATAITEM));
  177. }
  178. ~CDfrgSnapinExtData()
  179. {
  180. if ( m_pNode != NULL )
  181. delete m_pNode;
  182. }
  183. IDataObject* m_pDataObject;
  184. virtual void InitDataClass(IDataObject* pDataObject, CSnapInItem* pDefault)
  185. {
  186. m_pDataObject = pDataObject;
  187. // The default code stores off the pointer to the Dataobject the class is wrapping
  188. // at the time.
  189. // Alternatively you could convert the dataobject to the internal format
  190. // it represents and store that information
  191. }
  192. CSnapInItem* GetExtNodeObject(IDataObject* pDataObject, CSnapInItem* pDefault)
  193. {
  194. // Modify to return a different CSnapInItem* pointer.
  195. return pDefault;
  196. }
  197. STDMETHOD(Notify)( MMC_NOTIFY_TYPE event,
  198. LPARAM arg,
  199. LPARAM param,
  200. IComponentData* pComponentData,
  201. IComponent* pComponent,
  202. DATA_OBJECT_TYPES type);
  203. STDMETHOD(GetDisplayInfo)(SCOPEDATAITEM *pScopeDataItem)
  204. {
  205. return( S_OK );
  206. }
  207. protected:
  208. CSnapInItem* m_pNode;
  209. };
  210. // New Extension code end
  211. //////////////////////////////////////
  212. class CDfrgSnapin;
  213. class CDfrgSnapinComponent : public CComObjectRootEx<CComSingleThreadModel>,
  214. public CSnapInObjectRoot<2, CDfrgSnapin >,
  215. //public IExtendControlbarImpl<CDfrgSnapinComponent>,
  216. public IComponentImpl<CDfrgSnapinComponent>,
  217. public IExtendContextMenuImpl<CDfrgSnapin>,
  218. public IDfrgEvents
  219. {
  220. public:
  221. BEGIN_COM_MAP(CDfrgSnapinComponent)
  222. COM_INTERFACE_ENTRY(IComponent)
  223. COM_INTERFACE_ENTRY(IDfrgEvents)
  224. COM_INTERFACE_ENTRY(IExtendContextMenu)
  225. //COM_INTERFACE_ENTRY(IExtendControlbar)
  226. END_COM_MAP()
  227. public:
  228. CDfrgSnapinComponent();
  229. /////////////////
  230. // ESI start
  231. ~CDfrgSnapinComponent();
  232. // ESI end
  233. ////////////////////
  234. STDMETHOD(Notify)(LPDATAOBJECT lpDataObject, MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM param)
  235. {
  236. HRESULT hr = E_UNEXPECTED;
  237. //
  238. // Check for a special data object being sent.
  239. //
  240. if ( IS_SPECIAL_DATAOBJECT( lpDataObject ) )
  241. return( S_OK );
  242. if (lpDataObject != NULL)
  243. {
  244. //
  245. // Call our default handling.
  246. //
  247. hr = IComponentImpl<CDfrgSnapinComponent>::Notify(lpDataObject, event, arg, param);
  248. }
  249. return( hr );
  250. }
  251. void SetControl( LPDISPATCH pDisp )
  252. {
  253. if ( pDisp == NULL )
  254. Unadvise();
  255. m_spDisp = pDisp;
  256. if ( pDisp != NULL )
  257. Advise();
  258. }
  259. LPDISPATCH GetControl()
  260. {
  261. return( m_spDisp );
  262. }
  263. //
  264. // Status changes from the OCX.
  265. //
  266. STDMETHOD( StatusChanged )( BSTR bszStatus );
  267. //
  268. // Ok To Run status message from the OCX.
  269. //
  270. STDMETHOD( IsOKToRun )( BOOL bOK );
  271. STDMETHOD(AddMenuItems)(LPDATAOBJECT pDataObject,
  272. LPCONTEXTMENUCALLBACK piCallback,
  273. long *pInsertionAllowed);
  274. STDMETHOD(Command)(long lCommandID,
  275. LPDATAOBJECT pDataObject);
  276. protected:
  277. //
  278. // Interface to control.
  279. //
  280. CComQIPtr<IDispatch,&IID_IDispatch> m_spDisp;
  281. //
  282. // Sets up the connection point.
  283. //
  284. void Advise();
  285. void Unadvise();
  286. DWORD m_dwAdvise;
  287. };
  288. class CDfrgSnapin : public CComObjectRootEx<CComSingleThreadModel>,
  289. public CSnapInObjectRoot<1, CDfrgSnapin>,
  290. public IComponentDataImpl<CDfrgSnapin, CDfrgSnapinComponent>,
  291. public CComCoClass<CDfrgSnapin, &CLSID_DfrgSnapin>,
  292. public IExtendContextMenuImpl<CDfrgSnapin>,
  293. public ISnapinHelpImpl<CDfrgSnapin>
  294. {
  295. public:
  296. // bitmaps associated with the scope pane
  297. HBITMAP m_hBitmap16;
  298. HBITMAP m_hBitmap32;
  299. CDfrgSnapin()
  300. {
  301. m_pNode = new CDfrgSnapinData( false );
  302. _ASSERTE(m_pNode != NULL);
  303. m_pComponentData = this;
  304. m_fRemoted = false;
  305. m_ccfRemotedFormat = 0;
  306. RegisterRemotedClass();
  307. m_hBitmap16 = m_hBitmap32 = NULL;
  308. }
  309. ~CDfrgSnapin()
  310. {
  311. if (m_hBitmap16){
  312. ::DeleteObject(m_hBitmap16);
  313. }
  314. if (m_hBitmap32){
  315. ::DeleteObject(m_hBitmap32);
  316. }
  317. delete m_pNode;
  318. m_pNode = NULL;
  319. }
  320. //////////////////////////////////////
  321. // New Extension code
  322. EXTENSION_SNAPIN_DATACLASS(CDfrgSnapinExtData)
  323. BEGIN_EXTENSION_SNAPIN_NODEINFO_MAP(CDfrgSnapin)
  324. EXTENSION_SNAPIN_NODEINFO_ENTRY(CDfrgSnapinExtData)
  325. END_EXTENSION_SNAPIN_NODEINFO_MAP()
  326. // New Extension code end
  327. //////////////////////////////////////
  328. BEGIN_COM_MAP(CDfrgSnapin)
  329. COM_INTERFACE_ENTRY(IComponentData)
  330. COM_INTERFACE_ENTRY(IExtendContextMenu)
  331. COM_INTERFACE_ENTRY(ISnapinHelp)
  332. END_COM_MAP()
  333. // commented out and replaced below
  334. //DECLARE_REGISTRY_RESOURCEID(IDR_DFRGSNAPIN)
  335. // with the following code (to support localization of the Project Name)
  336. static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
  337. {
  338. USES_CONVERSION;
  339. // name of the snapin is stored in the string resource IDS_PROJNAME
  340. const int nBufferMax = 128;
  341. TCHAR tszData[nBufferMax + 1];
  342. // this name string is used to populate the Add/Remove snapin dialog in MMC
  343. if (LoadString(_Module.GetModuleInstance(), IDS_PROJNAME, tszData, nBufferMax) == 0)
  344. {
  345. _ASSERTE(FALSE);
  346. return E_FAIL;
  347. }
  348. LPCOLESTR szData = T2OLE(tszData);
  349. if (szData == NULL)
  350. return E_OUTOFMEMORY;
  351. _ATL_REGMAP_ENTRY re[] = {L"SNAPINNAME", szData, NULL, NULL};
  352. // I don't just do "return _Module.UpdateRegistryFromResource" as
  353. // szData would get destroyed before the method finishes
  354. HRESULT hr = _Module.UpdateRegistryFromResource(IDR_DFRGSNAPIN, bRegister, re);
  355. return hr;
  356. }
  357. DECLARE_NOT_AGGREGATABLE(CDfrgSnapin)
  358. STDMETHOD(Initialize)(LPUNKNOWN pUnknown);
  359. static void WINAPI ObjectMain(bool bStarting)
  360. {
  361. if (bStarting)
  362. CSnapInItem::Init();
  363. }
  364. // ESI end
  365. //////////////////////////
  366. STDMETHOD(Notify)( LPDATAOBJECT lpDataObject, MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM param)
  367. {
  368. HRESULT hr = E_UNEXPECTED;
  369. if (lpDataObject != NULL)
  370. {
  371. switch ( event )
  372. {
  373. case MMCN_EXPAND:
  374. {
  375. //
  376. // Process out the local or machine name if we're expanding.
  377. //
  378. if ( arg == TRUE )
  379. m_fRemoted = IsDataObjectRemoted( lpDataObject );
  380. //
  381. // Intentionally left to fall through to default handler.
  382. //
  383. }
  384. default:
  385. {
  386. //
  387. // Call our default handling.
  388. //
  389. hr = IComponentDataImpl<CDfrgSnapin, CDfrgSnapinComponent>::Notify( lpDataObject, event, arg, param );
  390. }
  391. }
  392. }
  393. return( hr );
  394. }
  395. //
  396. // Accessor for the remoted state.
  397. //
  398. bool IsRemoted()
  399. {
  400. return( m_fRemoted );
  401. }
  402. protected:
  403. //
  404. // Determine if we're monitoring a local or remote machine based on the given data object.
  405. //
  406. bool IsDataObjectRemoted( IDataObject* pDataObject );
  407. //
  408. // Retrieves the value of a given clipboard format from a given data object.
  409. //
  410. bool ExtractString( IDataObject* pDataObject, unsigned int cfClipFormat, LPTSTR pBuf, DWORD dwMaxLength );
  411. //
  412. // Register the clipboard format and get the value to query on.
  413. //
  414. void RegisterRemotedClass()
  415. {
  416. m_ccfRemotedFormat = RegisterClipboardFormat( _T( "MMC_SNAPIN_MACHINE_NAME" ) );
  417. _ASSERTE( m_ccfRemotedFormat > 0 );
  418. }
  419. //
  420. // Used to track whether we're remoted or not.
  421. //
  422. bool m_fRemoted;
  423. //
  424. // Initialized by RegisterRemoteClass(). Contains the clipboard ID
  425. // of MMC_SNAPIN_MACHINE_NAME after registered with the clipboard.
  426. //
  427. UINT m_ccfRemotedFormat;
  428. };
  429. class ATL_NO_VTABLE CDfrgSnapinAbout : public ISnapinAbout,
  430. public CComObjectRoot,
  431. public CComCoClass< CDfrgSnapinAbout, &CLSID_DfrgSnapinAbout>
  432. {
  433. public:
  434. DECLARE_REGISTRY(CDfrgSnapinAbout, _T("DfrgSnapinAbout.1"), _T("DfrgSnapinAbout.1"), IDS_DFRGSNAPIN_DESC, THREADFLAGS_BOTH);
  435. BEGIN_COM_MAP(CDfrgSnapinAbout)
  436. COM_INTERFACE_ENTRY(ISnapinAbout)
  437. END_COM_MAP()
  438. STDMETHOD(GetSnapinDescription)(LPOLESTR *lpDescription)
  439. {
  440. USES_CONVERSION;
  441. TCHAR szBuf[256];
  442. if (::LoadString(GetDfrgResHandle(), IDS_SNAPIN_DESCRIPTION, szBuf, 256) == 0)
  443. return E_FAIL;
  444. *lpDescription = (LPOLESTR)CoTaskMemAlloc((lstrlen(szBuf) + 1) * sizeof(OLECHAR));
  445. if (*lpDescription == NULL)
  446. return E_OUTOFMEMORY;
  447. ocscpy(*lpDescription, T2OLE(szBuf));
  448. return S_OK;
  449. }
  450. STDMETHOD(GetProvider)(LPOLESTR *lpName)
  451. {
  452. USES_CONVERSION;
  453. TCHAR szBuf[256];
  454. if (::LoadString(GetDfrgResHandle(), IDS_SNAPIN_PROVIDER, szBuf, 256) == 0)
  455. return E_FAIL;
  456. *lpName = (LPOLESTR)CoTaskMemAlloc((lstrlen(szBuf) + 1) * sizeof(OLECHAR));
  457. if (*lpName == NULL)
  458. return E_OUTOFMEMORY;
  459. ocscpy(*lpName, T2OLE(szBuf));
  460. return S_OK;
  461. }
  462. STDMETHOD(GetSnapinVersion)(LPOLESTR *lpVersion)
  463. {
  464. USES_CONVERSION;
  465. TCHAR szBuf[256];
  466. if (::LoadString(GetDfrgResHandle(), IDS_SNAPIN_VERSION, szBuf, 256) == 0)
  467. return E_FAIL;
  468. *lpVersion = (LPOLESTR)CoTaskMemAlloc((lstrlen(szBuf) + 1) * sizeof(OLECHAR));
  469. if (*lpVersion == NULL)
  470. return E_OUTOFMEMORY;
  471. ocscpy(*lpVersion, T2OLE(szBuf));
  472. return S_OK;
  473. }
  474. STDMETHOD(GetSnapinImage)(HICON *hAppIcon)
  475. {
  476. *hAppIcon = ::LoadIcon(GetDfrgResHandle(), MAKEINTRESOURCE(IDI_DEFRAG_ICON));
  477. if (*hAppIcon == NULL)
  478. return E_FAIL;
  479. return S_OK;
  480. }
  481. STDMETHOD(GetStaticFolderImage)(HBITMAP *hSmallImage,
  482. HBITMAP *hSmallImageOpen,
  483. HBITMAP *hLargeImage,
  484. COLORREF *cMask)
  485. {
  486. *hSmallImageOpen = *hLargeImage = *hLargeImage = 0;
  487. if( NULL == (*hSmallImageOpen = (HBITMAP) LoadImage(
  488. GetDfrgResHandle(),
  489. MAKEINTRESOURCE(IDB_DEFRAGSNAPIN_16), // name or identifier of image
  490. IMAGE_BITMAP, // type of image
  491. 0, // desired width
  492. 0, // desired height
  493. LR_DEFAULTCOLOR // load flags
  494. ) ) )
  495. {
  496. return E_FAIL;
  497. }
  498. if( NULL == (*hSmallImage = (HBITMAP) LoadImage(
  499. GetDfrgResHandle(), // handle of the instance that contains the image
  500. MAKEINTRESOURCE(IDB_DEFRAGSNAPIN_16), // name or identifier of image
  501. IMAGE_BITMAP, // type of image
  502. 0, // desired width
  503. 0, // desired height
  504. LR_DEFAULTCOLOR // load flags
  505. ) ) )
  506. {
  507. return E_FAIL;
  508. }
  509. if( NULL == (*hLargeImage = (HBITMAP) LoadImage(
  510. GetDfrgResHandle(), // handle of the instance that contains the image
  511. MAKEINTRESOURCE(IDB_DEFRAGSNAPIN_32), // name or identifier of image
  512. IMAGE_BITMAP, // type of image
  513. 0, // desired width
  514. 0, // desired height
  515. LR_DEFAULTCOLOR // load flags
  516. ) ) )
  517. {
  518. return E_FAIL;
  519. }
  520. // ISSUE: Need to worry about releasing these bitmaps.
  521. *cMask = RGB(255, 255, 255);
  522. return S_OK;
  523. }
  524. };
  525. //////////////////////////////////////
  526. // ESI start
  527. //////////////////////////////////////////////////
  528. // These constants are used with GetSessionState()
  529. //////////////////////////////////////////////////
  530. #define IS_ENGINE_PAUSED 0
  531. #define IS_ENGINE_RUNNING 1
  532. #define IS_DEFRAG_IN_PROCESS 2
  533. #define IS_VOLLIST_LOCKED 3
  534. #define IS_REPORT_AVAILABLE 4
  535. #define IS_OK_TO_RUN 5
  536. #define DFRG_INTERFACE_COUNT 6
  537. // ESI end
  538. ///////////////////////////////////////////
  539. #endif