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.

1541 lines
38 KiB

  1. /*++
  2. Copyright (c) 1994-1998 Microsoft Corporation
  3. Module Name :
  4. iisobj.h
  5. Abstract:
  6. IIS Objects Definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Project:
  10. Internet Services Manager
  11. Revision History:
  12. --*/
  13. #ifndef _IISOBJ_H
  14. #define _IISOBJ_H
  15. //
  16. // Forward Definitions
  17. //
  18. class CMenuEx;
  19. class CServerInfo;
  20. class CServiceInfo;
  21. class CIISChildNode;
  22. class CIISInstance;
  23. #define MAX_COLUMNS (10)
  24. //
  25. // Bitmap indices into the imagelist
  26. //
  27. enum
  28. {
  29. //
  30. // Indices into VIEW16 and VIEW32
  31. //
  32. BMP_LOCAL_COMPUTER,
  33. BMP_STOPPED,
  34. BMP_PAUSED,
  35. BMP_STARTED,
  36. BMP_UNKNOWN,
  37. BMP_ERROR,
  38. BMP_DIRECTORY,
  39. BMP_FILE,
  40. BMP_ROOT,
  41. BMP_COMPUTER,
  42. BMP_APPLICATION,
  43. //
  44. // Added on singly from IMGR16 and IMGR32
  45. //
  46. BMP_INETMGR,
  47. //
  48. // Don't move this one, this is where the service bitmaps start
  49. //
  50. BMP_SERVICE
  51. };
  52. /* abstract */ class CIISObject : public CObjectPlus
  53. /*++
  54. Class Description:
  55. Base IIS-configurable object. This is an abstract base class
  56. Public Interface:
  57. CIISObject : Constructor
  58. operator CServerInfo * : Cast to serverinfo (could be NULL)
  59. operator LPCTSTR : Cast to description string
  60. operator int : Cast to bitmap index
  61. BOOL IsStartable : TRUE if object can be started
  62. BOOL IsStoppable : TRUE if object can be stopped
  63. Virtual Public Interface (needs to be implemented in derived classes):
  64. BOOL IsControllable : TRUE if object can be started/stopped
  65. BOOL IsPausable : TRUE if object can be paused
  66. BOOL IsConfigurable : TRUE if the object is configurable
  67. BOOL IsMMCConfigurable : TRUE if the object is configurable with MMC
  68. BOOL IsAccessible : FALSE if access was denied to this object
  69. BOOL IsDeletable : TRUE if the object is deletable
  70. BOOL IsClusterEnabled : TRUE if the object is cluster enabled
  71. BOOL IsCloneable : TRUE if the item can be cloned.
  72. BOOL IsRenameable : TRUE if the object can be renamed
  73. BOOL IsRunning : TRUE if the object is in a running state
  74. BOOL IsStopped : TRUE if the object is in a stopped state
  75. BOOL IsPaused : TRUE if the object is in a paused state
  76. BOOL IsExplorable : TRUE if the object is explorable
  77. BOOL IsOpenable : TRUE if the object is openable
  78. BOOL IsBrowsable : TRUE if the object is browsable
  79. BOOL CanConfigureStopped : TRUE if the object can be configured while
  80. stopped
  81. BOOL ChildrenOutOfDate : TRUE if the object's children need to be
  82. fetched
  83. BOOL IsLocalMachine : TRUE if applicable machine name owner
  84. is local
  85. BOOL HandleUI : TRUE if we need to confirm before deletion
  86. DWORD QueryErrorCode : Return API error code (if applicable)
  87. DWORD ChangeState : Change the current state of the object
  88. DWORD Configure : Configure this object
  89. DWORD ConfigureMMC : Configure this object with MMC
  90. DWORD Rename : Rename the object
  91. int QueryState : Return the (running/stopped/paused) state
  92. int QueryBitmapIndex : Get the bitmap index for the object
  93. LPCTSTR GetStateText : Get text representation of current state
  94. LPCTSTR GetDisplayText : Generate display text for the object
  95. LPCTSTR GetMachineName : Get machine name (if applicable)
  96. LPCTSTR GetServiceName : Get service name (if applicable)
  97. LPCTSTR GetComment : Get comment (if applicable)
  98. CServerInfo * GetServerInfo : Get server info object (if applicable)
  99. --*/
  100. {
  101. protected:
  102. //
  103. // Protected constructor
  104. //
  105. CIISObject(
  106. IN const GUID guid,
  107. IN LPCTSTR lpszNodeName = _T(""),
  108. IN LPCTSTR lpszPhysicalPath = _T("")
  109. );
  110. public:
  111. void SetScopeHandle(IN HSCOPEITEM hScopeItem, BOOL fIsParentScope = FALSE);
  112. HSCOPEITEM GetScopeHandle() const { return m_hScopeItem; }
  113. BOOL ScopeHandleIsParent() const { return m_fIsParentScope; }
  114. BOOL IsScopeSelected();
  115. //
  116. // Static Access
  117. //
  118. public:
  119. static void AttachScopeView(IN LPCONSOLENAMESPACE lpcnsScopeView);
  120. static LPCONSOLENAMESPACE GetScopeView();
  121. static BOOL m_fIsExtension;
  122. //
  123. // Virtual Interface
  124. //
  125. public:
  126. //
  127. // Type Functions
  128. //
  129. virtual BOOL IsControllable() const { return FALSE; }
  130. virtual BOOL IsPausable() const { return FALSE; }
  131. virtual BOOL IsConfigurable() const { return FALSE; }
  132. virtual BOOL IsMMCConfigurable() const { return FALSE; }
  133. virtual BOOL IsAccessible() const { return TRUE; }
  134. virtual BOOL IsDeletable() const { return FALSE; }
  135. virtual BOOL IsClusterEnabled() const { return FALSE; }
  136. virtual BOOL HandleUI() const { return TRUE; }
  137. //
  138. // State Functions
  139. //
  140. virtual BOOL IsRunning() const { return FALSE; }
  141. virtual BOOL IsStopped() const { return FALSE; }
  142. virtual BOOL IsPaused() const { return FALSE; }
  143. virtual BOOL IsRenamable() const { return FALSE; }
  144. virtual BOOL IsConnectable() const { return FALSE; }
  145. virtual BOOL IsExtension() const {return m_fIsExtension;}
  146. virtual BOOL IsClonable() const { return FALSE; }
  147. virtual BOOL IsBrowsable() const { return FALSE; }
  148. virtual BOOL IsExplorable() const { return FALSE; }
  149. virtual BOOL IsOpenable() const { return FALSE; }
  150. virtual BOOL IsRefreshable() const { return TRUE; }
  151. virtual BOOL CanConfigureStopped() const { return FALSE; }
  152. virtual BOOL ChildrenOutOfDate() const { return FALSE; }
  153. //
  154. // Get the error return code
  155. //
  156. virtual HRESULT QueryErrorCode() const { return S_OK; }
  157. virtual int QueryState() const { return INetServiceUnknown; }
  158. //
  159. // Access Functions (must be implemented in the derived class)
  160. //
  161. virtual HRESULT ChangeState(IN int nNewState);
  162. virtual HRESULT Configure(IN CWnd * pParent);
  163. virtual HRESULT ConfigureMMC(
  164. IN LPPROPERTYSHEETCALLBACK lpProvider,
  165. IN LPARAM param,
  166. IN LONG_PTR handle
  167. );
  168. virtual HRESULT RefreshData();
  169. virtual HRESULT Delete();
  170. virtual HRESULT SecurityWizard();
  171. virtual int Compare(int nCol, CIISObject * pObject);
  172. //
  173. // Bring up in "explore" view
  174. //
  175. virtual HRESULT Explore();
  176. //
  177. // Bring up in "open" view
  178. //
  179. virtual HRESULT Open();
  180. //
  181. // Bring up in the browser
  182. //
  183. virtual HRESULT Browse();
  184. static void InitializeHeaders(IN LPHEADERCTRL pHeader);
  185. virtual void InitializeChildHeaders(IN LPHEADERCTRL pHeader);
  186. virtual BOOL IsLeafNode() const { return FALSE; }
  187. virtual HRESULT AddMenuItems(
  188. IN LPCONTEXTMENUCALLBACK pContextMenuCallback
  189. );
  190. virtual HRESULT AddNextTaskpadItem(
  191. OUT MMC_TASK * pTask
  192. );
  193. virtual HRESULT AddChildNode(
  194. IN OUT CIISChildNode *& pChild
  195. );
  196. virtual BOOL ChildrenExpanded() const { return m_tmChildrenExpanded != 0L;}
  197. virtual void CleanChildren();
  198. virtual void DirtyChildren();
  199. virtual BOOL SupportsFileSystem() const { return FALSE; }
  200. virtual BOOL IsFileSystemNode() const { return FALSE; }
  201. virtual BOOL SupportsChildren() const { return FALSE; }
  202. virtual BOOL SupportsSecurityWizard() const { return FALSE; }
  203. virtual HRESULT ExpandChildren(HSCOPEITEM pParent);
  204. virtual HRESULT Rename(LPCTSTR NewName);
  205. virtual LPCTSTR GetStateText() const;
  206. //
  207. // Display Context Functions
  208. //
  209. /* PURE */ virtual int QueryBitmapIndex() const = 0;
  210. /* PURE */ virtual LPCTSTR GetDisplayText(
  211. OUT CString & strText
  212. ) const = 0;
  213. virtual void GetResultDisplayInfo(
  214. IN int nCol,
  215. OUT CString & str,
  216. OUT int & nImage
  217. ) const;
  218. //
  219. // Get the machine name
  220. //
  221. virtual LPCTSTR GetMachineName() const { return NULL; }
  222. //
  223. // Determine if the local machine name is local
  224. //
  225. virtual BOOL IsLocalMachine() const { return FALSE; }
  226. //
  227. // Get the service name
  228. //
  229. virtual LPCTSTR GetServiceName() const { return NULL; }
  230. //
  231. // Get the comment
  232. //
  233. virtual LPCTSTR GetComment() const { return NULL; }
  234. //
  235. // Get the server info (service/server pair)
  236. // object that controls this object
  237. //
  238. virtual CServerInfo * GetServerInfo() { return NULL; }
  239. //
  240. // Get metabase node name
  241. //
  242. virtual LPCTSTR QueryNodeName(BOOL fMetabasePath = FALSE) const { return m_strNodeName; }
  243. //
  244. // Find the owner instance
  245. //
  246. virtual CIISInstance * FindOwnerInstance() { return NULL; }
  247. //
  248. // Check to see if the current node is a terminal point
  249. // in the metabasepath
  250. //
  251. virtual BOOL IsTerminalPoint(BOOL fFullMetaPath) const { return FALSE; }
  252. //
  253. // Get parent CIISObject
  254. //
  255. virtual CIISObject * GetParentObject() const;
  256. //
  257. // Get parent path for this node
  258. //
  259. LPCTSTR BuildParentPath(
  260. OUT CString & strParentPath,
  261. BOOL fMetabasePath
  262. ) const;
  263. //
  264. // Get complete path for this node
  265. //
  266. LPCTSTR BuildFullPath(
  267. OUT CString & strPath,
  268. BOOL fMetabasePath
  269. ) const;
  270. //
  271. // Get complete physical path for this node
  272. //
  273. LPCTSTR BuildPhysicalPath(
  274. OUT CString & strPhysicalPath
  275. ) const;
  276. //
  277. // Assumed Functions
  278. //
  279. public:
  280. BOOL IsValidObject() const;
  281. BOOL IsStartable() const { return IsControllable() && !IsRunning(); }
  282. BOOL IsStoppable() const { return IsControllable() && (IsRunning() || IsPaused() ); }
  283. BOOL OK() const { return QueryErrorCode() == S_OK; }
  284. const GUID QueryGUID() const { return m_guid; }
  285. const GUID * GetGUIDPtr() { return &m_guid; }
  286. CString & GetNodeName() { return m_strNodeName; }
  287. LPCTSTR QueryPhysicalPath() const { return m_strPhysicalPath; }
  288. CString& GetPhysicalPath() { return m_strPhysicalPath; }
  289. BOOL IsVirtualDirectory() const { return !m_strPhysicalPath.IsEmpty(); }
  290. //
  291. // Get the redirected path
  292. //
  293. BOOL IsRedirected() const { return !m_strRedirPath.IsEmpty(); }
  294. BOOL IsChildOnlyRedir() const { return m_fChildOnlyRedir; }
  295. LPCTSTR QueryRedirPath() { return m_strRedirPath; }
  296. //
  297. // Get the instance ID
  298. //
  299. DWORD QueryInstanceID();
  300. //
  301. // Conversion Operators
  302. //
  303. public:
  304. operator CServerInfo *() { return GetServerInfo(); }
  305. //
  306. // Get display text
  307. //
  308. operator LPCTSTR();
  309. //
  310. // Get bitmap index
  311. //
  312. operator int() { return QueryBitmapIndex(); }
  313. //
  314. // GUID
  315. //
  316. operator const GUID() { return QueryGUID(); }
  317. //
  318. // Refresh display
  319. //
  320. void RefreshDisplayInfo();
  321. public:
  322. //
  323. // Add Menu Command
  324. //
  325. static HRESULT AddMenuItemByCommand(
  326. IN LPCONTEXTMENUCALLBACK lpContextMenuCallback,
  327. IN LONG lCmdID,
  328. IN LONG fFlags = 0
  329. );
  330. static HRESULT AddTaskpadItemByInfo(
  331. OUT MMC_TASK * pTask,
  332. IN LONG lCommandID,
  333. IN LPCTSTR lpszMouseOn,
  334. IN LPCTSTR lpszMouseOff,
  335. IN LPCTSTR lpszText,
  336. IN LPCTSTR lpszHelpString
  337. );
  338. static HRESULT AddTaskpadItemByCommand(
  339. IN LONG lCmdID,
  340. OUT MMC_TASK * pTask,
  341. IN HINSTANCE hInstance = (HINSTANCE)-1
  342. );
  343. protected:
  344. static CMenuEx s_mnu;
  345. static CString s_strProperties;
  346. static CString s_strRunning;
  347. static CString s_strPaused;
  348. static CString s_strStopped;
  349. static CString s_strUnknown;
  350. static CString s_strYes;
  351. static CString s_strNo;
  352. static CString s_strTCPIP;
  353. static CString s_strNetBIOS;
  354. static CString s_strDefaultIP;
  355. static CString s_strRedirect;
  356. static time_t s_lExpirationTime;
  357. static LPCONSOLENAMESPACE s_lpcnsScopeView;
  358. protected:
  359. //
  360. // Result View Helpers
  361. //
  362. static void BuildResultView(
  363. IN LPHEADERCTRL pHeader,
  364. IN int cColumns,
  365. IN int * pnIDS,
  366. IN int * pnWidths
  367. );
  368. //
  369. // Determine if instances can be added on this
  370. // machine
  371. //
  372. static BOOL CanAddInstance(
  373. IN LPCTSTR lpszMachineName
  374. );
  375. protected:
  376. //
  377. // GUID for runtime type checking
  378. //
  379. const GUID m_guid;
  380. time_t m_tmChildrenExpanded;
  381. HSCOPEITEM m_hScopeItem;
  382. BOOL m_fChildOnlyRedir;
  383. BOOL m_fIsParentScope;
  384. CString m_strNodeName;
  385. CString m_strPhysicalPath;
  386. CString m_strRedirPath;
  387. };
  388. class CIISMachine : public CIISObject
  389. {
  390. /*++
  391. Class Description:
  392. IIS Machine object. This object contains only a machine name,
  393. and is the only object that does not have a CServerInfo pointer
  394. Public Interface:
  395. CIISMachine : Constructor
  396. BOOL IsConfigurable : TRUE if the object is configurable
  397. DWORD Configure : Configure this object
  398. int QueryBitmapIndex : Get the bitmap index for the object
  399. CMenu * PrepareContextMenu : Prepare context menu for object
  400. LPCTSTR GetDisplayText : Generate display text for the object
  401. LPCTSTR GetMachineName : Get machine name (if applicable)
  402. --*/
  403. public:
  404. CIISMachine(
  405. IN LPCTSTR lpszMachineName
  406. );
  407. //
  408. // Access Functions
  409. //
  410. public:
  411. BOOL m_fIsExtension;
  412. //
  413. // Virtual Interface
  414. //
  415. public:
  416. //
  417. // Yes, can connect from here
  418. //
  419. virtual BOOL IsConnectable() const { return TRUE; }
  420. virtual BOOL IsConfigurable() const;
  421. virtual BOOL IsMMCConfigurable() const { return m_fIsAdministrator; }
  422. virtual BOOL IsExtension() const {return m_fIsExtension;}
  423. virtual HRESULT RefreshData() { return ERROR_SUCCESS; }
  424. virtual HRESULT Configure(
  425. IN CWnd * pParent
  426. );
  427. virtual HRESULT ConfigureMMC(
  428. IN LPPROPERTYSHEETCALLBACK lpProvider,
  429. IN LPARAM param,
  430. IN LONG_PTR handle
  431. );
  432. //
  433. // Display Context Functions
  434. //
  435. virtual int QueryBitmapIndex() const;
  436. virtual LPCTSTR GetDisplayText(
  437. OUT CString & strText
  438. ) const;
  439. virtual void GetResultDisplayInfo(
  440. IN int nCol,
  441. OUT CString & str,
  442. OUT int & nImage
  443. ) const;
  444. virtual HRESULT AddMenuItems(
  445. IN LPCONTEXTMENUCALLBACK pContextMenuCallback
  446. );
  447. virtual HRESULT AddNextTaskpadItem(
  448. OUT MMC_TASK * pTask
  449. );
  450. virtual LPCTSTR GetMachineName() const { return m_strMachineName; }
  451. //
  452. // Check to see if the current node is a terminal point
  453. // in the metabasepath. Base class method doesn't work correctly
  454. // in case of extension
  455. //
  456. virtual BOOL IsTerminalPoint(BOOL fFullMetaPath) const { return TRUE; }
  457. virtual BOOL IsLocalMachine() const { return m_fLocal; }
  458. static void InitializeHeaders(LPHEADERCTRL pHeader);
  459. virtual int Compare(int nCol, CIISObject * pObject);
  460. virtual void InitializeChildHeaders(LPHEADERCTRL pHeader);
  461. public:
  462. inline static void AttachNewInstanceCmds(
  463. CObListPlus * poblNewInstanceCmds
  464. )
  465. {
  466. s_poblNewInstanceCmds = poblNewInstanceCmds;
  467. }
  468. // BOOL IsLocal() const { return m_fLocal; }
  469. // Check to see if current user is administrator on the box
  470. BOOL IsAdministrator() const
  471. {
  472. return m_fIsAdministrator;
  473. }
  474. protected:
  475. static CObListPlus * s_poblNewInstanceCmds;
  476. static CString s_strLocalMachine;
  477. protected:
  478. //
  479. // Result View Layout
  480. //
  481. enum
  482. {
  483. COL_NAME,
  484. COL_LOCAL,
  485. COL_TYPE,
  486. COL_STATUS,
  487. /**/
  488. COL_TOTAL
  489. };
  490. static int rgnLabels[COL_TOTAL];
  491. static int rgnWidths[COL_TOTAL];
  492. private:
  493. CString m_strMachineName;
  494. CString m_strDisplayName;
  495. BOOL m_fLocal;
  496. BOOL m_fIsAdministrator;
  497. };
  498. class CIISInstance : public CIISObject
  499. {
  500. /*++
  501. Class Description:
  502. IIS Instance object. For down-level service types, this is a simple
  503. wrapper for the CServerInfo object.
  504. Public Interface:
  505. CIISInstance : Constructors for regular and down-level
  506. QueryID : Get instance ID or 0 for down-level
  507. QueryServiceID : Get the service ID
  508. operator == : Compare service ID and instance ID
  509. IsDownLevel : TRUE if this is a down-level server w/o
  510. instances
  511. SetViewType : Bitmap index and text change depending on
  512. if the object is in server, service view.
  513. or report view.
  514. BOOL IsControllable : TRUE if object can be started/stopped
  515. BOOL IsPausable : TRUE if object can be paused
  516. BOOL IsConfigurable : TRUE if the object is configurable
  517. BOOL IsAccessible : FALSE if access was denied to this object
  518. BOOL IsDeletable : TRUE if the object is deletable
  519. BOOL IsClusterEnabled : TRUE if the object is cluster enabled
  520. BOOL IsRunning : TRUE if the object is in a running state
  521. BOOL IsStopped : TRUE if the object is in a stopped state
  522. BOOL IsPaused : TRUE if the object is in a paused state
  523. BOOL CanConfigureStopped : TRUE if the object can be configured while
  524. stopped.
  525. DWORD ChangeState : Change the current state of the object
  526. DWORD Configure : Configure this object
  527. int QueryState : Return the (running/stopped/paused) state
  528. int QueryBitmapIndex : Get the bitmap index for the object
  529. LPCTSTR GetStateText : Get text representation of current state
  530. LPCTSTR GetDisplayText : Generate display text for the object
  531. LPCTSTR GetMachineName : Get machine name (if applicable)
  532. LPCTSTR GetServiceName : Get service name
  533. LPCTSTR GetComment : Get comment (if applicable)
  534. CServerInfo * GetServerInfo : Get server info object pointer
  535. --*/
  536. public:
  537. //
  538. // Constructor for down-level (single-instance server)
  539. //
  540. CIISInstance(
  541. IN CServerInfo * pServerInfo
  542. );
  543. CIISInstance(
  544. IN ISMINSTANCEINFO * pii,
  545. IN CServerInfo * pServerInfo
  546. );
  547. void InitializeFromStruct(
  548. IN ISMINSTANCEINFO * pii
  549. );
  550. //
  551. // Access Functions
  552. //
  553. public:
  554. DWORD QueryID() const { return m_dwID; }
  555. BOOL IsDownLevel() const { return m_fDownLevel; }
  556. DWORD QueryServiceID() const;
  557. BOOL operator ==(CIISInstance & target);
  558. //
  559. // Virtual Interface
  560. //
  561. public:
  562. //
  563. // Type Functions
  564. //
  565. virtual BOOL IsControllable() const;
  566. virtual BOOL IsPausable() const;
  567. virtual BOOL IsConfigurable() const;
  568. virtual BOOL IsMMCConfigurable() const;
  569. virtual BOOL IsAccessible() const;
  570. virtual BOOL IsDeletable() const;
  571. virtual BOOL IsClusterEnabled() const;
  572. virtual BOOL SupportsFileSystem() const;
  573. virtual BOOL SupportsChildren() const;
  574. virtual BOOL SupportsSecurityWizard() const;
  575. virtual BOOL IsLeafNode() const;
  576. //
  577. // State Functions
  578. //
  579. virtual BOOL IsRunning() const;
  580. virtual BOOL IsStopped() const;
  581. virtual BOOL IsPaused() const;
  582. //
  583. // Old single instances need to be running
  584. //
  585. virtual BOOL CanConfigureStopped() const { return !m_fDownLevel; }
  586. //
  587. // Get the error return code
  588. //
  589. virtual HRESULT QueryErrorCode() const { return m_hrError; }
  590. virtual HRESULT AddChildNode(
  591. CIISChildNode *& pChild
  592. );
  593. virtual BOOL IsBrowsable() const { return !IsDownLevel() && HasWebProtocol() && IsRunning(); }
  594. virtual BOOL IsExplorable() const { return !IsDownLevel(); }
  595. virtual BOOL IsOpenable() const { return !IsDownLevel(); }
  596. virtual HRESULT AddMenuItems(
  597. IN LPCONTEXTMENUCALLBACK pContextMenuCallback
  598. );
  599. virtual HRESULT AddNextTaskpadItem(
  600. OUT MMC_TASK * pTask
  601. );
  602. //
  603. // Access Functions
  604. //
  605. virtual int QueryState() const;
  606. virtual HRESULT Delete();
  607. virtual HRESULT SecurityWizard();
  608. virtual HRESULT ChangeState(int nNewState);
  609. virtual HRESULT Configure(
  610. IN CWnd * pParent
  611. );
  612. virtual HRESULT ConfigureMMC(
  613. IN LPPROPERTYSHEETCALLBACK lpProvider,
  614. IN LPARAM param,
  615. IN LONG_PTR handle
  616. );
  617. virtual HRESULT RefreshData();
  618. //
  619. // Display Context Functions
  620. //
  621. virtual int QueryBitmapIndex() const;
  622. virtual LPCTSTR GetStateText() const;
  623. virtual LPCTSTR GetDisplayText(
  624. OUT CString & strText
  625. ) const;
  626. virtual void GetResultDisplayInfo(
  627. IN int nCol,
  628. OUT CString & str,
  629. OUT int & nImage
  630. ) const;
  631. //
  632. // Get the machine name
  633. //
  634. virtual LPCTSTR GetMachineName() const { return m_strMachine; }
  635. virtual BOOL IsLocalMachine() const { return m_fLocalMachine; }
  636. //
  637. // Get the service name
  638. //
  639. virtual LPCTSTR GetServiceName() const;
  640. //
  641. // Get the comment
  642. //
  643. virtual LPCTSTR GetComment() const;
  644. //
  645. // Build result view
  646. //
  647. static void InitializeHeaders(LPHEADERCTRL pHeader);
  648. virtual void InitializeChildHeaders(LPHEADERCTRL pHeader);
  649. virtual int Compare(int nCol, CIISObject * pObject);
  650. virtual BOOL ChildrenExpanded() const;
  651. virtual HRESULT ExpandChildren(HSCOPEITEM pParent);
  652. //
  653. // Get the server info (service/server pair)
  654. // object that controls this instance
  655. //
  656. virtual CServerInfo * GetServerInfo() { return m_pServerInfo; }
  657. virtual CIISInstance * FindOwnerInstance() { return this; }
  658. virtual BOOL IsTerminalPoint(IN BOOL fFullMetaPath) const;
  659. //
  660. // Get metabase node name
  661. //
  662. virtual LPCTSTR QueryNodeName(BOOL fMetabasePath = FALSE) const;
  663. //
  664. // Access
  665. //
  666. public:
  667. USHORT GetPort() const { return m_sPort; }
  668. BOOL HasComment() const { return !m_strComment.IsEmpty(); }
  669. BOOL HasIPAddress() const { return m_dwIPAddress != 0L; }
  670. DWORD GetIPAddress() const { return m_dwIPAddress; }
  671. BOOL HasHostHeaderName() const { return !m_strHostHeaderName.IsEmpty(); }
  672. LPCTSTR GetHostHeaderName() const { return (LPCTSTR)m_strHostHeaderName; }
  673. BOOL SupportsInstances() const;
  674. BOOL HasWebProtocol() const;
  675. HRESULT ShellBrowsePath(LPCTSTR lpszPath);
  676. public:
  677. static void SetViewType(
  678. BOOL fServerView = TRUE,
  679. BOOL fAppendState = TRUE
  680. );
  681. protected:
  682. static BOOL IsInitialized();
  683. static void InitializeStrings();
  684. protected:
  685. static CString s_strFormatState;
  686. static BOOL s_fServerView;
  687. static BOOL s_fAppendState;
  688. protected:
  689. //
  690. // Result View Layout
  691. //
  692. enum
  693. {
  694. COL_DESCRIPTION,
  695. COL_STATE,
  696. COL_DOMAIN_NAME,
  697. COL_IP_ADDRESS,
  698. COL_TCP_PORT,
  699. COL_STATUS,
  700. /**/
  701. COL_TOTAL
  702. };
  703. static int rgnLabels[COL_TOTAL];
  704. static int rgnWidths[COL_TOTAL];
  705. protected:
  706. int m_nState;
  707. BOOL m_fDownLevel;
  708. BOOL m_fDeletable;
  709. BOOL m_fClusterEnabled;
  710. BOOL m_fLocalMachine;
  711. USHORT m_sPort;
  712. DWORD m_dwID;
  713. DWORD m_dwIPAddress;
  714. HRESULT m_hrError;
  715. CString m_strHostHeaderName;
  716. CString m_strComment;
  717. CString m_strMachine;
  718. CServerInfo * m_pServerInfo;
  719. };
  720. class CIISChildNode : public CIISObject
  721. /*++
  722. Class Description:
  723. Public Interface:
  724. --*/
  725. {
  726. public:
  727. CIISChildNode(
  728. IN ISMCHILDINFO * pii,
  729. IN CIISInstance * pOwner
  730. );
  731. void InitializeFromStruct(
  732. IN ISMCHILDINFO * pii
  733. );
  734. //
  735. // Access Functions
  736. //
  737. public:
  738. BOOL IsEnabledApplication() const { return m_fEnabledApplication; }
  739. virtual CIISInstance * FindOwnerInstance() { return m_pOwner; }
  740. //
  741. // Get the server info (service/server pair)
  742. // object that controls this object
  743. //
  744. virtual CServerInfo * GetServerInfo();
  745. //
  746. // Get the machine name
  747. //
  748. virtual LPCTSTR GetMachineName() const;
  749. virtual BOOL IsLocalMachine() const;
  750. //
  751. // Get the service name
  752. //
  753. virtual LPCTSTR GetServiceName() const;
  754. //
  755. // Virtual Interface
  756. //
  757. public:
  758. //
  759. // Display Context Functions
  760. //
  761. virtual int QueryBitmapIndex() const;
  762. virtual LPCTSTR GetDisplayText(
  763. OUT CString & strText
  764. ) const;
  765. virtual void GetResultDisplayInfo(
  766. IN int nCol,
  767. OUT CString & str,
  768. OUT int & nImage
  769. ) const;
  770. static void InitializeHeaders(LPHEADERCTRL pHeader);
  771. virtual void InitializeChildHeaders(LPHEADERCTRL pHeader);
  772. virtual HRESULT AddChildNode(
  773. IN OUT CIISChildNode *& pChild
  774. );
  775. virtual int Compare(
  776. IN int nCol,
  777. IN CIISObject * pObject
  778. );
  779. virtual BOOL SupportsFileSystem() const;
  780. virtual BOOL SupportsChildren() const { return TRUE; }
  781. virtual BOOL SupportsSecurityWizard() const;
  782. virtual BOOL IsBrowsable() const { return m_pOwner && m_pOwner->IsBrowsable(); }
  783. virtual BOOL IsExplorable() const { return TRUE; }
  784. virtual BOOL IsOpenable() const { return TRUE; }
  785. virtual BOOL IsConfigurable() const { return TRUE; }
  786. virtual BOOL IsMMCConfigurable() const;
  787. virtual BOOL IsDeletable() const { return TRUE; }
  788. virtual BOOL IsRenamable() const { return TRUE; }
  789. virtual HRESULT QueryErrorCode() const { return m_hrError; }
  790. virtual HRESULT AddMenuItems(
  791. IN LPCONTEXTMENUCALLBACK pContextMenuCallback
  792. );
  793. virtual HRESULT AddNextTaskpadItem(
  794. OUT MMC_TASK * pTask
  795. );
  796. virtual HRESULT Rename(
  797. IN LPCTSTR NewName
  798. );
  799. virtual HRESULT Delete();
  800. virtual HRESULT SecurityWizard();
  801. virtual HRESULT Configure(
  802. IN CWnd * pParent
  803. );
  804. virtual HRESULT ConfigureMMC(
  805. IN LPPROPERTYSHEETCALLBACK lpProvider,
  806. IN LPARAM param,
  807. IN LONG_PTR handle
  808. );
  809. virtual HRESULT RefreshData();
  810. protected:
  811. //
  812. // Result View Layout
  813. //
  814. enum
  815. {
  816. COL_ALIAS,
  817. COL_PATH,
  818. COL_STATUS,
  819. /**/
  820. COL_TOTAL
  821. };
  822. static int rgnLabels[COL_TOTAL];
  823. static int rgnWidths[COL_TOTAL];
  824. protected:
  825. BOOL m_fEnabledApplication;
  826. HRESULT m_hrError;
  827. CIISInstance * m_pOwner;
  828. };
  829. class CIISFileNode : public CIISObject
  830. /*++
  831. Class Description:
  832. Public Interface:
  833. --*/
  834. {
  835. public:
  836. CIISFileNode(
  837. IN LPCTSTR lpszAlias, // Name of current node
  838. IN DWORD dwAttributes,
  839. IN CIISInstance * pOwner,
  840. IN LPCTSTR lpszRedirect, // = NULL
  841. IN BOOL fDir = TRUE
  842. );
  843. //
  844. // Access Functions
  845. //
  846. public:
  847. BOOL IsEnabledApplication() const { return m_fEnabledApplication; }
  848. //
  849. // Get the redirected path
  850. //
  851. DWORD QueryAttributes() const { return m_dwAttributes; }
  852. BOOL IsDirectory() const;
  853. BOOL IsFile() const { return !IsDirectory(); }
  854. virtual CIISInstance * FindOwnerInstance() { return m_pOwner; }
  855. //
  856. // Get the server info (service/server pair)
  857. // object that controls this object
  858. //
  859. virtual CServerInfo * GetServerInfo();
  860. //
  861. // Get the machine name
  862. //
  863. virtual LPCTSTR GetMachineName() const;
  864. virtual BOOL IsLocalMachine() const;
  865. //
  866. // Get the service name
  867. //
  868. virtual LPCTSTR GetServiceName() const;
  869. //
  870. // Match up this file item to metabase properties
  871. //
  872. HRESULT FetchMetaInformation(
  873. IN CString & strParent,
  874. OUT BOOL * pfVirtualDirectory = NULL
  875. );
  876. //
  877. // Virtual Interface
  878. //
  879. public:
  880. //
  881. // Display Context Functions
  882. //
  883. virtual int QueryBitmapIndex() const;
  884. virtual LPCTSTR GetDisplayText(
  885. OUT CString & strText
  886. ) const;
  887. virtual void GetResultDisplayInfo(
  888. IN int nCol,
  889. OUT CString & str,
  890. OUT int & nImage
  891. ) const;
  892. static void InitializeHeaders(LPHEADERCTRL pHeader);
  893. virtual void InitializeChildHeaders(LPHEADERCTRL pHeader);
  894. virtual int Compare(int nCol, CIISObject * pObject);
  895. virtual BOOL SupportsFileSystem() const { return IsDirectory(); }
  896. virtual BOOL IsFileSystemNode() const { return TRUE; }
  897. virtual BOOL SupportsChildren() const { return IsDirectory(); }
  898. virtual BOOL SupportsSecurityWizard() const;
  899. virtual BOOL IsDeletable() const { return TRUE; }
  900. //
  901. // Let explorer handle the UI for deletion/renaming
  902. //
  903. virtual BOOL HandleUI() const { return FALSE; }
  904. virtual BOOL IsRenamable() const { return TRUE; }
  905. virtual BOOL IsConfigurable() const { return TRUE; }
  906. virtual BOOL IsMMCConfigurable() const { return m_pOwner->IsMMCConfigurable(); }
  907. virtual HRESULT Configure(
  908. IN CWnd * pParent
  909. );
  910. virtual HRESULT ConfigureMMC(
  911. IN LPPROPERTYSHEETCALLBACK lpProvider,
  912. IN LPARAM param,
  913. IN LONG_PTR handle
  914. );
  915. virtual HRESULT AddChildNode(
  916. CIISChildNode *& pChild
  917. );
  918. virtual HRESULT RefreshData();
  919. virtual BOOL IsExplorable() const { return IsDirectory(); }
  920. virtual BOOL IsOpenable() const { return TRUE; }
  921. virtual BOOL IsBrowsable() const { return m_pOwner && m_pOwner->IsBrowsable(); }
  922. //
  923. // Get parent CIISObject
  924. //
  925. virtual CIISObject * GetParentObject() const;
  926. //
  927. // Add menu items
  928. //
  929. virtual HRESULT AddMenuItems(
  930. IN LPCONTEXTMENUCALLBACK pContextMenuCallback
  931. );
  932. virtual HRESULT AddNextTaskpadItem(
  933. OUT MMC_TASK * pTask
  934. );
  935. virtual HRESULT Rename(
  936. IN LPCTSTR NewName
  937. );
  938. virtual HRESULT Delete();
  939. virtual HRESULT SecurityWizard();
  940. BOOL IsDir() const { return m_fDir; }
  941. virtual BOOL IsLeafNode() const { return !IsDir(); }
  942. protected:
  943. //
  944. // Result View Layout
  945. //
  946. enum
  947. {
  948. COL_ALIAS,
  949. COL_PATH,
  950. COL_STATUS,
  951. /**/
  952. COL_TOTAL
  953. };
  954. static int rgnLabels[COL_TOTAL];
  955. static int rgnWidths[COL_TOTAL];
  956. protected:
  957. BOOL m_fDir;
  958. BOOL m_fEnabledApplication;
  959. DWORD m_dwAttributes;
  960. CIISInstance * m_pOwner;
  961. };
  962. //
  963. // Inline Expansion
  964. //
  965. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  966. inline void CIISObject::SetScopeHandle(
  967. IN HSCOPEITEM hScopeItem,
  968. IN BOOL fIsParentScope
  969. )
  970. {
  971. ASSERT(m_hScopeItem == NULL);
  972. m_hScopeItem = hScopeItem;
  973. m_fIsParentScope = fIsParentScope;
  974. }
  975. inline /* static */ void CIISObject::AttachScopeView(
  976. IN LPCONSOLENAMESPACE lpcnsScopeView
  977. )
  978. {
  979. ASSERT(lpcnsScopeView != NULL);
  980. s_lpcnsScopeView = lpcnsScopeView;
  981. }
  982. inline /* static */ LPCONSOLENAMESPACE CIISObject::GetScopeView()
  983. {
  984. ASSERT(s_lpcnsScopeView != NULL);
  985. return s_lpcnsScopeView;
  986. }
  987. inline /* virtual */ HRESULT CIISObject::ChangeState(IN int nNewState)
  988. {
  989. TRACEEOLID("Must be implemented in the derived class");
  990. ASSERT(FALSE);
  991. return CError::HResult(ERROR_INVALID_FUNCTION);
  992. }
  993. inline /* virtual */ HRESULT CIISObject::Configure(IN CWnd * pParent)
  994. {
  995. TRACEEOLID("Must be implemented in the derived class");
  996. ASSERT(FALSE);
  997. return CError::HResult(ERROR_INVALID_FUNCTION);
  998. }
  999. inline /* virtual */ HRESULT CIISObject::ConfigureMMC(
  1000. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1001. IN LPARAM param,
  1002. IN LONG_PTR handle
  1003. )
  1004. {
  1005. TRACEEOLID("Must be implemented in the derived class");
  1006. ASSERT(FALSE);
  1007. return CError::HResult(ERROR_INVALID_FUNCTION);
  1008. }
  1009. inline /* virtual */ HRESULT CIISObject::RefreshData()
  1010. {
  1011. TRACEEOLID("Must be implemented in the derived class");
  1012. ASSERT(FALSE);
  1013. return CError::HResult(ERROR_INVALID_FUNCTION);
  1014. }
  1015. inline /* virtual */ HRESULT CIISObject::Delete()
  1016. {
  1017. TRACEEOLID("Must be implemented in the derived class");
  1018. ASSERT(FALSE);
  1019. return CError::HResult(ERROR_INVALID_FUNCTION);
  1020. }
  1021. inline /* virtual */ HRESULT CIISObject::SecurityWizard()
  1022. {
  1023. TRACEEOLID("Must be implemented in the derived class");
  1024. ASSERT(FALSE);
  1025. return CError::HResult(ERROR_INVALID_FUNCTION);
  1026. }
  1027. inline /* virtual */ int CIISObject::Compare(int nCol, CIISObject * pObject)
  1028. {
  1029. TRACEEOLID("Must be implemented in the derived class");
  1030. ASSERT(FALSE);
  1031. return 0;
  1032. }
  1033. inline /* static */ void CIISObject::InitializeHeaders(IN LPHEADERCTRL pHeader)
  1034. {
  1035. TRACEEOLID("Must be implemented in the derived class");
  1036. ASSERT(FALSE);
  1037. }
  1038. inline /* virtual */ void CIISObject::InitializeChildHeaders(
  1039. IN LPHEADERCTRL pHeader
  1040. )
  1041. {
  1042. TRACEEOLID("Must be implemented in the derived class");
  1043. ASSERT(FALSE);
  1044. }
  1045. inline /* virtual */ HRESULT CIISObject::AddChildNode(
  1046. IN OUT CIISChildNode *& pChild
  1047. )
  1048. {
  1049. TRACEEOLID("Must be implemented in the derived class");
  1050. ASSERT(FALSE);
  1051. return CError::HResult(ERROR_INVALID_FUNCTION);
  1052. }
  1053. inline /* virtual */ void CIISObject::CleanChildren()
  1054. {
  1055. time(&m_tmChildrenExpanded);
  1056. }
  1057. inline /* virtual */ void CIISObject::DirtyChildren()
  1058. {
  1059. m_tmChildrenExpanded = 0L;
  1060. }
  1061. inline /* virtual */ HRESULT CIISObject::ExpandChildren(HSCOPEITEM pParent)
  1062. {
  1063. TRACEEOLID("Must be implemented in the derived class");
  1064. ASSERT(FALSE);
  1065. return CError::HResult(ERROR_INVALID_FUNCTION);
  1066. }
  1067. inline /* virtual */ HRESULT CIISObject::Rename(IN LPCTSTR NewName)
  1068. {
  1069. TRACEEOLID("Must be implemented in the derived class");
  1070. ASSERT(FALSE);
  1071. return CError::HResult(ERROR_INVALID_FUNCTION);
  1072. }
  1073. inline /* virtual */ LPCTSTR CIISObject::GetStateText() const
  1074. {
  1075. return CIISObject::s_strUnknown;
  1076. }
  1077. inline /* virtual */ void CIISObject::GetResultDisplayInfo(
  1078. IN int nCol,
  1079. OUT CString & str,
  1080. OUT int & nImage
  1081. ) const
  1082. {
  1083. ASSERT(nCol == 0);
  1084. nImage = QueryBitmapIndex();
  1085. GetDisplayText(str);
  1086. }
  1087. inline DWORD CIISInstance::QueryServiceID() const
  1088. {
  1089. ASSERT(m_pServerInfo != NULL);
  1090. return m_pServerInfo->QueryServiceID();
  1091. }
  1092. inline BOOL CIISInstance::operator ==(CIISInstance & target)
  1093. {
  1094. return QueryServiceID() == target.QueryServiceID()
  1095. && QueryID() == target.QueryID()
  1096. && GetServerInfo() == target.GetServerInfo();
  1097. }
  1098. inline /* virtual */ BOOL CIISInstance::IsControllable() const
  1099. {
  1100. ASSERT(m_pServerInfo != NULL);
  1101. return m_pServerInfo->CanControlService();
  1102. }
  1103. inline /* virtual */ BOOL CIISInstance::IsPausable() const
  1104. {
  1105. ASSERT(m_pServerInfo != NULL);
  1106. return m_pServerInfo->CanPauseService()
  1107. && (IsRunning() || IsPaused());
  1108. }
  1109. inline /* virtual */ BOOL CIISInstance::IsConfigurable() const
  1110. {
  1111. ASSERT(m_pServerInfo != NULL);
  1112. return m_pServerInfo->IsConfigurable();
  1113. }
  1114. inline /*virtual */ BOOL CIISInstance::IsMMCConfigurable() const
  1115. {
  1116. ASSERT(m_pServerInfo != NULL);
  1117. return m_pServerInfo->SupportsMMC();
  1118. }
  1119. inline /* virtual */ BOOL CIISInstance::IsAccessible() const
  1120. {
  1121. return IsDownLevel() || (QueryErrorCode() == ERROR_SUCCESS);
  1122. }
  1123. inline /* virtual */ BOOL CIISInstance::IsDeletable() const
  1124. {
  1125. return !IsDownLevel() && m_fDeletable;
  1126. }
  1127. inline /* virtual */ BOOL CIISInstance::IsClusterEnabled() const
  1128. {
  1129. return !IsDownLevel() && m_fClusterEnabled;
  1130. }
  1131. inline /* virtual */ BOOL CIISInstance::SupportsFileSystem() const
  1132. {
  1133. ASSERT(m_pServerInfo != NULL);
  1134. return m_pServerInfo->SupportsFileSystem();
  1135. }
  1136. inline /* virtual */ BOOL CIISInstance::SupportsSecurityWizard() const
  1137. {
  1138. ASSERT(m_pServerInfo != NULL);
  1139. return m_pServerInfo->SupportsSecurityWizard();
  1140. }
  1141. inline /* virtual */ BOOL CIISInstance::SupportsChildren() const
  1142. {
  1143. ASSERT(m_pServerInfo != NULL);
  1144. return !IsDownLevel() && m_pServerInfo->SupportsChildren();
  1145. }
  1146. inline /* virtual */ BOOL CIISInstance::IsLeafNode() const
  1147. {
  1148. return !SupportsFileSystem() && !SupportsChildren();
  1149. }
  1150. inline /* virtual */ LPCTSTR CIISInstance::GetServiceName() const
  1151. {
  1152. ASSERT(m_pServerInfo != NULL);
  1153. return m_pServerInfo->GetServiceName();
  1154. }
  1155. inline /* virtual */ BOOL CIISInstance::IsTerminalPoint(
  1156. IN BOOL fFullMetaPath
  1157. ) const
  1158. {
  1159. //
  1160. // Metabase paths terminate at an instance
  1161. //
  1162. return TRUE;
  1163. }
  1164. inline /* virtual */ LPCTSTR CIISInstance::QueryNodeName(BOOL fMetabasePath) const
  1165. {
  1166. return fMetabasePath ? (LPCTSTR)m_strNodeName : g_cszRoot;
  1167. }
  1168. inline BOOL CIISInstance::SupportsInstances() const
  1169. {
  1170. return !IsDownLevel() && m_pServerInfo && m_pServerInfo->SupportsInstances();
  1171. }
  1172. inline BOOL CIISInstance::HasWebProtocol() const
  1173. {
  1174. return !IsDownLevel() && m_pServerInfo && m_pServerInfo->HasWebProtocol();
  1175. }
  1176. inline /* static */ void CIISInstance::SetViewType(
  1177. BOOL fServerView,
  1178. BOOL fAppendState
  1179. )
  1180. {
  1181. CIISInstance::s_fServerView = fServerView;
  1182. CIISInstance::s_fAppendState = fAppendState;
  1183. }
  1184. inline /* static */ BOOL CIISInstance::IsInitialized()
  1185. {
  1186. return !CIISInstance::s_strFormatState.IsEmpty();
  1187. }
  1188. inline /* virtual */ CServerInfo * CIISChildNode::GetServerInfo()
  1189. {
  1190. ASSERT(m_pOwner != NULL);
  1191. return m_pOwner->GetServerInfo();
  1192. }
  1193. inline /* virtual */ LPCTSTR CIISChildNode::GetMachineName() const
  1194. {
  1195. ASSERT(m_pOwner != NULL);
  1196. return m_pOwner->GetMachineName();
  1197. }
  1198. inline /* virtual */ BOOL CIISChildNode::IsLocalMachine() const
  1199. {
  1200. ASSERT(m_pOwner != NULL);
  1201. return m_pOwner->IsLocalMachine();
  1202. }
  1203. inline /* virtual */ LPCTSTR CIISChildNode::GetServiceName() const
  1204. {
  1205. ASSERT(m_pOwner != NULL);
  1206. return m_pOwner->GetServiceName();
  1207. }
  1208. inline /* virtual */ BOOL CIISChildNode::SupportsFileSystem() const
  1209. {
  1210. ASSERT(m_pOwner != NULL);
  1211. return !IsRedirected() && m_pOwner->SupportsFileSystem();
  1212. }
  1213. inline /* virtual */ BOOL CIISChildNode::SupportsSecurityWizard() const
  1214. {
  1215. ASSERT(m_pOwner != NULL);
  1216. return m_pOwner->SupportsSecurityWizard();
  1217. }
  1218. inline /* virtual */ BOOL CIISChildNode::IsMMCConfigurable() const
  1219. {
  1220. return m_pOwner->IsMMCConfigurable();
  1221. }
  1222. inline BOOL CIISFileNode::IsDirectory() const
  1223. {
  1224. return (m_dwAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;
  1225. }
  1226. inline /* virtual */ CServerInfo * CIISFileNode::GetServerInfo()
  1227. {
  1228. ASSERT(m_pOwner != NULL);
  1229. return m_pOwner->GetServerInfo();
  1230. }
  1231. inline /* virtual */ BOOL CIISFileNode::SupportsSecurityWizard() const
  1232. {
  1233. ASSERT(m_pOwner != NULL);
  1234. return IsDirectory() && m_pOwner->SupportsSecurityWizard();
  1235. }
  1236. inline /* virtual */ LPCTSTR CIISFileNode::GetMachineName() const
  1237. {
  1238. ASSERT(m_pOwner != NULL);
  1239. return m_pOwner->GetMachineName();
  1240. }
  1241. inline /* virtual */ BOOL CIISFileNode::IsLocalMachine() const
  1242. {
  1243. ASSERT(m_pOwner != NULL);
  1244. return m_pOwner->IsLocalMachine();
  1245. }
  1246. inline /* virtual */ LPCTSTR CIISFileNode::GetServiceName() const
  1247. {
  1248. ASSERT(m_pOwner != NULL);
  1249. return m_pOwner->GetServiceName();
  1250. }
  1251. #endif // _IIS_OBJ_H