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.

2163 lines
52 KiB

  1. /*++
  2. Copyright (c) 1994-2000 Microsoft Corporation
  3. Module Name :
  4. iisobj.h
  5. Abstract:
  6. IIS Object definitions
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Sergei Antonov (sergeia)
  10. Project:
  11. Internet Services Manager
  12. Revision History:
  13. --*/
  14. #ifndef __IISOBJ_H__
  15. #define __IISOBJ_H__
  16. #include "scache.h"
  17. #include "guids.h"
  18. #define RES_TASKPAD_NEWVROOT _T("/img\\newvroot.gif")
  19. #define RES_TASKPAD_NEWSITE _T("/img\\newsite.gif")
  20. #define RES_TASKPAD_SECWIZ _T("/img\\secwiz.gif")
  21. //
  22. // Forward Definitions
  23. //
  24. class CIISRoot;
  25. class CIISMachine;
  26. class CIISService;
  27. class CIISFileName;
  28. class CAppPoolsContainer;
  29. class CIISObject : public CSnapInItemImpl<CIISObject>
  30. /*++
  31. Class Description:
  32. Base IIS object
  33. Public Interface:
  34. --*/
  35. {
  36. protected:
  37. //
  38. // Menu Commands, listed in toolbar order.
  39. //
  40. // IMPORTANT! -- this must be kept in sync with MenuItemDefs
  41. // in iisobj.cpp
  42. //
  43. enum
  44. {
  45. IDM_INVALID, /* invalid command ID */
  46. IDM_CONNECT,
  47. IDM_DISCOVER,
  48. IDM_START,
  49. IDM_STOP,
  50. IDM_PAUSE,
  51. /**/
  52. IDM_TOOLBAR /* Toolbar commands start here */
  53. };
  54. //
  55. // Additional menu commands that do not show up in the toolbar
  56. //
  57. enum
  58. {
  59. IDM_EXPLORE = IDM_TOOLBAR,
  60. IDM_OPEN,
  61. IDM_BROWSE,
  62. IDM_RECYCLE,
  63. #if defined(_DEBUG) || DBG
  64. IDM_IMPERSONATE,
  65. IDM_REMOVE_IMPERSONATION,
  66. #endif // _DEBUG
  67. IDM_CONFIGURE,
  68. IDM_DISCONNECT,
  69. IDM_METABACKREST,
  70. IDM_SHUTDOWN,
  71. IDM_NEW_VROOT,
  72. IDM_NEW_INSTANCE,
  73. IDM_NEW_FTP_SITE,
  74. IDM_NEW_FTP_VDIR,
  75. IDM_NEW_WEB_SITE,
  76. IDM_NEW_WEB_VDIR,
  77. IDM_NEW_APP_POOL,
  78. IDM_VIEW_TASKPAD,
  79. IDM_TASK_SECURITY_WIZARD,
  80. //
  81. // Don't move this last one -- it will be used
  82. // as an offset for service specific new instance
  83. // commands
  84. //
  85. IDM_NEW_EX_INSTANCE
  86. };
  87. protected:
  88. //
  89. // Sort Weights for CIISObject derived classes
  90. //
  91. enum
  92. {
  93. SW_ROOT,
  94. SW_MACHINE,
  95. SW_APP_POOLS,
  96. SW_SERVICE,
  97. SW_SITE,
  98. SW_VDIR,
  99. SW_DIR,
  100. SW_FILE,
  101. SW_APP_POOL,
  102. };
  103. //
  104. // Statics
  105. //
  106. public:
  107. static HRESULT Initialize();
  108. static HRESULT Destroy();
  109. static HRESULT SetImageList(LPIMAGELIST lpImageList);
  110. protected:
  111. static HBITMAP _hImage16;
  112. static HBITMAP _hImage32;
  113. static HBITMAP _hToolBar;
  114. static CComBSTR _bstrResult;
  115. //
  116. // Bitmap indices
  117. //
  118. protected:
  119. enum
  120. {
  121. iIISRoot,
  122. iLocalMachine,
  123. iStopped,
  124. iPaused,
  125. iStarted,
  126. iUnknown,
  127. iError,
  128. iFolder,
  129. iFile,
  130. iBlank,
  131. iMachine,
  132. iApplication,
  133. iFTPSite,
  134. iFTPDir,
  135. iWWWSite,
  136. iWWWDir,
  137. iErrorMachine,
  138. };
  139. protected:
  140. //
  141. // Menu item definition that uses resource definitions, and
  142. // provides some additional information for taskpads. This is replacement
  143. // for MMC structure CONTEXTMENUITEM defined in mmc.h
  144. //
  145. typedef struct tagCONTEXTMENUITEM_RC
  146. {
  147. UINT nNameID;
  148. UINT nStatusID;
  149. UINT nDescriptionID;
  150. LONG lCmdID;
  151. LONG lInsertionPointID;
  152. LONG fSpecialFlags;
  153. LPCTSTR lpszMouseOverBitmap;
  154. LPCTSTR lpszMouseOffBitmap;
  155. }
  156. CONTEXTMENUITEM_RC;
  157. static CONTEXTMENUITEM_RC _menuItemDefs[];
  158. static MMCBUTTON _SnapinButtons[];
  159. static UINT _SnapinButtonIDs[];
  160. static BOOL _fToolbarResolved;
  161. //
  162. // Constructor/Destructor
  163. //
  164. public:
  165. CIISObject();
  166. virtual ~CIISObject();
  167. //
  168. // Interface:
  169. //
  170. public:
  171. virtual void * GetNodeType()
  172. {
  173. ASSERT(FALSE);
  174. return (void *)&cInternetRootNode;
  175. }
  176. void * GetDisplayName()
  177. {
  178. return (void *)QueryDisplayName();
  179. }
  180. STDMETHOD(GetScopePaneInfo)(LPSCOPEDATAITEM lpScopeDataItem);
  181. STDMETHOD(GetResultPaneInfo)(LPRESULTDATAITEM lpResultDataItem);
  182. STDMETHOD(GetResultViewType)(LPOLESTR *lplpViewType, long * lpViewOptions);
  183. virtual LPOLESTR GetResultPaneColInfo(int nCol);
  184. virtual void InitializeChildHeaders(LPHEADERCTRL lpHeader) {}
  185. virtual HRESULT SetToolBarStates();
  186. virtual HRESULT RenameItem(LPOLESTR new_name) {return S_OK;}
  187. STDMETHOD (FillData)(CLIPFORMAT cf, LPSTREAM pStream);
  188. STDMETHOD (FillCustomData)(CLIPFORMAT cf, LPSTREAM pStream);
  189. virtual LPOLESTR QueryDisplayName() = 0;
  190. virtual int QueryImage() const = 0;
  191. //
  192. // Comparison methods
  193. //
  194. virtual int CompareScopeItem(CIISObject * pObject);
  195. virtual int CompareResultPaneItem(CIISObject * pObject, int nCol);
  196. //
  197. // IExtendContextMenu items
  198. //
  199. STDMETHOD(Notify)(
  200. IN MMC_NOTIFY_TYPE event,
  201. IN LPARAM arg,
  202. IN LPARAM param,
  203. IN IComponentData * pComponentData,
  204. IN IComponent * pComponent,
  205. IN DATA_OBJECT_TYPES type
  206. );
  207. STDMETHOD(AddMenuItems)(
  208. IN LPCONTEXTMENUCALLBACK piCallback,
  209. IN long * pInsertionAllowed,
  210. IN DATA_OBJECT_TYPES type
  211. );
  212. STDMETHOD(Command)(
  213. IN long lCommandID,
  214. IN CSnapInObjectRootBase * pObj,
  215. IN DATA_OBJECT_TYPES type
  216. );
  217. //
  218. // IExtendControlbar methods
  219. //
  220. STDMETHOD(SetControlbar)(
  221. IN LPCONTROLBAR lpControlbar,
  222. IN LPEXTENDCONTROLBAR lpExtendControlbar
  223. );
  224. STDMETHOD(ControlbarNotify)(MMC_NOTIFY_TYPE event, LPARAM arg, LPARAM param);
  225. //
  226. // IExtendPropertySheet methods
  227. //
  228. STDMETHOD(CreatePropertyPages)(
  229. IN LPPROPERTYSHEETCALLBACK lpProvider,
  230. IN LONG_PTR handle,
  231. IN IUnknown * pUnk,
  232. IN DATA_OBJECT_TYPES type
  233. );
  234. STDMETHOD(QueryPagesFor)(DATA_OBJECT_TYPES type);
  235. //
  236. // Access
  237. //
  238. public:
  239. //
  240. // Type Functions
  241. //
  242. virtual BOOL IsControllable() const { return FALSE; }
  243. virtual BOOL IsPausable() const { return FALSE; }
  244. virtual BOOL IsConfigurable() const { return FALSE; }
  245. virtual BOOL IsDeletable() const { return FALSE; }
  246. virtual BOOL IsRefreshable() const { return FALSE; }
  247. virtual BOOL IsConnectable() const { return FALSE; }
  248. virtual BOOL IsDisconnectable() const { return FALSE; }
  249. virtual BOOL IsLeafNode() const { return FALSE; }
  250. virtual BOOL HasFileSystemFiles() const { return FALSE; }
  251. virtual LPCTSTR GetKeyType(LPCTSTR path = NULL) const { return _T(""); }
  252. //
  253. // State Functions
  254. //
  255. virtual BOOL IsRunning() const { return FALSE; }
  256. virtual BOOL IsStopped() const { return FALSE; }
  257. virtual BOOL IsPaused() const { return FALSE; }
  258. virtual BOOL IsRenamable() const { return FALSE; }
  259. virtual BOOL IsClonable() const { return FALSE; }
  260. virtual BOOL IsBrowsable() const { return FALSE; }
  261. virtual BOOL IsExplorable() const { return FALSE; }
  262. virtual BOOL IsOpenable() const { return FALSE; }
  263. virtual BOOL HasResultItems() const { return FALSE; }
  264. //
  265. // Assumed Functions
  266. //
  267. public:
  268. BOOL IsStartable() const { return IsControllable() && !IsRunning(); }
  269. BOOL IsStoppable() const { return IsControllable() && (IsRunning() || IsPaused() ); }
  270. public:
  271. BOOL IsExpanded() const;
  272. CIISObject * FindIdenticalScopePaneItem(CIISObject * pObject);
  273. HSCOPEITEM QueryScopeItem() const { return m_hScopeItem; }
  274. HSCOPEITEM QueryResultItem() const { return m_hResultItem; }
  275. HRESULT AskForAndAddMachine();
  276. HRESULT AddToScopePane(
  277. HSCOPEITEM hRelativeID,
  278. BOOL fChild = TRUE,
  279. BOOL fNext = TRUE,
  280. BOOL fIsParent = TRUE
  281. );
  282. HRESULT AddToScopePaneSorted(HSCOPEITEM hParent, BOOL fIsParent = TRUE);
  283. HRESULT RefreshDisplay();
  284. HRESULT SetCookie();
  285. void SetScopeItem(HSCOPEITEM hItem)
  286. {
  287. ASSERT(m_hScopeItem == 0);
  288. m_hScopeItem = hItem;
  289. }
  290. HRESULT SelectScopeItem();
  291. virtual HRESULT RemoveScopeItem();
  292. void SetResultItem(HRESULTITEM hItem)
  293. {
  294. ASSERT(m_hResultItem == 0);
  295. m_hResultItem = hItem;
  296. }
  297. virtual int QuerySortWeight() const = 0;
  298. IConsoleNameSpace * GetConsoleNameSpace() {return _lpConsoleNameSpace;}
  299. IConsole * GetConsole() {return _lpConsole;}
  300. virtual HRESULT OnPropertyChange(BOOL fScope, IResultData * pResult) { return S_OK; }
  301. //
  302. // Event Handlers
  303. //
  304. protected:
  305. virtual HRESULT EnumerateResultPane(BOOL fExpand, IHeaderCtrl * lpHeader,
  306. IResultData * lpResultData);
  307. virtual HRESULT CleanResult(IResultData * pResultData)
  308. {
  309. return S_OK;
  310. }
  311. virtual HRESULT EnumerateScopePane(HSCOPEITEM hParent) { return S_OK; }
  312. virtual HRESULT DeleteChildObjects(HSCOPEITEM hParent);
  313. virtual HRESULT RemoveChildren(HSCOPEITEM hParent);
  314. virtual HRESULT Refresh(BOOL fReEnumerate = TRUE) { return S_OK; }
  315. virtual HRESULT AddImages(LPIMAGELIST lpImageList);
  316. virtual HRESULT SetStandardVerbs(LPCONSOLEVERB lpConsoleVerb);
  317. virtual CIISRoot * GetRoot();
  318. virtual HRESULT DeleteNode(IResultData * pResult);
  319. virtual HRESULT ChangeVisibleColumns(MMC_VISIBLE_COLUMNS * pCol);
  320. static HRESULT AddMMCPage(
  321. IN LPPROPERTYSHEETCALLBACK lpProvider,
  322. IN CPropertyPage * pPage
  323. );
  324. protected:
  325. //
  326. // Add Menu Command helpers
  327. //
  328. static HRESULT AddMenuSeparator(
  329. IN LPCONTEXTMENUCALLBACK lpContextMenuCallback,
  330. IN LONG lInsertionPointID = CCM_INSERTIONPOINTID_PRIMARY_TOP
  331. );
  332. static HRESULT AddMenuItemByCommand(
  333. IN LPCONTEXTMENUCALLBACK lpContextMenuCallback,
  334. IN LONG lCmdID,
  335. IN LONG fFlags = 0
  336. );
  337. //
  338. // Create result view helper
  339. //
  340. static void BuildResultView(
  341. IN LPHEADERCTRL pHeader,
  342. IN int cColumns,
  343. IN int * pnIDS,
  344. IN int * pnWidths
  345. );
  346. //
  347. // BUGBUG: should be protected
  348. public:
  349. //
  350. // Toolbar helper
  351. //
  352. static HRESULT __SetControlbar(
  353. LPCONTROLBAR lpControlBar, LPEXTENDCONTROLBAR lpExtendControlBar);
  354. protected:
  355. HSCOPEITEM m_hScopeItem;
  356. HRESULTITEM m_hResultItem;
  357. BOOL m_fSkipEnumResult;
  358. public:
  359. static const GUID * m_NODETYPE;
  360. static const OLECHAR * m_SZNODETYPE;
  361. static const OLECHAR * m_SZDISPLAY_NAME;
  362. static const CLSID * m_SNAPIN_CLASSID;
  363. BOOL m_fIsExtension;
  364. public:
  365. static HRESULT AttachScopeView(LPUNKNOWN lpUnknown);
  366. static CWnd * GetMainWindow();
  367. protected:
  368. static CComPtr<IControlbar> _lpControlBar;
  369. static CComPtr<IToolbar> _lpToolBar;
  370. static CComPtr<IConsoleNameSpace> _lpConsoleNameSpace;
  371. static CComPtr<IConsole> _lpConsole;
  372. static CComBSTR _bstrLocalHost;
  373. public:
  374. static CLIPFORMAT m_CCF_MachineName;
  375. static CLIPFORMAT m_CCF_MyComputMachineName;
  376. static CLIPFORMAT m_CCF_Service;
  377. static CLIPFORMAT m_CCF_Instance;
  378. static CLIPFORMAT m_CCF_ParentPath;
  379. static CLIPFORMAT m_CCF_Node;
  380. static CLIPFORMAT m_CCF_MetaPath;
  381. static void Init()
  382. {
  383. m_CCF_MachineName = (CLIPFORMAT)RegisterClipboardFormat(ISM_SNAPIN_MACHINE_NAME);
  384. m_CCF_MyComputMachineName = (CLIPFORMAT)RegisterClipboardFormat(MYCOMPUT_MACHINE_NAME);
  385. m_CCF_Service = (CLIPFORMAT)RegisterClipboardFormat(ISM_SNAPIN_SERVICE);
  386. m_CCF_Instance = (CLIPFORMAT)RegisterClipboardFormat(ISM_SNAPIN_INSTANCE);
  387. m_CCF_ParentPath = (CLIPFORMAT)RegisterClipboardFormat(ISM_SNAPIN_PARENT_PATH);
  388. m_CCF_Node = (CLIPFORMAT)RegisterClipboardFormat(ISM_SNAPIN_NODE);
  389. m_CCF_MetaPath = (CLIPFORMAT)RegisterClipboardFormat(ISM_SNAPIN_META_PATH);
  390. }
  391. };
  392. _declspec( selectany ) CLIPFORMAT CIISObject::m_CCF_MachineName = 0;
  393. _declspec( selectany ) CLIPFORMAT CIISObject::m_CCF_MyComputMachineName = 0;
  394. _declspec( selectany ) CLIPFORMAT CIISObject::m_CCF_Service = 0;
  395. _declspec( selectany ) CLIPFORMAT CIISObject::m_CCF_Instance = 0;
  396. _declspec( selectany ) CLIPFORMAT CIISObject::m_CCF_ParentPath = 0;
  397. _declspec( selectany ) CLIPFORMAT CIISObject::m_CCF_Node = 0;
  398. _declspec( selectany ) CLIPFORMAT CIISObject::m_CCF_MetaPath = 0;
  399. class CIISRoot : public CIISObject
  400. {
  401. //
  402. // Constructor/Destructor
  403. //
  404. public:
  405. CIISRoot();
  406. virtual ~CIISRoot();
  407. //
  408. // Interface
  409. //
  410. public:
  411. virtual void InitializeChildHeaders(LPHEADERCTRL lpHeader);
  412. virtual HRESULT EnumerateScopePane(HSCOPEITEM hParent);
  413. virtual LPOLESTR GetResultPaneColInfo(int nCol);
  414. virtual HRESULT DeleteChildObjects(HSCOPEITEM hParent);
  415. //
  416. // Access
  417. //
  418. public:
  419. virtual BOOL IsConnectable() const
  420. {
  421. return !IsExtension();
  422. }
  423. virtual LPOLESTR QueryDisplayName() { return m_bstrDisplayName; }
  424. virtual int QueryImage() const { return iIISRoot; }
  425. virtual int QuerySortWeight() const { return SW_ROOT; }
  426. virtual void * GetNodeType()
  427. {
  428. return (void *)&cInternetRootNode;
  429. }
  430. STDMETHOD (FillCustomData)(CLIPFORMAT cf, LPSTREAM pStream);
  431. BOOL IsExtension() const
  432. {
  433. return m_fIsExtension;
  434. }
  435. public:
  436. CIISServerCache m_scServers;
  437. HRESULT InitAsExtension(IDataObject * pDataObject);
  438. HRESULT ResetAsExtension();
  439. protected:
  440. virtual CIISRoot * GetRoot() { return this; }
  441. HRESULT EnumerateScopePaneExt(HSCOPEITEM hParent);
  442. protected:
  443. CComBSTR m_bstrDisplayName;
  444. static OLECHAR * m_SZNODETYPE;
  445. // we are using this machine name and pointer
  446. // only for extension case
  447. CIISMachine * m_pMachine;
  448. CString m_ExtMachineName;
  449. BOOL m_fRootAdded;
  450. };
  451. class CIISMBNode : public CIISObject
  452. /*++
  453. Class Description:
  454. Metabase node class
  455. Public Interface:
  456. --*/
  457. {
  458. //
  459. // Constructor/Destructor
  460. //
  461. public:
  462. CIISMBNode(CIISMachine * pOwner, LPCTSTR szNode);
  463. ~CIISMBNode();
  464. //
  465. // Access
  466. //
  467. public:
  468. LPOLESTR QueryNodeName() const { return m_bstrNode; }
  469. CComBSTR & GetNodeName() { return m_bstrNode; }
  470. virtual LPOLESTR QueryMachineName() const;
  471. virtual CComAuthInfo * QueryAuthInfo();
  472. virtual CMetaInterface * QueryInterface();
  473. virtual BOOL IsLocal() const;
  474. virtual BOOL HasInterface() const;
  475. virtual BOOL HasResultItems() const
  476. {
  477. return !m_ResultItems.IsEmpty();
  478. }
  479. virtual HRESULT CreateInterface(BOOL fShowError);
  480. virtual HRESULT AssureInterfaceCreated(BOOL fShowError);
  481. virtual void SetInterfaceError(HRESULT hr);
  482. BOOL OnLostInterface(CError & err);
  483. BOOL IsLostInterface(CError & err) const;
  484. BOOL IsAdministrator() const;
  485. WORD QueryMajorVersion() const;
  486. WORD QueryMinorVersion() const;
  487. CIISMachine * GetOwner() {return m_pOwner;}
  488. //
  489. // Interface:
  490. //
  491. public:
  492. void DisplayError(CError & err) const;
  493. virtual BOOL IsRefreshable() const { return TRUE; }
  494. virtual HRESULT RefreshData() { return S_OK; }
  495. virtual HRESULT Refresh(BOOL fReEnumerate = TRUE);
  496. virtual HRESULT RenameItem(LPOLESTR new_name)
  497. {
  498. ASSERT(IsRenamable());
  499. return S_OK;
  500. }
  501. STDMETHOD (FillCustomData)(CLIPFORMAT cf, LPSTREAM pStream);
  502. virtual void * GetNodeType()
  503. {
  504. // We really shouldn't be here
  505. return CIISObject::GetNodeType();
  506. }
  507. virtual HRESULT OnPropertyChange(BOOL fScope, IResultData * pResult);
  508. public:
  509. //
  510. // Build metabase path
  511. //
  512. virtual HRESULT BuildMetaPath(CComBSTR & bstrPath) const;
  513. //
  514. // Build URL
  515. //
  516. virtual HRESULT BuildURL(CComBSTR & bstrURL) const;
  517. CIISMBNode * GetParentNode() const;
  518. HRESULT RemoveResultNode(CIISMBNode * pNode, IResultData * pResult);
  519. protected:
  520. HRESULT EnumerateResultPane_(
  521. BOOL fExpand,
  522. IHeaderCtrl * lpHeader,
  523. IResultData * lpResultData,
  524. CIISService * pService
  525. );
  526. virtual HRESULT CleanResult(IResultData * pResultData);
  527. HRESULT CreateEnumerator(CMetaEnumerator *& pEnum);
  528. HRESULT EnumerateVDirs(HSCOPEITEM hParent, CIISService * pService);
  529. HRESULT EnumerateWebDirs(HSCOPEITEM hParent, CIISService * pService);
  530. HRESULT AddFTPSite(
  531. const CSnapInObjectRootBase * pObj,
  532. DATA_OBJECT_TYPES type,
  533. DWORD * inst
  534. );
  535. HRESULT AddFTPVDir(
  536. const CSnapInObjectRootBase * pObj,
  537. DATA_OBJECT_TYPES type,
  538. CString& alias
  539. );
  540. HRESULT AddWebSite(
  541. const CSnapInObjectRootBase * pObj,
  542. DATA_OBJECT_TYPES type,
  543. DWORD * inst
  544. );
  545. HRESULT AddWebVDir(
  546. const CSnapInObjectRootBase * pObj,
  547. DATA_OBJECT_TYPES type,
  548. CString& alias
  549. );
  550. HRESULT AddAppPool(
  551. const CSnapInObjectRootBase * pObj,
  552. DATA_OBJECT_TYPES type,
  553. CAppPoolsContainer * pCont,
  554. CString& name
  555. );
  556. BOOL GetPhysicalPath(
  557. LPCTSTR metaPath,
  558. CString & alias,
  559. CString &physPath);
  560. protected:
  561. STDMETHOD(GetResultViewType)(LPOLESTR *lplpViewType, long * lpViewOptions);
  562. STDMETHOD(Command)(
  563. long lCommandID,
  564. CSnapInObjectRootBase * pObj,
  565. DATA_OBJECT_TYPES type
  566. );
  567. virtual HRESULT DeleteNode(IResultData * pResult);
  568. //
  569. // Helpers
  570. //
  571. protected:
  572. void SetErrorOverrides(CError & err, BOOL fShort = FALSE) const;
  573. LPCTSTR BuildPhysicalPath(CString & strPhysicalPath) const;
  574. void RemoveResultItems();
  575. protected:
  576. static LPOLESTR _cszSeparator;
  577. protected:
  578. CComBSTR m_bstrNode;
  579. CComBSTR m_bstrURL;
  580. CString m_strRedirectPath;
  581. CIISMachine * m_pOwner;
  582. CList<CIISFileName *, CIISFileName *&> m_ResultItems;
  583. };
  584. class CIISMachine : public CIISMBNode
  585. /*++
  586. Class Description:
  587. IIS Machine object. This is the object that owns the interface.
  588. Public Interface:
  589. --*/
  590. {
  591. //
  592. // Constructor/Destructor
  593. //
  594. public:
  595. CIISMachine(CComAuthInfo * pAuthInfo = NULL,
  596. CIISRoot * pRoot = NULL);
  597. virtual ~CIISMachine();
  598. //
  599. // Access
  600. //
  601. public:
  602. virtual BOOL IsConnectable() const
  603. {
  604. return (m_pRootExt == NULL);
  605. }
  606. virtual BOOL IsDisconnectable() const
  607. {
  608. return (m_pRootExt == NULL);
  609. }
  610. virtual BOOL IsConfigurable() const
  611. {
  612. return (QueryMajorVersion() >= 6 && IsAdministrator());
  613. }
  614. virtual BOOL IsBrowsable() const { return TRUE; }
  615. virtual LPOLESTR QueryDisplayName();
  616. virtual LPOLESTR GetResultPaneColInfo(int nCol);
  617. virtual int QueryImage() const;
  618. virtual int CompareScopeItem(CIISObject * pObject);
  619. virtual LPCTSTR GetKeyType(LPCTSTR path = NULL) const { return IIS_CLASS_COMPUTER_W; }
  620. virtual LPOLESTR QueryMachineName() const { return QueryServerName(); }
  621. virtual CComAuthInfo * QueryAuthInfo() { return &m_auth; }
  622. virtual CMetaInterface * QueryInterface() { return m_pInterface; }
  623. virtual BOOL HasInterface() const { return m_pInterface != NULL; }
  624. virtual BOOL IsLocal() const { return m_auth.IsLocal(); }
  625. virtual HRESULT CreateInterface(BOOL fShowError);
  626. virtual HRESULT AssureInterfaceCreated(BOOL fShowError);
  627. virtual void SetInterfaceError(HRESULT hr);
  628. HRESULT CheckCapabilities();
  629. HRESULT Impersonate(LPCTSTR szUserName, LPCTSTR szPassword);
  630. void RemoveImpersonation();
  631. BOOL HasAdministratorAccess()
  632. {
  633. return m_fIsAdministrator;
  634. }
  635. void StorePassword(LPCTSTR szPassword);
  636. BOOL ResolvePasswordFromCache();
  637. BOOL ResolveCredentials();
  638. BOOL HandleAccessDenied(CError & err);
  639. BOOL SetCacheDirty();
  640. BOOL UsesImpersonation() const { return m_auth.UsesImpersonation(); }
  641. BOOL PasswordEntered() const { return m_fPasswordEntered; }
  642. BOOL CanAddInstance() const { return m_fCanAddInstance; }
  643. BOOL Has10ConnectionsLimit() const { return m_fHas10ConnectionsLimit; }
  644. WORD QueryMajorVersion() const { return LOWORD(m_dwVersion); }
  645. WORD QueryMinorVersion() const { return HIWORD(m_dwVersion); }
  646. LPOLESTR QueryServerName() const { return m_auth.QueryServerName(); }
  647. LPOLESTR QueryUserName() const { return m_auth.QueryUserName(); }
  648. LPOLESTR QueryPassword() const { return m_auth.QueryPassword(); }
  649. virtual void * GetNodeType()
  650. {
  651. return (void *)&cMachineNode;
  652. }
  653. STDMETHOD(AddMenuItems)(
  654. IN LPCONTEXTMENUCALLBACK piCallback,
  655. IN long * pInsertionAllowed,
  656. IN DATA_OBJECT_TYPES type
  657. );
  658. STDMETHOD(Command)(
  659. IN long lCommandID,
  660. IN CSnapInObjectRootBase * pObj,
  661. IN DATA_OBJECT_TYPES type
  662. );
  663. STDMETHOD(CreatePropertyPages)(
  664. IN LPPROPERTYSHEETCALLBACK lpProvider,
  665. IN LONG_PTR handle,
  666. IN IUnknown * pUnk,
  667. IN DATA_OBJECT_TYPES type
  668. );
  669. protected:
  670. void SetDisplayName();
  671. HRESULT OnMetaBackRest();
  672. HRESULT OnShutDown();
  673. HRESULT OnDisconnect();
  674. HRESULT InsertNewInstance(DWORD inst);
  675. //
  676. // Events
  677. //
  678. public:
  679. virtual HRESULT BuildMetaPath(CComBSTR & bstrPath) const;
  680. virtual HRESULT BuildURL(CComBSTR & bstrURL) const;
  681. public:
  682. virtual HRESULT EnumerateScopePane(HSCOPEITEM hParent);
  683. virtual HRESULT RemoveScopeItem();
  684. virtual HRESULT RefreshData();
  685. virtual int QuerySortWeight() const { return SW_MACHINE; }
  686. //
  687. // Public Interface:
  688. //
  689. public:
  690. static void InitializeHeaders(LPHEADERCTRL lpHeader);
  691. static HRESULT VerifyMachine(CIISMachine *& pMachine);
  692. //
  693. // Stream handlers
  694. //
  695. public:
  696. static HRESULT ReadFromStream(IStream * pStg, CIISMachine ** ppMachine);
  697. HRESULT WriteToStream(IStream * pStgSave);
  698. HRESULT InitializeFromStream(IStream * pStg);
  699. protected:
  700. //
  701. // Result View Layout
  702. //
  703. enum
  704. {
  705. COL_NAME,
  706. COL_LOCAL,
  707. COL_VERSION,
  708. COL_STATUS,
  709. /**/
  710. COL_TOTAL
  711. };
  712. static int _rgnLabels[COL_TOTAL];
  713. static int _rgnWidths[COL_TOTAL];
  714. protected:
  715. static LPOLESTR _cszNodeName;
  716. static CComBSTR _bstrYes;
  717. static CComBSTR _bstrNo;
  718. static CComBSTR _bstrVersionFmt;
  719. static BOOL _fStaticsLoaded;
  720. private:
  721. BOOL m_fPasswordEntered;
  722. BSTR m_bstrDisplayName;
  723. DWORD m_dwVersion;
  724. CError m_err;
  725. CComAuthInfo m_auth;
  726. CMetaInterface * m_pInterface;
  727. CIISRoot * m_pRootExt;
  728. BOOL m_fCanAddInstance;
  729. BOOL m_fHas10ConnectionsLimit;
  730. BOOL m_fIsAdministrator;
  731. };
  732. //
  733. // Callback function to bring up site properties dialog
  734. //
  735. typedef HRESULT (__cdecl * PFNPROPERTIESDLG)(
  736. IN LPPROPERTYSHEETCALLBACK lpProvider,
  737. IN CComAuthInfo * pAuthInfo, OPTIONAL
  738. IN LPCTSTR lpszMDPath,
  739. IN CWnd * pMainWnd, OPTIONAL
  740. IN LPARAM lParam, OPTIONAL
  741. IN LONG_PTR handle OPTIONAL
  742. );
  743. class CIISService : public CIISMBNode
  744. /*++
  745. Class Description:
  746. Public: Interface:
  747. --*/
  748. {
  749. //
  750. // Service definition
  751. //
  752. protected:
  753. typedef struct tagSERVICE_DEF
  754. {
  755. LPCTSTR szNodeName;
  756. LPCTSTR szProtocol;
  757. UINT nDescriptiveName;
  758. int nServiceImage;
  759. int nSiteImage;
  760. int nVDirImage;
  761. int nDirImage;
  762. int nFileImage;
  763. LPCTSTR szServiceClass;
  764. LPCTSTR szServerClass;
  765. LPCTSTR szVDirClass;
  766. PFNPROPERTIESDLG pfnSitePropertiesDlg;
  767. PFNPROPERTIESDLG pfnDirPropertiesDlg;
  768. }
  769. SERVICE_DEF;
  770. static SERVICE_DEF _rgServices[];
  771. static int ResolveServiceName(
  772. IN LPCTSTR szServiceName
  773. );
  774. //
  775. // Property Sheet callbacks
  776. //
  777. protected:
  778. static HRESULT __cdecl ShowFTPSiteProperties(
  779. IN LPPROPERTYSHEETCALLBACK lpProvider,
  780. IN CComAuthInfo * pAuthInfo, OPTIONAL
  781. IN LPCTSTR lpszMDPath,
  782. IN CWnd * pMainWnd, OPTIONAL
  783. IN LPARAM lParam, OPTIONAL
  784. IN LONG_PTR handle OPTIONAL
  785. );
  786. static HRESULT __cdecl ShowFTPDirProperties(
  787. IN LPPROPERTYSHEETCALLBACK lpProvider,
  788. IN CComAuthInfo * pAuthInfo, OPTIONAL
  789. IN LPCTSTR lpszMDPath,
  790. IN CWnd * pMainWnd, OPTIONAL
  791. IN LPARAM lParam, OPTIONAL
  792. IN LONG_PTR handle OPTIONAL
  793. );
  794. static HRESULT __cdecl ShowWebSiteProperties(
  795. IN LPPROPERTYSHEETCALLBACK lpProvider,
  796. IN CComAuthInfo * pAuthInfo, OPTIONAL
  797. IN LPCTSTR lpszMDPath,
  798. IN CWnd * pMainWnd, OPTIONAL
  799. IN LPARAM lParam, OPTIONAL
  800. IN LONG_PTR handle OPTIONAL
  801. );
  802. static HRESULT __cdecl ShowWebDirProperties(
  803. IN LPPROPERTYSHEETCALLBACK lpProvider,
  804. IN CComAuthInfo * pAuthInfo, OPTIONAL
  805. IN LPCTSTR lpszMDPath,
  806. IN CWnd * pMainWnd, OPTIONAL
  807. IN LPARAM lParam, OPTIONAL
  808. IN LONG_PTR handle OPTIONAL
  809. );
  810. //
  811. // Constructor/Destructor
  812. //
  813. public:
  814. CIISService(
  815. IN CIISMachine * pOwner,
  816. IN LPCTSTR szServiceName
  817. );
  818. virtual ~CIISService();
  819. //
  820. // Events
  821. //
  822. public:
  823. virtual HRESULT EnumerateScopePane(HSCOPEITEM hParent);
  824. //
  825. // Interface:
  826. //
  827. public:
  828. HRESULT ShowSitePropertiesDlg(
  829. IN LPPROPERTYSHEETCALLBACK lpProvider,
  830. IN CComAuthInfo * pAuthInfo,
  831. IN LPCTSTR lpszMDPath,
  832. IN CWnd * pMainWnd,
  833. IN LPARAM lParam,
  834. IN LONG_PTR handle
  835. );
  836. HRESULT ShowDirPropertiesDlg(
  837. IN LPPROPERTYSHEETCALLBACK lpProvider,
  838. IN CComAuthInfo * pAuthInfo,
  839. IN LPCTSTR lpszMDPath,
  840. IN CWnd * pMainWnd,
  841. IN LPARAM lParam,
  842. IN LONG_PTR handle
  843. );
  844. STDMETHOD(CreatePropertyPages)(
  845. IN LPPROPERTYSHEETCALLBACK lpProvider,
  846. IN LONG_PTR handle,
  847. IN IUnknown * pUnk,
  848. IN DATA_OBJECT_TYPES type
  849. );
  850. //
  851. // Access
  852. //
  853. public:
  854. BOOL IsManagedService() const;
  855. virtual void InitializeChildHeaders(LPHEADERCTRL lpHeader);
  856. virtual LPOLESTR QueryDisplayName()
  857. {
  858. return m_bstrDisplayName;
  859. }
  860. virtual int QueryImage() const;
  861. virtual int QuerySortWeight() const { return SW_SERVICE; }
  862. LPCTSTR QueryServiceName()
  863. {
  864. return _rgServices[m_iServiceDef].szNodeName;
  865. }
  866. LPCTSTR QueryServiceClass() const
  867. {
  868. return _rgServices[m_iServiceDef].szServiceClass;
  869. }
  870. LPCTSTR QueryServerClass() const
  871. {
  872. return _rgServices[m_iServiceDef].szServerClass;
  873. }
  874. LPCTSTR QueryVDirClass() const
  875. {
  876. return _rgServices[m_iServiceDef].szVDirClass;
  877. }
  878. virtual LPCTSTR GetKeyType(LPCTSTR path = NULL) const { return QueryServiceClass(); }
  879. //
  880. // Display Types
  881. //
  882. public:
  883. int QueryServiceImage () const;
  884. int QuerySiteImage() const;
  885. int QueryVDirImage() const;
  886. int QueryDirImage() const;
  887. int QueryFileImage() const;
  888. virtual void * GetNodeType()
  889. {
  890. return (void *)&cServiceCollectorNode;
  891. }
  892. HRESULT InsertNewInstance(DWORD inst);
  893. //
  894. // Interface:
  895. //
  896. protected:
  897. STDMETHOD(AddMenuItems)(
  898. IN LPCONTEXTMENUCALLBACK piCallback,
  899. IN long * pInsertionAllowed,
  900. IN DATA_OBJECT_TYPES type
  901. );
  902. STDMETHOD(Command)(
  903. IN long lCommandID,
  904. IN CSnapInObjectRootBase * pObj,
  905. IN DATA_OBJECT_TYPES type
  906. );
  907. // STDMETHOD(CreatePropertyPages)(
  908. // IN LPPROPERTYSHEETCALLBACK lpProvider,
  909. // IN LONG_PTR handle,
  910. // IN IUnknown * pUnk,
  911. // IN DATA_OBJECT_TYPES type
  912. // );
  913. virtual HRESULT BuildURL(CComBSTR & bstrURL) const;
  914. //
  915. // Master properties
  916. //
  917. virtual BOOL IsConfigurable() const { return IsAdministrator(); }
  918. private:
  919. int m_iServiceDef;
  920. BOOL m_fManagedService;
  921. BOOL m_fCanAddInstance;
  922. CComBSTR m_bstrDisplayName;
  923. };
  924. class CAppPoolNode;
  925. typedef CList<CAppPoolNode *, CAppPoolNode *> CPoolList;
  926. class CAppPoolsContainer : public CIISMBNode
  927. /*++
  928. Class Description:
  929. Public: Interface:
  930. --*/
  931. {
  932. //
  933. // Property Sheet callbacks
  934. //
  935. protected:
  936. static HRESULT __cdecl ShowProperties(
  937. IN LPPROPERTYSHEETCALLBACK lpProvider,
  938. IN CComAuthInfo * pAuthInfo, OPTIONAL
  939. IN LPCTSTR lpszMDPath,
  940. IN CWnd * pMainWnd, OPTIONAL
  941. IN LPARAM lParam, OPTIONAL
  942. IN LONG_PTR handle OPTIONAL
  943. );
  944. //
  945. // Constructor/Destructor
  946. //
  947. public:
  948. CAppPoolsContainer(
  949. IN CIISMachine * pOwner,
  950. IN CIISService * pWebService
  951. );
  952. virtual ~CAppPoolsContainer();
  953. //
  954. // Events
  955. //
  956. public:
  957. virtual HRESULT EnumerateScopePane(HSCOPEITEM hParent);
  958. //
  959. // Interface:
  960. //
  961. public:
  962. HRESULT ShowPropertiesDlg(
  963. IN LPPROPERTYSHEETCALLBACK lpProvider,
  964. IN CComAuthInfo * pAuthInfo, OPTIONAL
  965. IN LPCTSTR lpszMDPath,
  966. IN CWnd * pMainWnd, OPTIONAL
  967. IN LPARAM lParam, OPTIONAL
  968. IN LONG_PTR handle OPTIONAL
  969. );
  970. STDMETHOD(CreatePropertyPages)(
  971. IN LPPROPERTYSHEETCALLBACK lpProvider,
  972. IN LONG_PTR handle,
  973. IN IUnknown * pUnk,
  974. IN DATA_OBJECT_TYPES type
  975. );
  976. STDMETHOD(Command)(
  977. IN long lCommandID,
  978. IN CSnapInObjectRootBase * pObj,
  979. IN DATA_OBJECT_TYPES type
  980. );
  981. //
  982. // Access
  983. //
  984. public:
  985. virtual void InitializeChildHeaders(LPHEADERCTRL lpHeader);
  986. virtual LPOLESTR QueryDisplayName()
  987. {
  988. return m_bstrDisplayName;
  989. }
  990. virtual int QueryImage() const {return iFolder;}
  991. virtual int QuerySortWeight() const {return SW_APP_POOLS;}
  992. virtual HRESULT BuildMetaPath(CComBSTR & bstrPath) const;
  993. HRESULT EnumerateAppPools(CPoolList * pList);
  994. virtual void * GetNodeType()
  995. {
  996. return (void *)&cAppPoolsNode;
  997. }
  998. HRESULT QueryDefaultPoolId(CString& id);
  999. HRESULT InsertNewPool(CString& id);
  1000. //
  1001. // Interface:
  1002. //
  1003. protected:
  1004. STDMETHOD(AddMenuItems)(
  1005. IN LPCONTEXTMENUCALLBACK piCallback,
  1006. IN long * pInsertionAllowed,
  1007. IN DATA_OBJECT_TYPES type
  1008. );
  1009. //
  1010. // Master properties
  1011. //
  1012. virtual BOOL IsConfigurable() const { return IsAdministrator(); }
  1013. protected:
  1014. //
  1015. // Result View Layout
  1016. //
  1017. enum
  1018. {
  1019. COL_DESCRIPTION,
  1020. COL_STATE,
  1021. // COL_STATUS,
  1022. /**/
  1023. COL_TOTAL
  1024. };
  1025. static int _rgnLabels[COL_TOTAL];
  1026. static int _rgnWidths[COL_TOTAL];
  1027. private:
  1028. CComBSTR m_bstrDisplayName;
  1029. CIISService * m_pWebService;
  1030. };
  1031. class CAppPoolNode : public CIISMBNode
  1032. {
  1033. //
  1034. // Constructor/Destructor
  1035. //
  1036. public:
  1037. //
  1038. // Constructor which will resolve its properties at display time
  1039. //
  1040. CAppPoolNode(
  1041. IN CIISMachine * pOwner,
  1042. IN CAppPoolsContainer * pContainer,
  1043. IN LPCTSTR szNodeName
  1044. );
  1045. virtual ~CAppPoolNode();
  1046. //
  1047. // Access
  1048. //
  1049. public:
  1050. virtual int QueryImage() const;
  1051. virtual LPOLESTR QueryDisplayName();
  1052. virtual LPOLESTR GetResultPaneColInfo(int nCol);
  1053. virtual int CompareResultPaneItem(CIISObject * pObject, int nCol);
  1054. virtual void InitializeChildHeaders(LPHEADERCTRL lpHeader);
  1055. virtual HRESULT DeleteNode(IResultData * pResult);
  1056. public:
  1057. //
  1058. // Type Functions
  1059. //
  1060. virtual BOOL IsControllable() const { return TRUE; }
  1061. virtual BOOL IsConfigurable() const { return TRUE; }
  1062. virtual BOOL IsDeletable() const {return TRUE; }
  1063. virtual BOOL IsRefreshable() const { return TRUE; }
  1064. virtual BOOL IsRenamable() const { return TRUE; }
  1065. //
  1066. // State Functions
  1067. //
  1068. virtual BOOL IsRunning() const { return m_dwState == MD_SERVER_STATE_STARTED; }
  1069. virtual BOOL IsStopped() const { return m_dwState == MD_SERVER_STATE_STOPPED; }
  1070. virtual BOOL IsPaused() const { return m_dwState == MD_SERVER_STATE_PAUSED; }
  1071. //
  1072. // Interface:
  1073. //
  1074. public:
  1075. virtual HRESULT RefreshData();
  1076. virtual HRESULT EnumerateScopePane(HSCOPEITEM hParent);
  1077. virtual int QuerySortWeight() const { return SW_APP_POOL; }
  1078. virtual HRESULT RenameItem(LPOLESTR new_name);
  1079. virtual HRESULT BuildMetaPath(CComBSTR & bstrPath) const;
  1080. STDMETHOD(CreatePropertyPages)(
  1081. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1082. IN LONG_PTR handle,
  1083. IN IUnknown * pUnk,
  1084. IN DATA_OBJECT_TYPES type
  1085. );
  1086. STDMETHOD(Command)(
  1087. IN long lCommandID,
  1088. IN CSnapInObjectRootBase * pObj,
  1089. IN DATA_OBJECT_TYPES type
  1090. );
  1091. virtual void * GetNodeType()
  1092. {
  1093. return (void *)&cAppPoolNode;
  1094. }
  1095. public:
  1096. static void InitializeHeaders(LPHEADERCTRL lpHeader);
  1097. protected:
  1098. HRESULT ChangeState(DWORD dwCommand);
  1099. HRESULT ShowPropertiesDlg(
  1100. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1101. IN CComAuthInfo * pAuthInfo, OPTIONAL
  1102. IN LPCTSTR lpszMDPath,
  1103. IN CWnd * pMainWnd, OPTIONAL
  1104. IN LPARAM lParam, OPTIONAL
  1105. IN LONG_PTR handle OPTIONAL
  1106. );
  1107. STDMETHOD(AddMenuItems)(
  1108. IN LPCONTEXTMENUCALLBACK piCallback,
  1109. IN long * pInsertionAllowed,
  1110. IN DATA_OBJECT_TYPES type
  1111. );
  1112. protected:
  1113. //
  1114. // Result View Layout
  1115. //
  1116. enum
  1117. {
  1118. COL_DESCRIPTION,
  1119. COL_STATE,
  1120. // COL_STATUS,
  1121. /**/
  1122. COL_TOTAL
  1123. };
  1124. static int _rgnLabels[COL_TOTAL];
  1125. static int _rgnWidths[COL_TOTAL];
  1126. protected:
  1127. static CComBSTR _bstrStarted;
  1128. static CComBSTR _bstrStopped;
  1129. static CComBSTR _bstrPaused;
  1130. static CComBSTR _bstrUnknown;
  1131. static CComBSTR _bstrPending;
  1132. static BOOL _fStaticsLoaded;
  1133. private:
  1134. CString m_strDisplayName;
  1135. //
  1136. // Data members
  1137. //
  1138. BOOL m_fDeletable;
  1139. // DWORD m_dwID;
  1140. DWORD m_dwState;
  1141. DWORD m_dwWin32Error;
  1142. CAppPoolsContainer * m_pContainer;
  1143. };
  1144. class CIISSite : public CIISMBNode
  1145. {
  1146. //
  1147. // Constructor/Destructor
  1148. //
  1149. public:
  1150. //
  1151. // Constructor which will resolve its properties at display time
  1152. //
  1153. CIISSite(
  1154. CIISMachine * pOwner,
  1155. CIISService * pService,
  1156. LPCTSTR szNodeName
  1157. );
  1158. //
  1159. // Constructor with full information
  1160. //
  1161. CIISSite(
  1162. CIISMachine * pOwner,
  1163. CIISService * pService,
  1164. LPCTSTR szNodeName,
  1165. DWORD dwState,
  1166. BOOL fDeletable,
  1167. BOOL fClusterEnabled,
  1168. USHORT sPort,
  1169. DWORD dwID,
  1170. DWORD dwIPAddress,
  1171. DWORD dwWin32Error,
  1172. LPOLESTR szHostHeaderName,
  1173. LPOLESTR szComment
  1174. );
  1175. virtual ~CIISSite();
  1176. //
  1177. // Access
  1178. //
  1179. public:
  1180. virtual int QueryImage() const;
  1181. virtual LPOLESTR QueryDisplayName();
  1182. virtual LPOLESTR GetResultPaneColInfo(int nCol);
  1183. virtual int CompareResultPaneItem(CIISObject * pObject, int nCol);
  1184. virtual LPCTSTR GetKeyType(LPCTSTR path = NULL) const
  1185. {
  1186. if (path != NULL && !CMetabasePath::IsMasterInstance(path))
  1187. {
  1188. return m_pService->QueryVDirClass();
  1189. }
  1190. else
  1191. {
  1192. return m_pService->QueryServerClass();
  1193. }
  1194. }
  1195. public:
  1196. //
  1197. // Type Functions
  1198. //
  1199. virtual BOOL IsControllable() const { return TRUE; }
  1200. virtual BOOL IsPausable() const { return IsRunning() || IsPaused(); }
  1201. virtual BOOL IsConfigurable() const { return TRUE; }
  1202. virtual BOOL IsDeletable() const
  1203. {
  1204. // Do not delete the only site for Pro SKU
  1205. CIISSite * that = (CIISSite *)this;
  1206. return !that->GetOwner()->Has10ConnectionsLimit();
  1207. }
  1208. virtual BOOL IsRenamable() const { return TRUE; }
  1209. virtual BOOL HasFileSystemFiles() const { return TRUE; }
  1210. //
  1211. // State Functions
  1212. //
  1213. virtual BOOL IsRunning() const { return m_dwState == MD_SERVER_STATE_STARTED; }
  1214. virtual BOOL IsStopped() const { return m_dwState == MD_SERVER_STATE_STOPPED; }
  1215. virtual BOOL IsPaused() const { return m_dwState == MD_SERVER_STATE_PAUSED; }
  1216. virtual BOOL IsBrowsable() const { return TRUE; }
  1217. virtual BOOL IsExplorable() const { return TRUE; }
  1218. virtual BOOL IsOpenable() const { return TRUE; }
  1219. //
  1220. // Data Access
  1221. //
  1222. public:
  1223. BOOL IsWolfPackEnabled() const { return m_fWolfPackEnabled; }
  1224. DWORD QueryIPAddress() const { return m_dwIPAddress; }
  1225. DWORD QueryWin32Error() const { return m_dwWin32Error; }
  1226. USHORT QueryPort() const { return m_sPort; }
  1227. BOOL IsFtpSite()
  1228. {
  1229. return lstrcmpi(m_pService->QueryServiceName(), SZ_MBN_FTP) == 0;
  1230. }
  1231. BOOL IsWebSite()
  1232. {
  1233. return lstrcmpi(m_pService->QueryServiceName(), SZ_MBN_WEB) == 0;
  1234. }
  1235. //
  1236. // Interface:
  1237. //
  1238. public:
  1239. virtual HRESULT RefreshData();
  1240. virtual HRESULT EnumerateScopePane(HSCOPEITEM hParent);
  1241. virtual int QuerySortWeight() const { return SW_SITE; }
  1242. virtual HRESULT RenameItem(LPOLESTR new_name);
  1243. virtual HRESULT DeleteNode(IResultData * pResult);
  1244. STDMETHOD(CreatePropertyPages)(
  1245. LPPROPERTYSHEETCALLBACK lpProvider,
  1246. LONG_PTR handle,
  1247. IUnknown * pUnk,
  1248. DATA_OBJECT_TYPES type
  1249. );
  1250. STDMETHOD(Command)(
  1251. long lCommandID,
  1252. CSnapInObjectRootBase * pObj,
  1253. DATA_OBJECT_TYPES type
  1254. );
  1255. virtual void * GetNodeType()
  1256. {
  1257. return (void *)&cInstanceNode;
  1258. }
  1259. public:
  1260. static void InitializeHeaders(LPHEADERCTRL lpHeader);
  1261. virtual void InitializeChildHeaders(LPHEADERCTRL lpHeader);
  1262. protected:
  1263. virtual HRESULT BuildMetaPath(CComBSTR & bstrPath) const;
  1264. virtual HRESULT BuildURL(CComBSTR & bstrURL) const;
  1265. virtual HRESULT EnumerateResultPane(BOOL fExp, IHeaderCtrl * pHdr, IResultData * pResData);
  1266. HRESULT ChangeState(DWORD dwCommand);
  1267. HRESULT ShowPropertiesDlg(
  1268. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1269. IN CComAuthInfo * pAuthInfo, OPTIONAL
  1270. IN LPCTSTR lpszMDPath,
  1271. IN CWnd * pMainWnd, OPTIONAL
  1272. IN LPARAM lParam, OPTIONAL
  1273. IN LONG_PTR handle OPTIONAL
  1274. );
  1275. STDMETHOD(AddMenuItems)(
  1276. IN LPCONTEXTMENUCALLBACK piCallback,
  1277. IN long * pInsertionAllowed,
  1278. IN DATA_OBJECT_TYPES type
  1279. );
  1280. HRESULT InsertNewInstance(DWORD inst);
  1281. HRESULT InsertNewAlias(CString alias);
  1282. protected:
  1283. //
  1284. // Result View Layout
  1285. //
  1286. enum
  1287. {
  1288. COL_DESCRIPTION,
  1289. COL_STATE,
  1290. COL_DOMAIN_NAME,
  1291. COL_IP_ADDRESS,
  1292. COL_TCP_PORT,
  1293. COL_STATUS,
  1294. /**/
  1295. COL_TOTAL
  1296. };
  1297. static int _rgnLabels[COL_TOTAL];
  1298. static int _rgnWidths[COL_TOTAL];
  1299. protected:
  1300. static CComBSTR _bstrStarted;
  1301. static CComBSTR _bstrStopped;
  1302. static CComBSTR _bstrPaused;
  1303. static CComBSTR _bstrUnknown;
  1304. static CComBSTR _bstrAllUnassigned;
  1305. static CComBSTR _bstrPending;
  1306. static BOOL _fStaticsLoaded;
  1307. private:
  1308. BOOL m_fResolved;
  1309. CString m_strDisplayName;
  1310. //
  1311. // Data members
  1312. //
  1313. BOOL m_fDeletable;
  1314. BOOL m_fWolfPackEnabled;
  1315. BOOL m_fFrontPageWeb;
  1316. DWORD m_dwID;
  1317. DWORD m_dwState;
  1318. DWORD m_dwIPAddress;
  1319. DWORD m_dwWin32Error;
  1320. USHORT m_sPort;
  1321. CComBSTR m_bstrHostHeaderName;
  1322. CComBSTR m_bstrComment;
  1323. CIISService * m_pService;
  1324. CComBSTR m_bstrDisplayNameStatus;
  1325. };
  1326. class CIISDirectory : public CIISMBNode
  1327. /*++
  1328. Class Description:
  1329. Vroot/dir/file class.
  1330. --*/
  1331. {
  1332. //
  1333. // Constructor/Destructor
  1334. //
  1335. public:
  1336. //
  1337. // Constructor which will resolve its properties at display time
  1338. //
  1339. CIISDirectory(
  1340. IN CIISMachine * pOwner,
  1341. IN CIISService * pService,
  1342. IN LPCTSTR szNodeName
  1343. );
  1344. //
  1345. // Constructor with full information
  1346. //
  1347. CIISDirectory(
  1348. CIISMachine * pOwner,
  1349. CIISService * pService,
  1350. LPCTSTR szNodeName,
  1351. BOOL fEnabledApplication,
  1352. DWORD dwWin32Error,
  1353. LPCTSTR redir_path
  1354. );
  1355. virtual ~CIISDirectory();
  1356. //
  1357. // Access
  1358. //
  1359. public:
  1360. virtual int QueryImage() const;
  1361. virtual LPOLESTR QueryDisplayName() { return m_bstrDisplayName; }
  1362. virtual LPOLESTR GetResultPaneColInfo(int nCol);
  1363. virtual LPCTSTR GetKeyType(LPCTSTR path = NULL) const
  1364. {
  1365. return m_pService->QueryVDirClass();
  1366. }
  1367. public:
  1368. //
  1369. // Type Functions
  1370. //
  1371. virtual BOOL IsConfigurable() const { return TRUE; }
  1372. virtual BOOL IsDeletable() const { return TRUE; }
  1373. // virtual BOOL IsRenamable() const { return TRUE; }
  1374. //
  1375. // State Functions
  1376. //
  1377. virtual BOOL IsBrowsable() const { return TRUE; }
  1378. virtual BOOL IsExplorable() const { return TRUE; }
  1379. virtual BOOL IsOpenable() const { return TRUE; }
  1380. virtual BOOL HasFileSystemFiles() const { return TRUE; }
  1381. //
  1382. // Data Access
  1383. //
  1384. public:
  1385. BOOL IsEnabledApplication() const { return m_fEnabledApplication; }
  1386. DWORD QueryWin32Error() const { return m_dwWin32Error; }
  1387. BOOL IsFtpDir()
  1388. {
  1389. return lstrcmpi(m_pService->QueryServiceName(), SZ_MBN_FTP) == 0;
  1390. }
  1391. BOOL IsWebDir()
  1392. {
  1393. return lstrcmpi(m_pService->QueryServiceName(), SZ_MBN_WEB) == 0;
  1394. }
  1395. //
  1396. // Interface:
  1397. //
  1398. public:
  1399. virtual HRESULT RefreshData();
  1400. virtual HRESULT EnumerateScopePane(HSCOPEITEM hParent);
  1401. virtual int QuerySortWeight() const { return SW_VDIR; }
  1402. // virtual HRESULT RenameItem(LPOLESTR new_name);
  1403. STDMETHOD(AddMenuItems)(
  1404. IN LPCONTEXTMENUCALLBACK piCallback,
  1405. IN long * pInsertionAllowed,
  1406. IN DATA_OBJECT_TYPES type
  1407. );
  1408. STDMETHOD(Command)(
  1409. IN long lCommandID,
  1410. IN CSnapInObjectRootBase * pObj,
  1411. IN DATA_OBJECT_TYPES type
  1412. );
  1413. STDMETHOD(CreatePropertyPages)(
  1414. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1415. IN LONG_PTR handle,
  1416. IN IUnknown * pUnk,
  1417. IN DATA_OBJECT_TYPES type
  1418. );
  1419. virtual void * GetNodeType()
  1420. {
  1421. return (void *)&cChildNode;
  1422. }
  1423. public:
  1424. virtual void InitializeChildHeaders(LPHEADERCTRL lpHeader);
  1425. static void InitializeHeaders(LPHEADERCTRL lpHeader);
  1426. protected:
  1427. //virtual HRESULT BuildURL(CComBSTR & bstrURL) const;
  1428. HRESULT InsertNewAlias(CString alias);
  1429. virtual HRESULT EnumerateResultPane(
  1430. BOOL fExpand,
  1431. IHeaderCtrl * lpHeader,
  1432. IResultData * lpResultData
  1433. )
  1434. {
  1435. CError err = CIISObject::EnumerateResultPane(fExpand, lpHeader, lpResultData);
  1436. if ( err.Succeeded()
  1437. && !IsFtpDir()
  1438. && QueryWin32Error() == ERROR_SUCCESS
  1439. && m_strRedirectPath.IsEmpty()
  1440. )
  1441. {
  1442. err = CIISMBNode::EnumerateResultPane_(
  1443. fExpand, lpHeader, lpResultData, m_pService);
  1444. }
  1445. return err;
  1446. }
  1447. HRESULT ShowPropertiesDlg(
  1448. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1449. IN CComAuthInfo * pAuthInfo, OPTIONAL
  1450. IN LPCTSTR lpszMDPath,
  1451. IN CWnd * pMainWnd, OPTIONAL
  1452. IN LPARAM lParam, OPTIONAL
  1453. IN LONG_PTR handle OPTIONAL
  1454. );
  1455. protected:
  1456. //
  1457. // Result View Layout
  1458. //
  1459. enum
  1460. {
  1461. COL_ALIAS = 0,
  1462. COL_PATH,
  1463. COL_STATUS,
  1464. //
  1465. COL_TOTAL
  1466. };
  1467. static int _rgnLabels[COL_TOTAL];
  1468. static int _rgnWidths[COL_TOTAL];
  1469. protected:
  1470. // static CComBSTR _bstrName, _bstrPath;
  1471. // static BOOL _fStaticsLoaded;
  1472. private:
  1473. BOOL m_fResolved;
  1474. CComBSTR m_bstrDisplayName;
  1475. CComBSTR m_bstrPath;
  1476. //
  1477. // Data members
  1478. //
  1479. BOOL m_fEnabledApplication;
  1480. DWORD m_dwWin32Error;
  1481. CIISService * m_pService;
  1482. };
  1483. class CApplicationNode : public CIISMBNode
  1484. {
  1485. public:
  1486. CApplicationNode(
  1487. CIISMachine * pOwner,
  1488. LPCTSTR path,
  1489. LPCTSTR name
  1490. )
  1491. : CIISMBNode(pOwner, name),
  1492. m_meta_path(path)
  1493. {
  1494. }
  1495. virtual ~CApplicationNode()
  1496. {
  1497. }
  1498. public:
  1499. virtual BOOL IsLeafNode() const { return TRUE; }
  1500. virtual int QueryImage() const
  1501. {
  1502. return iApplication;
  1503. }
  1504. virtual LPOLESTR QueryDisplayName();
  1505. virtual HRESULT BuildMetaPath(CComBSTR& path) const;
  1506. virtual int QuerySortWeight() const
  1507. {
  1508. CString parent, alias;
  1509. CMetabasePath::SplitMetaPathAtInstance(m_meta_path, parent, alias);
  1510. return alias.IsEmpty() ? SW_SITE : SW_VDIR;
  1511. }
  1512. virtual LPOLESTR GetResultPaneColInfo(int nCol);
  1513. // virtual int CompareResultPaneItem(CIISObject * pObject, int nCol);
  1514. protected:
  1515. //
  1516. // Result View Layout
  1517. //
  1518. enum
  1519. {
  1520. COL_ALIAS,
  1521. COL_PATH,
  1522. //
  1523. COL_TOTAL
  1524. };
  1525. static int _rgnLabels[COL_TOTAL];
  1526. static int _rgnWidths[COL_TOTAL];
  1527. LPCTSTR FriendlyAppRoot(LPCTSTR lpAppRoot, CString & strFriendly);
  1528. private:
  1529. CString m_strDisplayName;
  1530. CString m_meta_path;
  1531. };
  1532. class CIISFileName : public CIISMBNode
  1533. {
  1534. public:
  1535. CIISFileName(
  1536. CIISMachine * pOwner,
  1537. CIISService * pService,
  1538. const DWORD dwAttributes,
  1539. LPCTSTR alias,
  1540. LPCTSTR redirect
  1541. );
  1542. public:
  1543. BOOL IsEnabledApplication() const
  1544. {
  1545. return m_fEnabledApplication;
  1546. }
  1547. DWORD QueryWin32Error() const
  1548. {
  1549. return m_dwWin32Error;
  1550. }
  1551. //
  1552. // Access
  1553. //
  1554. public:
  1555. virtual int QueryImage() const;
  1556. virtual LPOLESTR QueryDisplayName()
  1557. {
  1558. return m_bstrFileName;
  1559. }
  1560. virtual LPOLESTR GetResultPaneColInfo(int nCol);
  1561. virtual HRESULT DeleteNode(IResultData * pResult);
  1562. virtual LPCTSTR GetKeyType(LPCTSTR path = NULL) const
  1563. {
  1564. return (m_dwAttribute & FILE_ATTRIBUTE_DIRECTORY) != 0 ?
  1565. IIS_CLASS_WEB_DIR_W : IIS_CLASS_WEB_FILE_W;
  1566. }
  1567. //
  1568. // Type Functions
  1569. //
  1570. virtual BOOL IsConfigurable() const { return TRUE; }
  1571. virtual BOOL IsDeletable() const { return TRUE; }
  1572. virtual BOOL IsRenamable() const { return TRUE; }
  1573. virtual BOOL IsLeafNode() const { return TRUE; }
  1574. //
  1575. // State Functions
  1576. //
  1577. virtual BOOL IsBrowsable() const { return TRUE; }
  1578. virtual BOOL IsExplorable() const
  1579. {
  1580. return IsDir();
  1581. }
  1582. virtual BOOL IsOpenable() const
  1583. {
  1584. return TRUE;
  1585. }
  1586. virtual BOOL HasFileSystemFiles() const
  1587. {
  1588. return IsDir();
  1589. }
  1590. virtual int QuerySortWeight() const
  1591. {
  1592. return IsDir() ? SW_DIR : SW_FILE;
  1593. }
  1594. virtual void InitializeChildHeaders(LPHEADERCTRL lpHeader);
  1595. virtual HRESULT RefreshData();
  1596. virtual HRESULT EnumerateScopePane(HSCOPEITEM hParent);
  1597. STDMETHOD(AddMenuItems)(
  1598. IN LPCONTEXTMENUCALLBACK piCallback,
  1599. IN long * pInsertionAllowed,
  1600. IN DATA_OBJECT_TYPES type
  1601. );
  1602. STDMETHOD(Command)(
  1603. IN long lCommandID,
  1604. IN CSnapInObjectRootBase * pObj,
  1605. IN DATA_OBJECT_TYPES type
  1606. );
  1607. STDMETHOD(CreatePropertyPages)(
  1608. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1609. IN LONG_PTR handle,
  1610. IN IUnknown * pUnk,
  1611. IN DATA_OBJECT_TYPES type
  1612. );
  1613. virtual void * GetNodeType()
  1614. {
  1615. return (void *)&cFileNode;
  1616. }
  1617. virtual HRESULT RenameItem(LPOLESTR new_name);
  1618. virtual HRESULT OnPropertyChange(BOOL fScope, IResultData * pResult);
  1619. protected:
  1620. //
  1621. // Result View Layout
  1622. //
  1623. enum
  1624. {
  1625. COL_ALIAS,
  1626. COL_PATH,
  1627. COL_STATUS,
  1628. //
  1629. COL_TOTAL
  1630. };
  1631. static int _rgnLabels[COL_TOTAL];
  1632. static int _rgnWidths[COL_TOTAL];
  1633. HRESULT ShowPropertiesDlg(
  1634. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1635. IN CComAuthInfo * pAuthInfo,
  1636. IN LPCTSTR lpszMDPath,
  1637. IN CWnd * pMainWnd,
  1638. IN LPARAM lParam,
  1639. IN LONG_PTR handle
  1640. );
  1641. HRESULT ShowDirPropertiesDlg(
  1642. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1643. IN CComAuthInfo * pAuthInfo,
  1644. IN LPCTSTR lpszMDPath,
  1645. IN CWnd * pMainWnd,
  1646. IN LPARAM lParam,
  1647. IN LONG_PTR handle
  1648. );
  1649. HRESULT ShowFilePropertiesDlg(
  1650. IN LPPROPERTYSHEETCALLBACK lpProvider,
  1651. IN CComAuthInfo * pAuthInfo,
  1652. IN LPCTSTR lpszMDPath,
  1653. IN CWnd * pMainWnd,
  1654. IN LPARAM lParam,
  1655. IN LONG_PTR handle
  1656. );
  1657. HRESULT InsertNewAlias(CString alias);
  1658. virtual HRESULT EnumerateResultPane(
  1659. BOOL fExpand,
  1660. IHeaderCtrl * lpHeader,
  1661. IResultData * lpResultData
  1662. )
  1663. {
  1664. CError err = CIISObject::EnumerateResultPane(fExpand, lpHeader, lpResultData);
  1665. if (err.Succeeded() && m_dwWin32Error == ERROR_SUCCESS)
  1666. {
  1667. err = CIISMBNode::EnumerateResultPane_(fExpand,
  1668. lpHeader, lpResultData, m_pService);
  1669. }
  1670. return err;
  1671. }
  1672. BOOL IsDir() const
  1673. {
  1674. return (m_dwAttribute & FILE_ATTRIBUTE_DIRECTORY) != 0;
  1675. }
  1676. private:
  1677. BOOL m_fResolved;
  1678. CComBSTR m_bstrFileName;
  1679. CString m_RedirectString;
  1680. BOOL m_fEnabledApplication;
  1681. DWORD m_dwAttribute;
  1682. DWORD m_dwWin32Error;
  1683. CIISService * m_pService;
  1684. };
  1685. #if 0
  1686. class CIISFileSystem
  1687. /*++
  1688. Class Description:
  1689. Pure virtual base class to help enumerate the filesystem. Sites,
  1690. virtual directory and file/directory nodes will be "is a" nodes
  1691. of this type, in addition to deriving from CIISMBNode.
  1692. Public Interface:
  1693. --*/
  1694. {
  1695. //
  1696. // Constructor/Destructor
  1697. //
  1698. public:
  1699. CIISFileSystem(LPCTSTR szFileName, BOOL fTerminal = FALSE);
  1700. virtual ~CIISFileSystem();
  1701. protected:
  1702. HRESULT BuildFilePath(
  1703. IN IConsoleNameSpace * lpConsoleNameSpace,
  1704. IN HSCOPEITEM hScopeItem,
  1705. OUT CComBSTR & bstrPath
  1706. ) const;
  1707. BOOL IsFileTerminal() const { return m_fTerminal; }
  1708. private:
  1709. CComBSTR m_bstrFileName;
  1710. BOOL m_fTerminal;
  1711. };
  1712. #endif 0
  1713. //
  1714. // Inline Expansion
  1715. //
  1716. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  1717. inline HRESULT CIISObject::AddImages(LPIMAGELIST lpImageList)
  1718. {
  1719. return SetImageList(lpImageList);
  1720. }
  1721. inline HRESULT CIISObject::SetControlbar(
  1722. IN LPCONTROLBAR lpControlbar,
  1723. IN LPEXTENDCONTROLBAR lpExtendControlbar
  1724. )
  1725. {
  1726. return __SetControlbar(lpControlbar, lpExtendControlbar);
  1727. }
  1728. inline /* virtual */ CMetaInterface * CIISMBNode::QueryInterface()
  1729. {
  1730. ASSERT_PTR(m_pOwner != NULL);
  1731. ASSERT(m_pOwner->HasInterface());
  1732. return m_pOwner->QueryInterface();
  1733. }
  1734. inline /* virtual */ CComAuthInfo * CIISMBNode::QueryAuthInfo()
  1735. {
  1736. ASSERT_PTR(m_pOwner != NULL);
  1737. return m_pOwner->QueryAuthInfo();
  1738. }
  1739. inline /* virtual */ LPOLESTR CIISMBNode::QueryMachineName() const
  1740. {
  1741. ASSERT_PTR(m_pOwner);
  1742. return m_pOwner->QueryMachineName();
  1743. }
  1744. inline WORD CIISMBNode::QueryMajorVersion() const
  1745. {
  1746. ASSERT_PTR(m_pOwner);
  1747. return m_pOwner->QueryMajorVersion();
  1748. }
  1749. inline WORD CIISMBNode::QueryMinorVersion() const
  1750. {
  1751. ASSERT_PTR(m_pOwner);
  1752. return m_pOwner->QueryMinorVersion();
  1753. }
  1754. inline /* virtual */ BOOL CIISMBNode::IsLocal() const
  1755. {
  1756. ASSERT_PTR(m_pOwner);
  1757. return m_pOwner->IsLocal();
  1758. }
  1759. inline /* virtual */ BOOL CIISMBNode::HasInterface() const
  1760. {
  1761. ASSERT_PTR(m_pOwner);
  1762. return m_pOwner->HasInterface();
  1763. }
  1764. inline /* virtual */ HRESULT CIISMBNode::CreateInterface(BOOL fShowError)
  1765. {
  1766. ASSERT_PTR(m_pOwner);
  1767. return m_pOwner->CreateInterface(fShowError);
  1768. }
  1769. inline /* virtual */ HRESULT CIISMBNode::AssureInterfaceCreated(BOOL fShowError)
  1770. {
  1771. ASSERT_PTR(m_pOwner);
  1772. return m_pOwner->AssureInterfaceCreated(fShowError);
  1773. }
  1774. inline /* virtual */ void CIISMBNode::SetInterfaceError(HRESULT hr)
  1775. {
  1776. ASSERT_PTR(m_pOwner);
  1777. m_pOwner->SetInterfaceError(hr);
  1778. }
  1779. inline BOOL CIISMBNode::IsLostInterface(CError & err) const
  1780. {
  1781. return err.Win32Error() == RPC_S_SERVER_UNAVAILABLE;
  1782. }
  1783. inline HRESULT CIISMachine::AssureInterfaceCreated(BOOL fShowError)
  1784. {
  1785. return m_pInterface ? S_OK : CreateInterface(fShowError);
  1786. }
  1787. inline CIISService::QueryImage() const
  1788. {
  1789. ASSERT(m_iServiceDef >= 0);
  1790. return _rgServices[m_iServiceDef].nServiceImage;
  1791. }
  1792. inline CIISService::QueryServiceImage() const
  1793. {
  1794. return QueryImage();
  1795. }
  1796. inline CIISService::QuerySiteImage() const
  1797. {
  1798. ASSERT(m_iServiceDef >= 0);
  1799. return _rgServices[m_iServiceDef].nSiteImage;
  1800. }
  1801. inline CIISService::QueryVDirImage() const
  1802. {
  1803. ASSERT(m_iServiceDef >= 0);
  1804. return _rgServices[m_iServiceDef].nVDirImage;
  1805. }
  1806. inline CIISService::QueryDirImage() const
  1807. {
  1808. ASSERT(m_iServiceDef >= 0);
  1809. return _rgServices[m_iServiceDef].nDirImage;
  1810. }
  1811. inline CIISService::QueryFileImage() const
  1812. {
  1813. ASSERT(m_iServiceDef >= 0);
  1814. return _rgServices[m_iServiceDef].nFileImage;
  1815. }
  1816. inline BOOL CIISService::IsManagedService() const
  1817. {
  1818. return m_fManagedService;
  1819. }
  1820. inline HRESULT CIISSite::ShowPropertiesDlg(
  1821. LPPROPERTYSHEETCALLBACK lpProvider,
  1822. CComAuthInfo * pAuthInfo,
  1823. LPCTSTR lpszMDPath,
  1824. CWnd * pMainWnd,
  1825. LPARAM lParam,
  1826. LONG_PTR handle
  1827. )
  1828. {
  1829. ASSERT_PTR(m_pService);
  1830. return m_pService->ShowSitePropertiesDlg(
  1831. lpProvider,
  1832. pAuthInfo,
  1833. lpszMDPath,
  1834. pMainWnd,
  1835. lParam,
  1836. handle
  1837. );
  1838. }
  1839. inline HRESULT CIISDirectory::ShowPropertiesDlg(
  1840. LPPROPERTYSHEETCALLBACK lpProvider,
  1841. CComAuthInfo * pAuthInfo,
  1842. LPCTSTR lpszMDPath,
  1843. CWnd * pMainWnd,
  1844. LPARAM lParam,
  1845. LONG_PTR handle
  1846. )
  1847. {
  1848. ASSERT_PTR(m_pService);
  1849. return m_pService->ShowDirPropertiesDlg(
  1850. lpProvider,
  1851. pAuthInfo,
  1852. lpszMDPath,
  1853. pMainWnd,
  1854. lParam,
  1855. handle
  1856. );
  1857. }
  1858. inline HRESULT
  1859. CIISFileName::ShowPropertiesDlg(
  1860. LPPROPERTYSHEETCALLBACK lpProvider,
  1861. CComAuthInfo * pAuthInfo,
  1862. LPCTSTR lpszMDPath,
  1863. CWnd * pMainWnd,
  1864. LPARAM lParam,
  1865. LONG_PTR handle
  1866. )
  1867. {
  1868. ASSERT_PTR(m_pService);
  1869. return m_pService->ShowDirPropertiesDlg(
  1870. lpProvider,
  1871. pAuthInfo,
  1872. lpszMDPath,
  1873. pMainWnd,
  1874. lParam,
  1875. handle
  1876. );
  1877. }
  1878. #endif // __IISOBJ_H__