Leaked source code of windows server 2003
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.

2423 lines
54 KiB

  1. /*++
  2. Copyright (c) 1994-2000 Microsoft Corporation
  3. Module Name :
  4. mdkeys.h
  5. Abstract:
  6. Metabase key wrapper classes
  7. Author:
  8. Ronald Meijer (ronaldm)
  9. Sergei Antonov (sergeia)
  10. Project:
  11. Internet Services Manager
  12. Revision History:
  13. 2/17/2000 sergeia removed dependency on MFC
  14. --*/
  15. #ifndef _MDKEYS_H_
  16. #define _MDKEYS_H_
  17. //
  18. // Include Files
  19. //
  20. #include <iadmw.h>
  21. #include <iwamreg.h>
  22. #include <iiscnfgp.h>
  23. #include <winsvc.h>
  24. #include <iisrsta.h>
  25. #include "strpass.h"
  26. //
  27. // Forward definitions
  28. //
  29. class CBlob;
  30. //
  31. // Use this instance number to denote the master
  32. //
  33. #define MASTER_INSTANCE (0)
  34. #define IS_MASTER_INSTANCE(i) (i == MASTER_INSTANCE)
  35. //
  36. // Metabase node constants, used for static initialization of const
  37. // strings further down. Defined here with #defines for easier
  38. // concatenation later.
  39. //
  40. #define SZ_MBN_MACHINE _T("LM")
  41. #define SZ_MBN_FILTERS _T("Filters")
  42. #define SZ_MBN_MIMEMAP _T("MimeMap")
  43. #define SZ_MBN_TEMPLATES _T("Templates")
  44. #define SZ_MBN_INFO _T("Info")
  45. #define SZ_MBN_ROOT _T("Root")
  46. #define SZ_MBN_COMPRESSION _T("Compression")
  47. #define SZ_MBN_PARAMETERS _T("Parameters")
  48. #define SZ_MBN_SEP_CHAR _T('/')
  49. #define SZ_MBN_SEP_STR _T("/")
  50. #define SZ_MBN_ANYSEP_STR _T("/\\")
  51. #define SZ_MBN_WEB _T("W3SVC")
  52. #define SZ_MBN_FTP _T("MSFTPSVC")
  53. #define SZ_MBN_APP_POOLS _T("AppPools")
  54. class CIISInterface;
  55. class _EXPORT CComAuthInfo
  56. /*++
  57. Class Description:
  58. Server/authentication information. Contains optional
  59. impersonation parameters. Typically used in the construction in
  60. CIISInterface.
  61. Public Interface:
  62. CComAuthInfo : Constructor. Impersonation optional
  63. operator= : Assignment operators
  64. CreateServerInfoStruct : Helper function for use in COM
  65. FreeServerInfoStruct : As above.
  66. Notes:
  67. Because there's an operator for a pointer to itself and because
  68. CIISInterface copies the information at construction time, a
  69. CComAuthInfo can safely be constructed on the stack as a parameter
  70. to CIISInterface derived classes.
  71. --*/
  72. {
  73. //
  74. // Constructor/Destructor
  75. //
  76. public:
  77. //
  78. // Standard Constructor. NULL for servername indicates
  79. // local computer.
  80. //
  81. CComAuthInfo(
  82. IN LPCOLESTR lpszServerName = NULL,
  83. IN LPCOLESTR lpszUserName = NULL,
  84. IN LPCOLESTR lpszPassword = NULL
  85. );
  86. //
  87. // Copy Constructors
  88. //
  89. CComAuthInfo(
  90. IN CComAuthInfo & auth
  91. );
  92. CComAuthInfo(
  93. IN CComAuthInfo * pAuthInfo OPTIONAL
  94. );
  95. //
  96. // Assignment operators
  97. //
  98. public:
  99. CComAuthInfo & operator =(CComAuthInfo & auth);
  100. CComAuthInfo & operator =(CComAuthInfo * pAuthInfo);
  101. CComAuthInfo & operator =(LPCTSTR lpszServerName);
  102. //
  103. // Access
  104. //
  105. public:
  106. COSERVERINFO * CreateServerInfoStruct() const;
  107. COSERVERINFO * CreateServerInfoStruct(DWORD dwAuthnLevel) const;
  108. void FreeServerInfoStruct(COSERVERINFO * pServerInfo) const;
  109. LPOLESTR QueryServerName() const { return m_bstrServerName; }
  110. LPOLESTR QueryUserName() const { return m_bstrUserName; }
  111. LPOLESTR QueryPassword() const { return m_bstrPassword; }
  112. BOOL IsLocal() const { return m_fLocal; }
  113. BOOL UsesImpersonation() const { return m_bstrUserName.Length() > 0; }
  114. void SetImpersonation(LPCOLESTR lpszUser, LPCOLESTR lpszPassword);
  115. void RemoveImpersonation();
  116. void StorePassword(LPCOLESTR lpszPassword);
  117. public:
  118. HRESULT ApplyProxyBlanket(IUnknown * pInterface);
  119. HRESULT ApplyProxyBlanket(IUnknown * pInterface,DWORD dwAuthnLevel);
  120. //
  121. // Conversion Operators
  122. //
  123. public:
  124. operator LPOLESTR() { return QueryServerName(); }
  125. operator CComAuthInfo *() { return this; }
  126. //
  127. // Static Helpers
  128. //
  129. public:
  130. //
  131. // Given domain\username, split into user name and domain
  132. //
  133. static BOOL SplitUserNameAndDomain(
  134. IN OUT CString & strUserName,
  135. IN CString & strDomainName
  136. );
  137. //
  138. // Verify username and password are correct
  139. //
  140. static DWORD VerifyUserPassword(
  141. IN LPCTSTR lpstrUserName,
  142. IN LPCTSTR lpstrPassword
  143. );
  144. protected:
  145. //
  146. // Store the computer name (NULL for local computer)
  147. //
  148. void SetComputerName(
  149. IN LPCOLESTR lpszServerName OPTIONAL
  150. );
  151. private:
  152. CComBSTR m_bstrServerName;
  153. CComBSTR m_bstrUserName;
  154. CComBSTR m_bstrPassword;
  155. BOOL m_fLocal;
  156. };
  157. class _EXPORT CMetabasePath
  158. /*++
  159. Class Description:
  160. Metabase path class. This is a helper class to build complete
  161. metabase paths out of various components.
  162. Example: CMetaKey(CComAuthInfo("ronaldm3"), CMetabasePath(SZ_WEBSVC, dwInstance, _T("root")));
  163. --*/
  164. {
  165. //
  166. // Metabase components in order
  167. //
  168. enum
  169. {
  170. iBlank, // Sep 0
  171. iMachine, // LM
  172. iService, // e.g. lm/w3svc
  173. iInstance, // e.g. lm/w3svc/1
  174. iRootDirectory, // e.g. lm/w3svc/1/root
  175. iSubDirectory, // e.g. lm/w3vsc/1/root/foobar
  176. };
  177. //
  178. // Metabase helper functions.
  179. //
  180. public:
  181. //
  182. // Clean metabase path
  183. //
  184. static LPCTSTR CleanMetaPath(
  185. IN OUT CString & strMetaRoot
  186. );
  187. static LPCTSTR CleanMetaPath(
  188. CMetabasePath & path
  189. );
  190. //
  191. // Find the instance number from the given metabase path
  192. //
  193. static DWORD GetInstanceNumber(LPCTSTR lpszMDPath);
  194. //
  195. // Get the last nodename in the given metabase path
  196. //
  197. static LPCTSTR GetLastNodeName(
  198. IN LPCTSTR lpszMDPath,
  199. OUT CString & strNodeName
  200. );
  201. //
  202. // Truncate the path at a given sub path
  203. //
  204. static LPCTSTR TruncatePath(
  205. IN int nLevel,
  206. IN LPCTSTR lpszMDPath,
  207. OUT CString & strNewPath,
  208. OUT CString * pstrRemainder = NULL
  209. );
  210. static LPCTSTR GetMachinePath(
  211. IN LPCTSTR lpszMDPath,
  212. OUT CString & strNewPath,
  213. OUT CString * pstrRemainder = NULL
  214. );
  215. static LPCTSTR GetServicePath(
  216. IN LPCTSTR lpszMDPath,
  217. OUT CString & strNewPath,
  218. OUT CString * pstrRemainder = NULL
  219. );
  220. static LPCTSTR GetInstancePath(
  221. IN LPCTSTR lpszMDPath,
  222. OUT CString & strNewPath,
  223. OUT CString * pstrRemainder = NULL
  224. );
  225. static LPCTSTR GetRootPath(
  226. IN LPCTSTR lpszMDPath,
  227. OUT CString & strNewPath,
  228. OUT CString * pstrRemainder = NULL
  229. );
  230. //
  231. // Determine the path to the info node that's relevant
  232. // to this metabase path.
  233. //
  234. static LPCTSTR GetServiceInfoPath(
  235. IN LPCTSTR lpszMDPath,
  236. OUT CString & strInfoPath,
  237. IN LPCTSTR lpszDefService = SZ_MBN_WEB
  238. );
  239. //
  240. // Change path to parent node
  241. //
  242. static LPCTSTR ConvertToParentPath(
  243. OUT IN CString & strMetaPath
  244. );
  245. static LPCTSTR ConvertToParentPath(
  246. CMetabasePath& path
  247. );
  248. //
  249. // Determine if the path describes a home directory path
  250. //
  251. static BOOL IsHomeDirectoryPath(
  252. IN LPCTSTR lpszMDPath
  253. );
  254. //
  255. // Determine if the path describes the 'master' instance (site)
  256. //
  257. static BOOL IsMasterInstance(
  258. IN LPCTSTR lpszMDPath
  259. );
  260. //
  261. // Split the metapath at the instance border
  262. //
  263. static void SplitMetaPathAtInstance(
  264. IN LPCTSTR lpszMDPath,
  265. OUT CString & strParent,
  266. OUT CString & strAlias
  267. );
  268. static BOOL IsSeparator(TCHAR c);
  269. //
  270. // Constructor/Destructor
  271. //
  272. public:
  273. CMetabasePath(
  274. IN BOOL fAddBasePath,
  275. IN LPCTSTR lpszMDPath,
  276. IN LPCTSTR lpszMDPath2 = NULL,
  277. IN LPCTSTR lpszMDPath3 = NULL,
  278. IN LPCTSTR lpszMDPath4 = NULL
  279. );
  280. //
  281. // Construct with path components
  282. //
  283. CMetabasePath(
  284. IN LPCTSTR lpszSvc = NULL,
  285. IN DWORD dwInstance = MASTER_INSTANCE,
  286. IN LPCTSTR lpszParentPath = NULL,
  287. IN LPCTSTR lpszAlias = NULL
  288. );
  289. //
  290. // Access
  291. //
  292. public:
  293. BOOL IsHomeDirectoryPath() const { return IsHomeDirectoryPath(m_strMetaPath); }
  294. LPCTSTR QueryMetaPath() const { return m_strMetaPath; }
  295. //
  296. // Conversion Operators
  297. //
  298. public:
  299. operator LPCTSTR() const { return QueryMetaPath(); }
  300. //
  301. // Helpers
  302. //
  303. protected:
  304. void BuildMetaPath(
  305. IN LPCTSTR lpszSvc,
  306. IN LPCTSTR szInstance,
  307. IN LPCTSTR lpszParentPath,
  308. IN LPCTSTR lpszAlias
  309. );
  310. void BuildMetaPath(
  311. IN LPCTSTR lpszSvc,
  312. IN DWORD dwInstance,
  313. IN LPCTSTR lpszParentPath,
  314. IN LPCTSTR lpszAlias
  315. );
  316. void AppendPath(LPCTSTR lpszPath);
  317. void AppendPath(DWORD dwInstance);
  318. protected:
  319. //
  320. // Metabase path components
  321. //
  322. static const LPCTSTR _cszMachine;
  323. static const LPCTSTR _cszRoot;
  324. static const LPCTSTR _cszSep;
  325. static const TCHAR _chSep;
  326. static const CString _anySep;
  327. private:
  328. CString m_strMetaPath;
  329. };
  330. class _EXPORT CIISInterface
  331. /*++
  332. Class Description:
  333. Base interface class for IIS interfaces. Most client COM-wrappers
  334. should derive from this class so that they can easily pick up
  335. share authentication and proxy blanket information methods.
  336. Virtual Interface:
  337. Succeeded : Return TRUE if item constructed successfully
  338. QueryResult : Return construction error code
  339. Public Interface:
  340. operator BOOL : Cast to TRUE/FALSE depending on success
  341. operator HRESULT : Cast to the HRESULT status
  342. QueryServerName : Get the server name
  343. IsLocal : Determine if the interface is on the local machine
  344. --*/
  345. {
  346. //
  347. // Constructor/Destructor
  348. //
  349. public:
  350. CIISInterface(
  351. IN CComAuthInfo * pAuthInfo,
  352. IN HRESULT hrInterface = S_OK
  353. );
  354. //
  355. // Interface:
  356. //
  357. public:
  358. CComAuthInfo * QueryAuthInfo() { return &m_auth; }
  359. LPCOLESTR QueryServerName() const { return m_auth.QueryServerName(); }
  360. BOOL IsLocal() const { return m_auth.IsLocal(); }
  361. //
  362. // Virtual Interface:
  363. //
  364. public:
  365. virtual BOOL Succeeded() const { return SUCCEEDED(m_hrInterface); }
  366. virtual HRESULT QueryResult() const { return m_hrInterface; }
  367. virtual HRESULT ChangeProxyBlanket(
  368. IN LPCOLESTR lpszUserName,
  369. IN LPCOLESTR lpszPassword
  370. );
  371. //
  372. // Conversion Operators
  373. //
  374. public:
  375. operator BOOL() const { return Succeeded(); }
  376. operator HRESULT() const { return m_hrInterface; }
  377. protected:
  378. virtual HRESULT ApplyProxyBlanket() = 0;
  379. HRESULT Create(
  380. IN int cInterfaces,
  381. IN const IID rgIID[],
  382. IN const GUID rgCLSID[],
  383. OUT int * pnInterface, OPTIONAL
  384. OUT IUnknown ** ppInterface
  385. );
  386. protected:
  387. CComAuthInfo m_auth;
  388. HRESULT m_hrInterface;
  389. };
  390. class _EXPORT CMetaInterface : public CIISInterface
  391. /*++
  392. Class description:
  393. Metabase interface class.
  394. Virtual Interface:
  395. Succeeded : Return TRUE if item constructed successfully
  396. QueryResult : Return construction error code
  397. Public Interface:
  398. Regenerate : Recreate the interface
  399. --*/
  400. {
  401. public:
  402. //
  403. // Destructor destroys the interface
  404. //
  405. virtual ~CMetaInterface();
  406. //
  407. // Constructor/Destructor
  408. //
  409. protected:
  410. //
  411. // Fully defined constructor that creates the interface.
  412. // Use NULL to indicate the local computer name
  413. //
  414. CMetaInterface(
  415. IN CComAuthInfo * pServer
  416. );
  417. //
  418. // Construct from existing interface
  419. //
  420. CMetaInterface(
  421. IN CMetaInterface * pInterface
  422. );
  423. public:
  424. //
  425. // Rebuild the interface
  426. //
  427. HRESULT Regenerate();
  428. //
  429. // Flush matabase to disk
  430. //
  431. HRESULT SaveData();
  432. //
  433. IMSAdminBase * GetInterface() { return m_pInterface; }
  434. HRESULT GetAdminInterface2(IMSAdminBase2 ** pp);
  435. protected:
  436. virtual HRESULT ApplyProxyBlanket();
  437. //
  438. // Create a metadata object in this server. This function initializes the
  439. // metadata object with DCOM.
  440. //
  441. HRESULT Create();
  442. //
  443. // Make sure the interface has been created
  444. //
  445. BOOL HasInterface() const { return m_pInterface != NULL; }
  446. //
  447. // IADMW Interface -- all methods defines as inline at the end of this file.
  448. //
  449. protected:
  450. HRESULT OpenKey(
  451. IN METADATA_HANDLE hkBase,
  452. IN LPCTSTR lpszMDPath,
  453. IN DWORD dwFlags,
  454. OUT METADATA_HANDLE * phMDNewHandle
  455. );
  456. HRESULT CloseKey(
  457. IN METADATA_HANDLE hKey
  458. );
  459. HRESULT SetLastChangeTime(
  460. IN METADATA_HANDLE hMDHandle,
  461. IN LPCTSTR pszMDPath,
  462. IN FILETIME * pftMDLastChangeTime,
  463. IN BOOL bLocalTime
  464. );
  465. HRESULT GetLastChangeTime(
  466. IN METADATA_HANDLE hMDHandle,
  467. IN LPCTSTR lpszMDPath,
  468. OUT FILETIME * pftMDLastChangeTime,
  469. IN BOOL bLocalTime
  470. );
  471. HRESULT AddKey(
  472. IN METADATA_HANDLE hKey,
  473. IN LPCTSTR lpszMDPath
  474. );
  475. HRESULT DeleteKey(
  476. IN METADATA_HANDLE hKey,
  477. IN LPCTSTR lpszMDPath
  478. );
  479. HRESULT DeleteChildKeys(
  480. IN METADATA_HANDLE hKey,
  481. IN LPCTSTR lpszMDPath
  482. );
  483. HRESULT EnumKeys(
  484. IN METADATA_HANDLE hKey,
  485. IN LPCTSTR lpszMDPath,
  486. OUT LPTSTR lpszMDName,
  487. IN DWORD dwIndex
  488. );
  489. HRESULT CopyKey(
  490. IN METADATA_HANDLE hSourceKey,
  491. IN LPCTSTR lpszMDSourcePath,
  492. IN METADATA_HANDLE hDestKey,
  493. IN LPCTSTR lpszMDDestPath,
  494. IN BOOL fOverwrite,
  495. IN BOOL fCopy
  496. );
  497. HRESULT RenameKey(
  498. IN METADATA_HANDLE hKey,
  499. IN LPCTSTR lpszMDPath,
  500. IN LPCTSTR lpszNewName
  501. );
  502. HRESULT GetData(
  503. IN METADATA_HANDLE hKey,
  504. IN LPCTSTR lpszMDPath,
  505. OUT METADATA_RECORD * pmdRecord,
  506. OUT DWORD * pdwRequiredDataLen
  507. );
  508. HRESULT SetData(
  509. IN METADATA_HANDLE hKey,
  510. IN LPCTSTR lpszMDPath,
  511. IN METADATA_RECORD * pmdRecord
  512. );
  513. HRESULT DeleteData(
  514. IN METADATA_HANDLE hKey,
  515. IN LPCTSTR lpszMDPath,
  516. IN DWORD dwMDIdentifier,
  517. IN DWORD dwMDDataType
  518. );
  519. HRESULT EnumData(
  520. IN METADATA_HANDLE hKey,
  521. IN LPCTSTR lpszMDPath,
  522. OUT METADATA_RECORD * pmdRecord,
  523. IN DWORD dwIndex,
  524. OUT DWORD * pdwRequiredDataLen
  525. );
  526. HRESULT GetAllData(
  527. IN METADATA_HANDLE hKey,
  528. IN LPCTSTR lpszMDPath,
  529. IN DWORD dwMDAttributes,
  530. IN DWORD dwMDUserType,
  531. IN DWORD dwMDDataType,
  532. OUT DWORD * pdwMDNumDataEntries,
  533. OUT DWORD * pdwMDDataSetNumber,
  534. IN DWORD dwMDBufferSize,
  535. OUT LPBYTE pbMDBuffer,
  536. OUT DWORD * pdwRequiredBufferSize
  537. );
  538. HRESULT DeleteAllData(
  539. IN METADATA_HANDLE hKey,
  540. IN LPCTSTR lpszMDPath,
  541. IN DWORD dwMDUserType,
  542. IN DWORD dwMDDataType
  543. );
  544. HRESULT CopyData(
  545. IN METADATA_HANDLE hMDSourceKey,
  546. IN LPCTSTR lpszMDSourcePath,
  547. IN METADATA_HANDLE hMDDestKey,
  548. IN LPCTSTR lpszMDDestPath,
  549. IN DWORD dwMDAttributes,
  550. IN DWORD dwMDUserType,
  551. IN DWORD dwMDDataType,
  552. IN BOOL fCopy
  553. );
  554. HRESULT GetDataPaths(
  555. IN METADATA_HANDLE hKey,
  556. IN LPCTSTR lpszMDPath,
  557. IN DWORD dwMDIdentifier,
  558. IN DWORD dwMDDataType,
  559. IN DWORD dwMDBufferSize,
  560. OUT LPTSTR lpszBuffer,
  561. OUT DWORD * pdwMDRequiredBufferSize
  562. );
  563. HRESULT Backup(
  564. IN LPCTSTR lpszBackupLocation,
  565. IN DWORD dwMDVersion,
  566. IN DWORD dwMDFlags
  567. );
  568. HRESULT Restore(
  569. IN LPCTSTR lpszBackupLocation,
  570. IN DWORD dwMDVersion,
  571. IN DWORD dwMDFlags
  572. );
  573. HRESULT EnumBackups(
  574. OUT LPTSTR lpszBackupLocation,
  575. OUT DWORD * pdwMDVersion,
  576. OUT FILETIME * pftMDBackupTime,
  577. IN DWORD dwIndex
  578. );
  579. HRESULT DeleteBackup(
  580. IN LPCTSTR lpszBackupLocation,
  581. IN DWORD dwMDVersion
  582. );
  583. protected:
  584. IMSAdminBase * m_pInterface;
  585. private:
  586. int m_iTimeOutValue;
  587. };
  588. class _EXPORT CMetaKey : public CMetaInterface
  589. /*++
  590. Class Description:
  591. Metabase key wrapper class
  592. Public Interface:
  593. CMetaKey : Constructor
  594. ~CMetaKey : Destructor
  595. Succeeded : TRUE if key opened successfully.
  596. QueryResult : Get the HRESULT status
  597. QueryValue : Various overloaded methods to get values
  598. SetValue : Various overloaded methods to set values
  599. DeleteValue : Delete a value
  600. Open : Open key
  601. ReOpen : Re key that was opened before
  602. Close : Close key
  603. ConvertToParentPath : Change path to parent path
  604. operator METADATA_HANDLE : Cast to a metadata handle
  605. operator LPCTSTR : Cast to the metabase path
  606. operator BOOL : Cast to TRUE if the key is open, FALSE if not
  607. GetHandle : Obtain metadata handle
  608. IsOpen : TRUE if a key is open
  609. QueryMetaPath : Get the relative metabase path
  610. QueryFlags : Get the open permissions
  611. --*/
  612. {
  613. //
  614. // Constructor/Destructor
  615. //
  616. public:
  617. //
  618. // Null constructor that only creates the interface.
  619. // A key constructed this way may read from META_ROOT_HANDLE.
  620. // This is not true of other constructors.
  621. //
  622. CMetaKey(
  623. IN CComAuthInfo * pServer
  624. );
  625. //
  626. // As above, using an existing interface
  627. //
  628. CMetaKey(
  629. IN CMetaInterface * pInterface
  630. );
  631. //
  632. // Fully defined constructor that opens a key
  633. //
  634. CMetaKey(
  635. IN CComAuthInfo * pServer,
  636. IN LPCTSTR lpszMDPath,
  637. IN DWORD dwFlags = METADATA_PERMISSION_READ,
  638. IN METADATA_HANDLE hkBase = METADATA_MASTER_ROOT_HANDLE
  639. );
  640. //
  641. // As above, using an existing interface
  642. //
  643. CMetaKey(
  644. IN CMetaInterface * pInterface,
  645. IN LPCTSTR lpszMDPath,
  646. IN DWORD dwFlags = METADATA_PERMISSION_READ,
  647. IN METADATA_HANDLE hkBase = METADATA_MASTER_ROOT_HANDLE
  648. );
  649. //
  650. // Copy constructor, might or might not own the key
  651. //
  652. CMetaKey(
  653. IN BOOL fOwnKey,
  654. IN CMetaKey * pKey
  655. );
  656. //
  657. // Destructor -- closes key.
  658. //
  659. virtual ~CMetaKey();
  660. //
  661. // Interface
  662. //
  663. public:
  664. //
  665. // Fetch a DWORD
  666. //
  667. HRESULT QueryValue(
  668. IN DWORD dwID,
  669. OUT DWORD & dwValue,
  670. IN BOOL * pfInheritanceOverride = NULL,
  671. IN LPCTSTR lpszMDPath = NULL,
  672. OUT DWORD * pdwAttributes = NULL
  673. );
  674. //
  675. // Fetch a boolean
  676. //
  677. HRESULT QueryValue(
  678. IN DWORD dwID,
  679. OUT BOOL & fValue,
  680. IN BOOL * pfInheritanceOverride = NULL,
  681. IN LPCTSTR lpszMDPath = NULL,
  682. OUT DWORD * pdwAttributes = NULL
  683. );
  684. //
  685. // Fetch a string
  686. //
  687. HRESULT QueryValue(
  688. IN DWORD dwID,
  689. OUT CString & strValue,
  690. IN BOOL * pfInheritanceOverride = NULL,
  691. IN LPCTSTR lpszMDPath = NULL,
  692. OUT DWORD * pdwAttributes = NULL
  693. );
  694. //
  695. // Fetch a CStrPassword
  696. //
  697. HRESULT QueryValue(
  698. IN DWORD dwID,
  699. OUT CStrPassword & strValue,
  700. IN BOOL * pfInheritanceOverride = NULL,
  701. IN LPCTSTR lpszMDPath = NULL,
  702. OUT DWORD * pdwAttributes = NULL
  703. );
  704. //
  705. // Fetch a BSTR
  706. //
  707. HRESULT QueryValue(
  708. IN DWORD dwID,
  709. OUT CComBSTR & strValue,
  710. IN BOOL * pfInheritanceOverride = NULL,
  711. IN LPCTSTR lpszMDPath = NULL,
  712. OUT DWORD * pdwAttributes = NULL
  713. );
  714. //
  715. // Fetch a string list
  716. //
  717. HRESULT QueryValue(
  718. IN DWORD dwID,
  719. OUT CStringListEx & strlValue,
  720. IN BOOL * pfInheritanceOverride = NULL,
  721. IN LPCTSTR lpszMDPath = NULL,
  722. OUT DWORD * pdwAttributes = NULL
  723. );
  724. //
  725. // Fetch binary blob
  726. //
  727. HRESULT QueryValue(
  728. IN DWORD dwID,
  729. OUT CBlob & blValue,
  730. IN BOOL * pfInheritanceOverride = NULL,
  731. IN LPCTSTR lpszMDPath = NULL,
  732. OUT DWORD * pdwAttributes = NULL
  733. );
  734. //
  735. // Store a DWORD
  736. //
  737. HRESULT SetValue(
  738. IN DWORD dwID,
  739. IN DWORD dwValue,
  740. IN BOOL * pfInheritanceOverride = NULL,
  741. IN LPCTSTR lpszMDPath = NULL
  742. );
  743. //
  744. // Store a BOOL
  745. //
  746. HRESULT SetValue(
  747. IN DWORD dwID,
  748. IN BOOL fValue,
  749. IN BOOL * pfInheritanceOverride = NULL,
  750. IN LPCTSTR lpszMDPath = NULL
  751. );
  752. //
  753. // Store a string
  754. //
  755. HRESULT SetValue(
  756. IN DWORD dwID,
  757. IN CString & strValue,
  758. IN BOOL * pfInheritanceOverride = NULL,
  759. IN LPCTSTR lpszMDPath = NULL
  760. );
  761. //
  762. // Store a CStrPassword
  763. //
  764. HRESULT SetValue(
  765. IN DWORD dwID,
  766. IN CStrPassword & strValue,
  767. IN BOOL * pfInheritanceOverride = NULL,
  768. IN LPCTSTR lpszMDPath = NULL
  769. );
  770. //
  771. // Store a BSTR
  772. //
  773. HRESULT SetValue(
  774. IN DWORD dwID,
  775. IN CComBSTR & strValue,
  776. IN BOOL * pfInheritanceOverride = NULL,
  777. IN LPCTSTR lpszMDPath = NULL
  778. );
  779. //
  780. // Store a stringlist
  781. //
  782. HRESULT SetValue(
  783. IN DWORD dwID,
  784. IN CStringListEx & strlValue,
  785. IN BOOL * pfInheritanceOverride = NULL,
  786. IN LPCTSTR lpszMDPath = NULL
  787. );
  788. //
  789. // Store a binary blob
  790. //
  791. HRESULT SetValue(
  792. IN DWORD dwID,
  793. IN CBlob & blValue,
  794. IN BOOL * pfInheritanceOverride = NULL,
  795. IN LPCTSTR lpszMDPath = NULL
  796. );
  797. //
  798. // Delete Value:
  799. //
  800. HRESULT DeleteValue(
  801. IN DWORD dwID,
  802. IN LPCTSTR lpszMDPath = NULL
  803. );
  804. //
  805. // Check for path existance
  806. //
  807. HRESULT DoesPathExist(
  808. IN LPCTSTR lpszMDPath
  809. );
  810. //
  811. // Create current path (which we attempted to open, and got
  812. // a path not found error on).
  813. //
  814. HRESULT CreatePathFromFailedOpen();
  815. //
  816. // Check for descendant overrides
  817. //
  818. HRESULT CheckDescendants(
  819. IN DWORD dwID,
  820. IN CComAuthInfo * pServer,
  821. IN LPCTSTR lpszMDPath = NULL
  822. );
  823. //
  824. // Open key
  825. //
  826. HRESULT Open(
  827. IN DWORD dwFlags,
  828. IN LPCTSTR lpszMDPath = NULL,
  829. IN METADATA_HANDLE hkBase = METADATA_MASTER_ROOT_HANDLE
  830. );
  831. //
  832. // Re-open previously opened key
  833. //
  834. HRESULT ReOpen(
  835. IN DWORD dwFlags
  836. );
  837. //
  838. // As above using the same permissions as before
  839. //
  840. HRESULT ReOpen();
  841. //
  842. // Open the parent object
  843. //
  844. HRESULT ConvertToParentPath(
  845. IN BOOL fImmediate
  846. );
  847. //
  848. // Close key, set it to NULL, but doesn't destroy the interface
  849. //
  850. HRESULT Close();
  851. //
  852. // Add key
  853. //
  854. HRESULT AddKey(
  855. IN LPCTSTR lpszMDPath
  856. );
  857. //
  858. // Delete key off currently open key
  859. //
  860. HRESULT DeleteKey(
  861. IN LPCTSTR lpszMDPath
  862. );
  863. //
  864. // Rename key off currently open key
  865. //
  866. HRESULT RenameKey(
  867. IN LPCTSTR lpszMDPath,
  868. IN LPCTSTR lpszNewName
  869. );
  870. //
  871. // Get list of descendant nodes that override
  872. // a specific value
  873. //
  874. HRESULT GetDataPaths(
  875. OUT CStringListEx & strlNodes,
  876. IN DWORD dwMDIdentifier,
  877. IN DWORD dwMDDataType,
  878. IN LPCTSTR lpszMDPath = NULL
  879. );
  880. //
  881. // Access
  882. //
  883. public:
  884. METADATA_HANDLE GetHandle() const { return m_hKey; }
  885. METADATA_HANDLE GetBase() const { return m_hBase; }
  886. LPCTSTR QueryMetaPath() const { return m_strMetaPath; }
  887. DWORD QueryFlags() const { return m_dwFlags; }
  888. BOOL IsOpen() const { return m_hKey != NULL; }
  889. BOOL IsHomeDirectoryPath() const ;
  890. //
  891. // Conversion operators
  892. //
  893. public:
  894. operator METADATA_HANDLE() const { return GetHandle(); }
  895. operator LPCTSTR() const { return QueryMetaPath(); }
  896. operator BOOL() const { return IsOpen(); }
  897. //
  898. // Virtual Interface:
  899. //
  900. public:
  901. virtual BOOL Succeeded() const;
  902. virtual HRESULT QueryResult() const;
  903. //
  904. // Protected members
  905. //
  906. protected:
  907. //
  908. // Get data
  909. //
  910. HRESULT GetPropertyValue(
  911. IN DWORD dwID,
  912. OUT IN DWORD & dwSize,
  913. OUT IN void *& pvData,
  914. OUT IN DWORD * pdwDataType = NULL,
  915. IN BOOL * pfInheritanceOverride = NULL,
  916. IN LPCTSTR lpszMDPath = NULL,
  917. OUT DWORD * pdwAttributes = NULL
  918. );
  919. //
  920. // Store data
  921. //
  922. HRESULT SetPropertyValue(
  923. IN DWORD dwID,
  924. IN DWORD dwSize,
  925. IN void * pvData,
  926. IN BOOL * pfInheritanceOverride = NULL,
  927. IN LPCTSTR lpszMDPath = NULL
  928. );
  929. //
  930. // Get All Data off the open key
  931. //
  932. HRESULT GetAllData(
  933. IN DWORD dwMDAttributes,
  934. IN DWORD dwMDUserType,
  935. IN DWORD dwMDDataType,
  936. OUT DWORD * pdwMDNumEntries,
  937. OUT DWORD * pdwMDDataLen,
  938. OUT PBYTE * ppbMDData,
  939. IN LPCTSTR lpszMDPath = NULL
  940. );
  941. //
  942. // Property Table Methods
  943. //
  944. protected:
  945. //
  946. // Metabase table entry definition
  947. //
  948. typedef struct tagMDFIELDDEF
  949. {
  950. DWORD dwMDIdentifier;
  951. DWORD dwMDAttributes;
  952. DWORD dwMDUserType;
  953. DWORD dwMDDataType;
  954. UINT uStringID;
  955. } MDFIELDDEF;
  956. static const MDFIELDDEF s_rgMetaTable[];
  957. //
  958. // CODEWORK: Ideally, these should be protected, but are used
  959. // by idlg.
  960. //
  961. public:
  962. static BOOL GetMDFieldDef(
  963. DWORD dwID,
  964. DWORD & dwMDIdentifier,
  965. DWORD & dwMDAttributes,
  966. DWORD & dwMDUserType,
  967. DWORD & dwMDDataType
  968. );
  969. //
  970. // Map metabase ID value to table index
  971. //
  972. static int MapMDIDToTableIndex(DWORD dwID);
  973. //
  974. // Allow limited access to the table
  975. //
  976. public:
  977. static BOOL IsPropertyInheritable(DWORD dwID);
  978. static BOOL GetPropertyDescription(DWORD dwID, CString & strName);
  979. protected:
  980. BOOL m_fAllowRootOperations;
  981. BOOL m_fOwnKey;
  982. DWORD m_cbInitialBufferSize;
  983. DWORD m_dwFlags;
  984. HRESULT m_hrKey;
  985. CString m_strMetaPath;
  986. METADATA_HANDLE m_hKey;
  987. METADATA_HANDLE m_hBase;
  988. };
  989. class _EXPORT CWamInterface : public CIISInterface
  990. /*++
  991. Class description:
  992. WAM interface class
  993. Virtual Interface:
  994. Succeeded : Return TRUE if item constructed successfully
  995. QueryResult : Return construction error code
  996. Public Interface:
  997. SupportsPooledProc : Check to see if pooled out of proc is supported.
  998. --*/
  999. {
  1000. //
  1001. // App Protection States:
  1002. //
  1003. public:
  1004. enum
  1005. {
  1006. //
  1007. // Note: order must match MD_APP_ISOLATED values
  1008. //
  1009. APP_INPROC,
  1010. APP_OUTOFPROC,
  1011. APP_POOLEDPROC,
  1012. };
  1013. //
  1014. // Constructor/Destructor
  1015. //
  1016. public:
  1017. //
  1018. // Destructor destroys the interface
  1019. //
  1020. virtual ~CWamInterface();
  1021. protected:
  1022. //
  1023. // Fully defined constructor that creates the interface.
  1024. // Use NULL to create the interface on the local computer
  1025. //
  1026. CWamInterface(
  1027. IN CComAuthInfo * pServer
  1028. );
  1029. //
  1030. // Construct from existing interface.
  1031. //
  1032. CWamInterface(
  1033. IN CWamInterface * pInterface
  1034. );
  1035. //
  1036. // Access
  1037. //
  1038. public:
  1039. BOOL SupportsPooledProc() const { return m_fSupportsPooledProc; }
  1040. protected:
  1041. virtual HRESULT ApplyProxyBlanket();
  1042. //
  1043. // Create a wam object in this server. This function initializes the
  1044. // object with DCOM.
  1045. //
  1046. HRESULT Create();
  1047. //
  1048. // Make sure the interface has been created
  1049. //
  1050. BOOL HasInterface() const { return m_pInterface != NULL; }
  1051. //
  1052. // IWAM Interface
  1053. //
  1054. protected:
  1055. HRESULT AppCreate(
  1056. IN LPCTSTR szMDPath,
  1057. IN DWORD dwAppProtection
  1058. );
  1059. HRESULT AppDelete(
  1060. IN LPCTSTR szMDPath,
  1061. IN BOOL fRecursive
  1062. );
  1063. HRESULT AppUnLoad(
  1064. IN LPCTSTR szMDPath,
  1065. IN BOOL fRecursive
  1066. );
  1067. HRESULT AppGetStatus(
  1068. IN LPCTSTR szMDPath,
  1069. OUT DWORD * pdwAppStatus
  1070. );
  1071. HRESULT AppDeleteRecoverable(
  1072. IN LPCTSTR szMDPath,
  1073. IN BOOL fRecursive
  1074. );
  1075. HRESULT AppRecover(
  1076. IN LPCTSTR szMDPath,
  1077. IN BOOL fRecursive
  1078. );
  1079. protected:
  1080. IWamAdmin * m_pInterface;
  1081. private:
  1082. BOOL m_fSupportsPooledProc;
  1083. };
  1084. class _EXPORT CMetaBack : public CMetaInterface, public CWamInterface
  1085. /*++
  1086. Class Description:
  1087. Metabase backup/restore class
  1088. Virtual Interface:
  1089. Succeeded : Return TRUE if item constructed successfully
  1090. QueryResult : Return construction error code
  1091. Public Interface:
  1092. Reset : Enum first existing backup
  1093. Next : Enum next existing backup
  1094. Backup : Create new backup
  1095. Delete : Delete existing backup
  1096. Restore : Restore from existing backup
  1097. --*/
  1098. {
  1099. public:
  1100. //
  1101. // Construct and create the interfaces. Use NULL to create
  1102. // on the local computer.
  1103. //
  1104. CMetaBack(
  1105. IN CComAuthInfo * pServer
  1106. );
  1107. //
  1108. // Virtual Interface
  1109. //
  1110. public:
  1111. virtual BOOL Succeeded() const;
  1112. virtual HRESULT QueryResult() const;
  1113. //
  1114. // Interface
  1115. //
  1116. public:
  1117. //
  1118. // Reset counter
  1119. //
  1120. void Reset() { m_dwIndex = 0L; }
  1121. HRESULT Next(
  1122. OUT DWORD * pdwVersion,
  1123. OUT LPTSTR lpszLocation,
  1124. OUT FILETIME * pftBackupTime
  1125. );
  1126. HRESULT Backup(
  1127. IN LPCTSTR lpszLocation
  1128. );
  1129. HRESULT Delete(
  1130. IN LPCTSTR lpszLocation,
  1131. IN DWORD dwVersion
  1132. );
  1133. HRESULT Restore(
  1134. IN LPCTSTR lpszLocation,
  1135. IN DWORD dwVersion
  1136. );
  1137. protected:
  1138. virtual HRESULT ApplyProxyBlanket();
  1139. protected:
  1140. static const LPCTSTR s_szMasterAppRoot;
  1141. private:
  1142. DWORD m_dwIndex;
  1143. };
  1144. class _EXPORT CMetaEnumerator : public CMetaKey
  1145. /*++
  1146. Class Description:
  1147. Metabase key enumerator
  1148. Public Interface:
  1149. CMetaEnumerator : Constructor
  1150. Reset : Reset the enumerator
  1151. Next : Get next key
  1152. --*/
  1153. {
  1154. public:
  1155. //
  1156. // Constructor creates a new interface and opens a key
  1157. //
  1158. CMetaEnumerator(
  1159. IN CComAuthInfo * pServer,
  1160. IN LPCTSTR lpszMDPath = NULL,
  1161. IN METADATA_HANDLE hkBase = METADATA_MASTER_ROOT_HANDLE
  1162. );
  1163. //
  1164. // Constructor which uses an existing interface and opens
  1165. // a new key
  1166. //
  1167. CMetaEnumerator(
  1168. IN CMetaInterface * pInterface,
  1169. IN LPCTSTR lpszMDPath = NULL,
  1170. IN METADATA_HANDLE hkBase = METADATA_MASTER_ROOT_HANDLE
  1171. );
  1172. //
  1173. // Constructor which uses an open key
  1174. //
  1175. CMetaEnumerator(
  1176. IN BOOL fOwnKey,
  1177. IN CMetaKey * pKey
  1178. );
  1179. //
  1180. // Interface:
  1181. //
  1182. public:
  1183. //
  1184. // Reset counter
  1185. //
  1186. void Reset(DWORD counter = 0L) { m_dwIndex = counter; }
  1187. DWORD GetIndex() { return m_dwIndex; }
  1188. // Index stack operators, used for recursive enums
  1189. void Push()
  1190. {
  1191. m_stack.push(m_dwIndex);
  1192. }
  1193. void Pop()
  1194. {
  1195. ASSERT(!m_stack.empty());
  1196. m_dwIndex = m_stack.top();
  1197. m_stack.pop();
  1198. }
  1199. //
  1200. // Get next key as string.
  1201. //
  1202. HRESULT Next(
  1203. OUT CString & strKey,
  1204. IN LPCTSTR lpszMDPath = NULL
  1205. );
  1206. //
  1207. // Get next key as a DWORD (numeric keys only)
  1208. //
  1209. HRESULT Next(
  1210. OUT DWORD & dwKey,
  1211. OUT CString & strKey,
  1212. IN LPCTSTR lpszMDPath = NULL
  1213. );
  1214. private:
  1215. DWORD m_dwIndex;
  1216. std::stack<DWORD> m_stack;
  1217. };
  1218. class _EXPORT CIISApplication : public CWamInterface, public CMetaKey
  1219. /*++
  1220. Class Description:
  1221. IIS Application class
  1222. Virtual Interface:
  1223. Succeeded : Return TRUE if item constructed successfully
  1224. QueryResult : Return construction error code
  1225. Public Interface:
  1226. RefreshState : Refresh application state
  1227. QueryAppState : Return current application state
  1228. IsEnabledApplication: Return TRUE if appplication is enabled.
  1229. Create : Create app
  1230. Delete : Delete app
  1231. Unload : Unload app
  1232. DeleteRecoverable : Delete w. recovery allowed
  1233. Recover : Recover
  1234. WriteFriendlyName : Write friendly name to metabase
  1235. --*/
  1236. {
  1237. //
  1238. // Constructor/Destructor
  1239. //
  1240. public:
  1241. CIISApplication(
  1242. IN CComAuthInfo * pServer,
  1243. IN LPCTSTR lpszMetapath
  1244. );
  1245. //
  1246. // Virtual Interface:
  1247. //
  1248. public:
  1249. virtual BOOL Succeeded() const;
  1250. virtual HRESULT QueryResult() const;
  1251. //
  1252. // Interface
  1253. //
  1254. public:
  1255. DWORD QueryAppState() const { return m_dwAppState; }
  1256. LPCTSTR QueryWamPath() const { return m_strWamPath; }
  1257. BOOL IsEnabledApplication() const;
  1258. HRESULT RefreshAppState();
  1259. HRESULT Create(LPCTSTR lpszName, DWORD dwAppProtection);
  1260. HRESULT Delete(BOOL fRecursive = FALSE);
  1261. HRESULT Unload(BOOL fRecursive = FALSE);
  1262. HRESULT DeleteRecoverable(BOOL fRecursive = FALSE);
  1263. HRESULT Recover(BOOL fRecursive = FALSE);
  1264. HRESULT WriteFriendlyName(LPCTSTR lpszName);
  1265. public:
  1266. BOOL IsInproc() const { return m_dwProcessProtection == APP_INPROC; }
  1267. BOOL IsOutOfProc() const { return m_dwProcessProtection == APP_OUTOFPROC; }
  1268. BOOL IsPooledProc() const { return m_dwProcessProtection == APP_POOLEDPROC; }
  1269. public:
  1270. DWORD m_dwProcessProtection;
  1271. CString m_strFriendlyName;
  1272. CString m_strAppRoot;
  1273. protected:
  1274. void CommonConstruct();
  1275. private:
  1276. DWORD m_dwAppState;
  1277. CString m_strWamPath;
  1278. HRESULT m_hrApp;
  1279. };
  1280. class _EXPORT CIISSvcControl : public CIISInterface
  1281. /*++
  1282. Class description:
  1283. IIS Service control
  1284. Virtual Interface:
  1285. Succeeded : Return TRUE if item constructed successfully
  1286. QueryResult : Return construction error code
  1287. --*/
  1288. {
  1289. //
  1290. // Constructor/Destructor
  1291. //
  1292. public:
  1293. //
  1294. // Fully defined constructor that creates the interface.
  1295. // Use NULL to create the interface on the local computer
  1296. //
  1297. CIISSvcControl(
  1298. IN CComAuthInfo * pServer
  1299. );
  1300. //
  1301. // Construct from existing interface.
  1302. //
  1303. CIISSvcControl(
  1304. IN CIISSvcControl * pInterface
  1305. );
  1306. //
  1307. // Destructor destroys the interface
  1308. //
  1309. virtual ~CIISSvcControl();
  1310. protected:
  1311. //
  1312. // Create an object in this server. This function initializes the
  1313. // object with DCOM.
  1314. //
  1315. HRESULT Create();
  1316. //
  1317. // Make sure the interface has been created
  1318. //
  1319. BOOL HasInterface() const { return m_pInterface != NULL; }
  1320. //
  1321. // Interface
  1322. //
  1323. public:
  1324. //
  1325. // Stop services
  1326. //
  1327. HRESULT Stop(
  1328. IN DWORD dwTimeoutMsecs,
  1329. IN BOOL fForce
  1330. );
  1331. //
  1332. // Start services
  1333. //
  1334. HRESULT Start(
  1335. IN DWORD dwTimeoutMsecs
  1336. );
  1337. //
  1338. // Reboot
  1339. //
  1340. HRESULT Reboot(
  1341. IN DWORD dwTimeouMsecs,
  1342. IN BOOL fForceAppsClosed
  1343. );
  1344. //
  1345. // Status
  1346. //
  1347. HRESULT Status(
  1348. IN DWORD dwBufferSize,
  1349. OUT LPBYTE pbBuffer,
  1350. OUT DWORD * MDRequiredBufferSize,
  1351. OUT DWORD * pdwNumServices
  1352. );
  1353. //
  1354. // Kill
  1355. //
  1356. HRESULT Kill();
  1357. protected:
  1358. virtual HRESULT ApplyProxyBlanket();
  1359. protected:
  1360. IIisServiceControl * m_pInterface;
  1361. };
  1362. #ifdef KEVLAR
  1363. class _EXPORT CWebCluster : public CIISInterface
  1364. /*++
  1365. Class description:
  1366. IWebCluster warpper
  1367. Virtual Interface:
  1368. Succeeded : Return TRUE if item constructed successfully
  1369. QueryResult : Return construction error code
  1370. --*/
  1371. {
  1372. //
  1373. // Constructor/Destructor
  1374. //
  1375. public:
  1376. //
  1377. // Fully defined constructor that creates the interface.
  1378. // Use NULL to create the interface on the local computer
  1379. //
  1380. CWebCluster(
  1381. CComAuthInfo * pServer
  1382. );
  1383. //
  1384. // Destructor destroys the interface
  1385. //
  1386. virtual ~CWebCluster();
  1387. protected:
  1388. //
  1389. // Create an object in this server. This function initializes the
  1390. // object with DCOM.
  1391. //
  1392. HRESULT Create();
  1393. //
  1394. // Make sure the interface has been created
  1395. //
  1396. BOOL HasInterface() const { return m_pInterface != NULL; }
  1397. //
  1398. // Interface
  1399. //
  1400. public:
  1401. #if (0) // dantra: 8/17/99 legacy code, not supported by new IWebCluster interfaces
  1402. HRESULT GetParameter(
  1403. LONG lParamId,
  1404. BSTR bstrParamInfo,
  1405. VARIANT * lpvarParam
  1406. );
  1407. HRESULT SetParameter(
  1408. LONG lParam,
  1409. BSTR bstrParamInfo,
  1410. VARIANT * lpvarResults
  1411. );
  1412. #endif
  1413. protected:
  1414. virtual HRESULT ApplyProxyBlanket();
  1415. protected:
  1416. IWebCluster * m_pInterface;
  1417. };
  1418. #endif
  1419. //
  1420. // Inline Expansion
  1421. //
  1422. // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  1423. inline void CComAuthInfo::StorePassword(LPCOLESTR lpszPassword)
  1424. {
  1425. m_bstrPassword = lpszPassword;
  1426. }
  1427. inline /* virtual */ HRESULT CIISInterface::ChangeProxyBlanket(
  1428. IN LPCOLESTR lpszUserName,
  1429. IN LPCOLESTR lpszPassword
  1430. )
  1431. {
  1432. m_auth.SetImpersonation(lpszUserName, lpszPassword);
  1433. return ApplyProxyBlanket();
  1434. }
  1435. inline /*static */ LPCTSTR CMetabasePath::GetMachinePath(
  1436. IN LPCTSTR lpszMDPath,
  1437. OUT CString & strNewPath,
  1438. OUT CString * pstrRemainder
  1439. )
  1440. {
  1441. return TruncatePath(iMachine, lpszMDPath, strNewPath, pstrRemainder);
  1442. }
  1443. inline /* static */ LPCTSTR CMetabasePath::GetServicePath(
  1444. IN LPCTSTR lpszMDPath,
  1445. OUT CString & strNewPath,
  1446. OUT CString * pstrRemainder
  1447. )
  1448. {
  1449. return TruncatePath(iService, lpszMDPath, strNewPath, pstrRemainder);
  1450. }
  1451. inline /* static */ LPCTSTR CMetabasePath::GetInstancePath(
  1452. IN LPCTSTR lpszMDPath,
  1453. OUT CString & strNewPath,
  1454. OUT CString * pstrRemainder
  1455. )
  1456. {
  1457. return TruncatePath(iInstance, lpszMDPath, strNewPath, pstrRemainder);
  1458. }
  1459. inline /* static */ LPCTSTR CMetabasePath::GetRootPath(
  1460. IN LPCTSTR lpszMDPath,
  1461. OUT CString & strNewPath,
  1462. OUT CString * pstrRemainder
  1463. )
  1464. {
  1465. return TruncatePath(iRootDirectory, lpszMDPath, strNewPath, pstrRemainder);
  1466. }
  1467. inline /* virtual */ HRESULT CMetaInterface::ApplyProxyBlanket()
  1468. {
  1469. return m_auth.ApplyProxyBlanket(m_pInterface);
  1470. }
  1471. inline HRESULT CMetaInterface::OpenKey(
  1472. IN METADATA_HANDLE hkBase,
  1473. IN LPCTSTR lpszMDPath,
  1474. IN DWORD dwFlags,
  1475. OUT METADATA_HANDLE * phMDNewHandle
  1476. )
  1477. {
  1478. ASSERT_PTR(m_pInterface);
  1479. return m_pInterface->OpenKey(
  1480. hkBase,
  1481. lpszMDPath,
  1482. dwFlags,
  1483. m_iTimeOutValue,
  1484. phMDNewHandle
  1485. );
  1486. }
  1487. inline HRESULT CMetaInterface::CloseKey(
  1488. IN METADATA_HANDLE hKey
  1489. )
  1490. {
  1491. ASSERT_PTR(m_pInterface);
  1492. return m_pInterface->CloseKey(hKey);
  1493. }
  1494. inline HRESULT CMetaInterface::SetLastChangeTime(
  1495. IN METADATA_HANDLE hMDHandle,
  1496. IN LPCTSTR pszMDPath,
  1497. IN FILETIME * pftMDLastChangeTime,
  1498. IN BOOL bLocalTime
  1499. )
  1500. {
  1501. ASSERT_PTR(m_pInterface);
  1502. return m_pInterface->SetLastChangeTime(
  1503. hMDHandle,
  1504. pszMDPath,
  1505. pftMDLastChangeTime,
  1506. bLocalTime
  1507. );
  1508. }
  1509. inline HRESULT CMetaInterface::GetLastChangeTime(
  1510. IN METADATA_HANDLE hMDHandle,
  1511. IN LPCTSTR lpszMDPath,
  1512. OUT FILETIME * pftMDLastChangeTime,
  1513. IN BOOL bLocalTime
  1514. )
  1515. {
  1516. ASSERT_PTR(m_pInterface);
  1517. return m_pInterface->GetLastChangeTime(
  1518. hMDHandle,
  1519. lpszMDPath,
  1520. pftMDLastChangeTime,
  1521. bLocalTime
  1522. );
  1523. }
  1524. inline HRESULT CMetaInterface::AddKey(
  1525. IN METADATA_HANDLE hKey,
  1526. IN LPCTSTR lpszMDPath
  1527. )
  1528. {
  1529. ASSERT_PTR(m_pInterface);
  1530. return m_pInterface->AddKey(hKey, lpszMDPath);
  1531. }
  1532. inline HRESULT CMetaInterface::DeleteKey(
  1533. IN METADATA_HANDLE hKey,
  1534. IN LPCTSTR lpszMDPath
  1535. )
  1536. {
  1537. ASSERT_PTR(m_pInterface);
  1538. return m_pInterface->DeleteKey(hKey, lpszMDPath);
  1539. }
  1540. inline HRESULT CMetaInterface::DeleteChildKeys(
  1541. IN METADATA_HANDLE hKey,
  1542. IN LPCTSTR lpszMDPath
  1543. )
  1544. {
  1545. ASSERT_PTR(m_pInterface);
  1546. return m_pInterface->DeleteChildKeys(hKey, lpszMDPath);
  1547. }
  1548. inline HRESULT CMetaInterface::EnumKeys(
  1549. IN METADATA_HANDLE hKey,
  1550. IN LPCTSTR lpszMDPath,
  1551. OUT LPTSTR lpszMDName,
  1552. IN DWORD dwIndex
  1553. )
  1554. {
  1555. ASSERT_PTR(m_pInterface);
  1556. return m_pInterface->EnumKeys(hKey, lpszMDPath, lpszMDName, dwIndex);
  1557. }
  1558. inline HRESULT CMetaInterface::CopyKey(
  1559. IN METADATA_HANDLE hSourceKey,
  1560. IN LPCTSTR lpszMDSourcePath,
  1561. IN METADATA_HANDLE hDestKey,
  1562. IN LPCTSTR lpszMDDestPath,
  1563. IN BOOL fOverwrite,
  1564. IN BOOL fCopy
  1565. )
  1566. {
  1567. ASSERT_PTR(m_pInterface);
  1568. return m_pInterface->CopyKey(
  1569. hSourceKey,
  1570. lpszMDSourcePath,
  1571. hDestKey,
  1572. lpszMDDestPath,
  1573. fOverwrite,
  1574. fCopy
  1575. );
  1576. }
  1577. inline HRESULT CMetaInterface::RenameKey(
  1578. IN METADATA_HANDLE hKey,
  1579. IN LPCTSTR lpszMDPath,
  1580. IN LPCTSTR lpszNewName
  1581. )
  1582. {
  1583. ASSERT_PTR(m_pInterface);
  1584. return m_pInterface->RenameKey(hKey, lpszMDPath, lpszNewName);
  1585. }
  1586. inline HRESULT CMetaInterface::GetData(
  1587. IN METADATA_HANDLE hKey,
  1588. IN LPCTSTR lpszMDPath,
  1589. OUT METADATA_RECORD * pmdRecord,
  1590. OUT DWORD * pdwRequiredDataLen
  1591. )
  1592. {
  1593. ASSERT_PTR(m_pInterface);
  1594. return m_pInterface->GetData(
  1595. hKey,
  1596. lpszMDPath,
  1597. pmdRecord,
  1598. pdwRequiredDataLen
  1599. );
  1600. }
  1601. inline HRESULT CMetaInterface::SetData(
  1602. IN METADATA_HANDLE hKey,
  1603. IN LPCTSTR lpszMDPath,
  1604. IN METADATA_RECORD * pmdRecord
  1605. )
  1606. {
  1607. ASSERT_PTR(m_pInterface);
  1608. return m_pInterface->SetData(
  1609. hKey,
  1610. lpszMDPath,
  1611. pmdRecord
  1612. );
  1613. }
  1614. inline HRESULT CMetaInterface::DeleteData(
  1615. IN METADATA_HANDLE hKey,
  1616. IN LPCTSTR lpszMDPath,
  1617. IN DWORD dwMDIdentifier,
  1618. IN DWORD dwMDDataType
  1619. )
  1620. {
  1621. ASSERT_PTR(m_pInterface);
  1622. return m_pInterface->DeleteData(
  1623. hKey,
  1624. lpszMDPath,
  1625. dwMDIdentifier,
  1626. dwMDDataType
  1627. );
  1628. }
  1629. inline HRESULT CMetaInterface::EnumData(
  1630. IN METADATA_HANDLE hKey,
  1631. IN LPCTSTR lpszMDPath,
  1632. OUT METADATA_RECORD * pmdRecord,
  1633. IN DWORD dwIndex,
  1634. OUT DWORD * pdwRequiredDataLen
  1635. )
  1636. {
  1637. ASSERT_PTR(m_pInterface);
  1638. return m_pInterface->EnumData(
  1639. hKey,
  1640. lpszMDPath,
  1641. pmdRecord,
  1642. dwIndex,
  1643. pdwRequiredDataLen
  1644. );
  1645. }
  1646. inline HRESULT CMetaInterface::GetAllData(
  1647. IN METADATA_HANDLE hKey,
  1648. IN LPCTSTR lpszMDPath,
  1649. IN DWORD dwMDAttributes,
  1650. IN DWORD dwMDUserType,
  1651. IN DWORD dwMDDataType,
  1652. OUT DWORD * pdwMDNumDataEntries,
  1653. OUT DWORD * pdwMDDataSetNumber,
  1654. IN DWORD dwMDBufferSize,
  1655. OUT LPBYTE pbMDBuffer,
  1656. OUT DWORD * pdwRequiredBufferSize
  1657. )
  1658. {
  1659. ASSERT_PTR(m_pInterface);
  1660. return m_pInterface->GetAllData(
  1661. hKey,
  1662. lpszMDPath,
  1663. dwMDAttributes,
  1664. dwMDUserType,
  1665. dwMDDataType,
  1666. pdwMDNumDataEntries,
  1667. pdwMDDataSetNumber,
  1668. dwMDBufferSize,
  1669. pbMDBuffer,
  1670. pdwRequiredBufferSize
  1671. );
  1672. }
  1673. inline HRESULT CMetaInterface::DeleteAllData(
  1674. IN METADATA_HANDLE hKey,
  1675. IN LPCTSTR lpszMDPath,
  1676. IN DWORD dwMDUserType,
  1677. IN DWORD dwMDDataType
  1678. )
  1679. {
  1680. ASSERT_PTR(m_pInterface);
  1681. return m_pInterface->DeleteAllData(
  1682. hKey,
  1683. lpszMDPath,
  1684. dwMDUserType,
  1685. dwMDDataType
  1686. );
  1687. }
  1688. inline HRESULT CMetaInterface::CopyData(
  1689. IN METADATA_HANDLE hMDSourceKey,
  1690. IN LPCTSTR lpszMDSourcePath,
  1691. IN METADATA_HANDLE hMDDestKey,
  1692. IN LPCTSTR lpszMDDestPath,
  1693. IN DWORD dwMDAttributes,
  1694. IN DWORD dwMDUserType,
  1695. IN DWORD dwMDDataType,
  1696. IN BOOL fCopy
  1697. )
  1698. {
  1699. ASSERT_PTR(m_pInterface);
  1700. return m_pInterface->CopyData(
  1701. hMDSourceKey,
  1702. lpszMDSourcePath,
  1703. hMDDestKey,
  1704. lpszMDDestPath,
  1705. dwMDAttributes,
  1706. dwMDUserType,
  1707. dwMDDataType,
  1708. fCopy
  1709. );
  1710. }
  1711. inline HRESULT CMetaInterface::GetDataPaths(
  1712. IN METADATA_HANDLE hKey,
  1713. IN LPCTSTR lpszMDPath,
  1714. IN DWORD dwMDIdentifier,
  1715. IN DWORD dwMDDataType,
  1716. IN DWORD dwMDBufferSize,
  1717. OUT LPTSTR lpszBuffer,
  1718. OUT DWORD * pdwMDRequiredBufferSize
  1719. )
  1720. {
  1721. ASSERT_PTR(m_pInterface);
  1722. return m_pInterface->GetDataPaths(
  1723. hKey,
  1724. lpszMDPath,
  1725. dwMDIdentifier,
  1726. dwMDDataType,
  1727. dwMDBufferSize,
  1728. lpszBuffer,
  1729. pdwMDRequiredBufferSize
  1730. );
  1731. }
  1732. inline HRESULT CMetaInterface::Backup(
  1733. IN LPCTSTR lpszBackupLocation,
  1734. IN DWORD dwMDVersion,
  1735. IN DWORD dwMDFlags
  1736. )
  1737. {
  1738. ASSERT_PTR(m_pInterface);
  1739. return m_pInterface->Backup(lpszBackupLocation, dwMDVersion, dwMDFlags);
  1740. }
  1741. inline HRESULT CMetaInterface::Restore(
  1742. IN LPCTSTR lpszBackupLocation,
  1743. IN DWORD dwMDVersion,
  1744. IN DWORD dwMDFlags
  1745. )
  1746. {
  1747. ASSERT_PTR(m_pInterface);
  1748. return m_pInterface->Restore(lpszBackupLocation, dwMDVersion, dwMDFlags);
  1749. }
  1750. inline HRESULT CMetaInterface::EnumBackups(
  1751. OUT LPTSTR lpszBackupLocation,
  1752. OUT DWORD * pdwMDVersion,
  1753. OUT FILETIME * pftMDBackupTime,
  1754. IN DWORD dwIndex
  1755. )
  1756. {
  1757. ASSERT_PTR(m_pInterface);
  1758. return m_pInterface->EnumBackups(
  1759. lpszBackupLocation,
  1760. pdwMDVersion,
  1761. pftMDBackupTime,
  1762. dwIndex
  1763. );
  1764. }
  1765. inline HRESULT CMetaInterface::DeleteBackup(
  1766. IN LPCTSTR lpszBackupLocation,
  1767. IN DWORD dwMDVersion
  1768. )
  1769. {
  1770. ASSERT_PTR(m_pInterface);
  1771. return m_pInterface->DeleteBackup(lpszBackupLocation, dwMDVersion);
  1772. }
  1773. inline HRESULT CMetaInterface::SaveData()
  1774. {
  1775. ASSERT_PTR(m_pInterface);
  1776. return m_pInterface->SaveData();
  1777. }
  1778. inline HRESULT CMetaKey::AddKey(
  1779. IN LPCTSTR lpszMDPath
  1780. )
  1781. {
  1782. return CMetaInterface::AddKey(m_hKey, lpszMDPath);
  1783. }
  1784. inline HRESULT CMetaKey::DeleteKey(
  1785. IN LPCTSTR lpszMDPath
  1786. )
  1787. {
  1788. return CMetaInterface::DeleteKey(m_hKey, lpszMDPath);
  1789. }
  1790. inline HRESULT CMetaKey::RenameKey(
  1791. IN LPCTSTR lpszMDPath,
  1792. IN LPCTSTR lpszNewName
  1793. )
  1794. {
  1795. return CMetaInterface::RenameKey(m_hKey, lpszMDPath, lpszNewName);
  1796. }
  1797. inline HRESULT CMetaKey::ReOpen()
  1798. {
  1799. return Open(m_dwFlags, m_strMetaPath, m_hBase);
  1800. }
  1801. inline HRESULT CMetaKey::ReOpen(DWORD dwFlags)
  1802. {
  1803. return Open(dwFlags, m_strMetaPath, m_hBase);
  1804. }
  1805. inline BOOL CMetaKey::IsHomeDirectoryPath() const
  1806. {
  1807. return CMetabasePath::IsHomeDirectoryPath(m_strMetaPath);
  1808. }
  1809. inline HRESULT CMetaKey::QueryValue(
  1810. IN DWORD dwID,
  1811. OUT BOOL & fValue,
  1812. IN BOOL * pfInheritanceOverride,
  1813. IN LPCTSTR lpszMDPath,
  1814. OUT DWORD * pdwAttributes
  1815. )
  1816. {
  1817. ASSERT(sizeof(DWORD) == sizeof(BOOL));
  1818. return CMetaKey::QueryValue(
  1819. dwID,
  1820. (DWORD &)fValue,
  1821. pfInheritanceOverride,
  1822. lpszMDPath,
  1823. pdwAttributes
  1824. );
  1825. }
  1826. inline HRESULT CMetaKey::SetValue(
  1827. IN DWORD dwID,
  1828. IN DWORD dwValue,
  1829. IN BOOL * pfInheritanceOverride, OPTIONAL
  1830. IN LPCTSTR lpszMDPath OPTIONAL
  1831. )
  1832. {
  1833. return SetPropertyValue(
  1834. dwID,
  1835. sizeof(dwValue),
  1836. &dwValue,
  1837. pfInheritanceOverride,
  1838. lpszMDPath
  1839. );
  1840. }
  1841. inline HRESULT CMetaKey::SetValue(
  1842. IN DWORD dwID,
  1843. IN BOOL fValue,
  1844. IN BOOL * pfInheritanceOverride,
  1845. IN LPCTSTR lpszMDPath
  1846. )
  1847. {
  1848. ASSERT(sizeof(DWORD) == sizeof(BOOL));
  1849. return CMetaKey::SetValue(
  1850. dwID,
  1851. (DWORD)fValue,
  1852. pfInheritanceOverride,
  1853. lpszMDPath
  1854. );
  1855. }
  1856. inline HRESULT CMetaKey::SetValue(
  1857. IN DWORD dwID,
  1858. IN CString & strValue,
  1859. IN BOOL * pfInheritanceOverride, OPTIONAL
  1860. IN LPCTSTR lpszMDPath OPTIONAL
  1861. )
  1862. {
  1863. return SetPropertyValue(
  1864. dwID,
  1865. (strValue.GetLength() + 1) * sizeof(TCHAR),
  1866. (void *)(LPCTSTR)strValue,
  1867. pfInheritanceOverride,
  1868. lpszMDPath
  1869. );
  1870. }
  1871. inline HRESULT CWamInterface::AppDelete(
  1872. IN LPCTSTR szMDPath,
  1873. IN BOOL fRecursive
  1874. )
  1875. {
  1876. ASSERT_PTR(m_pInterface);
  1877. return m_pInterface->AppDelete(szMDPath, fRecursive);
  1878. }
  1879. inline HRESULT CWamInterface::AppUnLoad(
  1880. IN LPCTSTR szMDPath,
  1881. IN BOOL fRecursive
  1882. )
  1883. {
  1884. ASSERT_PTR(m_pInterface);
  1885. return m_pInterface->AppUnLoad(szMDPath, fRecursive);
  1886. }
  1887. inline HRESULT CWamInterface::AppGetStatus(
  1888. IN LPCTSTR szMDPath,
  1889. OUT DWORD * pdwAppStatus
  1890. )
  1891. {
  1892. ASSERT_PTR(m_pInterface);
  1893. return m_pInterface->AppGetStatus(szMDPath, pdwAppStatus);
  1894. }
  1895. inline HRESULT CWamInterface::AppDeleteRecoverable(
  1896. IN LPCTSTR szMDPath,
  1897. IN BOOL fRecursive
  1898. )
  1899. {
  1900. ASSERT_PTR(m_pInterface);
  1901. return m_pInterface->AppDeleteRecoverable(szMDPath, fRecursive);
  1902. }
  1903. inline HRESULT CWamInterface::AppRecover(
  1904. IN LPCTSTR szMDPath,
  1905. IN BOOL fRecursive
  1906. )
  1907. {
  1908. ASSERT_PTR(m_pInterface);
  1909. return m_pInterface->AppRecover(szMDPath, fRecursive);
  1910. }
  1911. inline /* virtual */ HRESULT CWamInterface::ApplyProxyBlanket()
  1912. {
  1913. return m_auth.ApplyProxyBlanket(m_pInterface);
  1914. }
  1915. inline /* virtual */ HRESULT CMetaBack::ApplyProxyBlanket()
  1916. {
  1917. HRESULT hr = CMetaInterface::ApplyProxyBlanket();
  1918. return SUCCEEDED(hr) ? CWamInterface::ApplyProxyBlanket() : hr;
  1919. }
  1920. inline HRESULT CMetaBack::Next(
  1921. OUT DWORD * pdwVersion,
  1922. OUT LPTSTR lpszLocation,
  1923. OUT FILETIME * pftBackupTime
  1924. )
  1925. {
  1926. return EnumBackups(
  1927. lpszLocation,
  1928. pdwVersion,
  1929. pftBackupTime,
  1930. m_dwIndex++
  1931. );
  1932. }
  1933. inline HRESULT CMetaBack::Backup(
  1934. IN LPCTSTR lpszLocation
  1935. )
  1936. {
  1937. return CMetaInterface::Backup(
  1938. lpszLocation,
  1939. MD_BACKUP_NEXT_VERSION,
  1940. MD_BACKUP_SAVE_FIRST
  1941. );
  1942. }
  1943. inline HRESULT CMetaBack::Delete(
  1944. IN LPCTSTR lpszLocation,
  1945. IN DWORD dwVersion
  1946. )
  1947. {
  1948. return DeleteBackup(lpszLocation, dwVersion);
  1949. }
  1950. inline BOOL
  1951. CIISApplication::IsEnabledApplication() const
  1952. {
  1953. return m_dwAppState == APPSTATUS_STOPPED
  1954. || m_dwAppState == APPSTATUS_RUNNING;
  1955. }
  1956. inline HRESULT CIISApplication::Delete(
  1957. IN BOOL fRecursive
  1958. )
  1959. {
  1960. ASSERT(!m_strWamPath.IsEmpty());
  1961. return AppDelete(m_strWamPath, fRecursive);
  1962. }
  1963. inline HRESULT CIISApplication::Unload(
  1964. IN BOOL fRecursive
  1965. )
  1966. {
  1967. ASSERT(!m_strWamPath.IsEmpty());
  1968. return AppUnLoad(m_strWamPath, fRecursive);
  1969. }
  1970. inline HRESULT CIISApplication::DeleteRecoverable(
  1971. IN BOOL fRecursive
  1972. )
  1973. {
  1974. ASSERT(!m_strWamPath.IsEmpty());
  1975. return AppDeleteRecoverable(m_strWamPath, fRecursive);
  1976. }
  1977. inline HRESULT CIISApplication::Recover(
  1978. IN BOOL fRecursive
  1979. )
  1980. {
  1981. ASSERT(!m_strWamPath.IsEmpty());
  1982. return AppRecover(m_strWamPath, fRecursive);
  1983. }
  1984. inline HRESULT CIISSvcControl::Stop(
  1985. IN DWORD dwTimeoutMsecs,
  1986. IN BOOL fForce
  1987. )
  1988. {
  1989. ASSERT_PTR(m_pInterface);
  1990. return m_pInterface->Stop(dwTimeoutMsecs, (DWORD)fForce);
  1991. }
  1992. inline HRESULT CIISSvcControl::Start(
  1993. IN DWORD dwTimeoutMsecs
  1994. )
  1995. {
  1996. ASSERT_PTR(m_pInterface);
  1997. return m_pInterface->Start(dwTimeoutMsecs);
  1998. }
  1999. inline HRESULT CIISSvcControl::Reboot(
  2000. IN DWORD dwTimeouMsecs,
  2001. IN BOOL fForceAppsClosed
  2002. )
  2003. {
  2004. ASSERT_PTR(m_pInterface);
  2005. return m_pInterface->Reboot(dwTimeouMsecs, (DWORD)fForceAppsClosed);
  2006. }
  2007. inline HRESULT CIISSvcControl::Status(
  2008. IN DWORD dwBufferSize,
  2009. OUT LPBYTE pbBuffer,
  2010. OUT DWORD * MDRequiredBufferSize,
  2011. OUT DWORD * pdwNumServices
  2012. )
  2013. {
  2014. ASSERT_PTR(m_pInterface);
  2015. return m_pInterface->Status(
  2016. dwBufferSize,
  2017. pbBuffer,
  2018. MDRequiredBufferSize,
  2019. pdwNumServices
  2020. );
  2021. }
  2022. inline HRESULT CIISSvcControl::Kill()
  2023. {
  2024. ASSERT_PTR(m_pInterface);
  2025. return m_pInterface->Kill();
  2026. }
  2027. inline /* virtual */ HRESULT CIISSvcControl::ApplyProxyBlanket()
  2028. {
  2029. return m_auth.ApplyProxyBlanket(m_pInterface);
  2030. }
  2031. #ifdef KEVLAR
  2032. inline HRESULT CWebCluster::Create()
  2033. {
  2034. return CIISInterface::Create(
  2035. 1,
  2036. &IID_IWebCluster,
  2037. &CLSID_WebCluster,
  2038. NULL,
  2039. (IUnknown **)&m_pInterface
  2040. );
  2041. }
  2042. inline /* virtual */ HRESULT CWebCluster::ApplyProxyBlanket()
  2043. {
  2044. return m_auth.ApplyProxyBlanket(m_pInterface);
  2045. }
  2046. #if (0) // dantra: 8/17/99 - legacy
  2047. inline HRESULT CWebCluster::GetParameter(
  2048. LONG lParamId,
  2049. BSTR bstrParamInfo,
  2050. VARIANT * lpvarParam
  2051. )
  2052. {
  2053. ASSERT_PTR(m_pInterface);
  2054. return m_pInterface->GetParameter(lParamId, bstrParamInfo, lpvarParam);
  2055. }
  2056. inline HRESULT CWebCluster::SetParameter(
  2057. LONG lParam,
  2058. BSTR bstrParamInfo,
  2059. VARIANT * lpvarResults
  2060. )
  2061. {
  2062. ASSERT_PTR(m_pInterface);
  2063. return m_pInterface->SetParameter(lParam, bstrParamInfo, lpvarResults);
  2064. }
  2065. #endif // 0
  2066. #endif // KEVLAR
  2067. #endif // _MDKEYS_H_