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.

4672 lines
144 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 2000-2002 Microsoft Corporation
  4. //
  5. // Module Name:
  6. // ClusCfgServer.idl
  7. //
  8. // Description:
  9. // This file is the IDL file for the IClusCfgServer interface of the
  10. // Cluster Setup application.
  11. //
  12. // The IClusCfgServer interface provides the functions required to gather
  13. // information about storage devices, networks, the operating
  14. // system, etc. on a computer. It also has functions to form a cluster
  15. // on this computer, to add this node to a cluster, to remove this node
  16. // from a cluster, etc.
  17. //
  18. //////////////////////////////////////////////////////////////////////////////
  19. // Comments for generated files
  20. cpp_quote( "//////////////////////////////////////////////////////////////////////////////" )
  21. cpp_quote( "//" )
  22. cpp_quote( "// Copyright (c) 2000-2001 Microsoft Corporation" )
  23. cpp_quote( "//" )
  24. cpp_quote( "// Remarks:" )
  25. cpp_quote( "// Generated file. See file ClusCfgServer.idl for more details." )
  26. cpp_quote( "//" )
  27. cpp_quote( "//////////////////////////////////////////////////////////////////////////////" )
  28. //////////////////////////////////////////////////////////////////////////////
  29. // Imported Files
  30. //////////////////////////////////////////////////////////////////////////////
  31. // For IUnknown
  32. import "unknwn.idl";
  33. ////////////////////////////////////////////////////////////////////////////
  34. // Forward Declarations
  35. //////////////////////////////////////////////////////////////////////////////
  36. interface IClusCfgNodeInfo;
  37. interface IEnumClusCfgManagedResources;
  38. interface IClusCfgManagedResourceInfo;
  39. interface IEnumClusCfgNetworks;
  40. interface IEnumClusCfgPartitions;
  41. interface IClusCfgPartitionInfo;
  42. interface IEnumClusCfgIPAddresses;
  43. interface IClusCfgIPAddressInfo;
  44. interface IClusCfgNetworkInfo;
  45. interface IClusCfgClusterInfo;
  46. interface IClusCfgInitialize;
  47. interface IClusCfgCallback;
  48. interface IClusCfgCredentials;
  49. interface IClusCfgCapabilities;
  50. interface IClusCfgManagedResourceCfg;
  51. interface IClusCfgResourcePreCreate;
  52. interface IClusCfgResourceCreate;
  53. interface IClusCfgResourcePostCreate;
  54. interface IClusCfgGroupCfg;
  55. interface IClusCfgResourceTypeInfo;
  56. interface IClusCfgResourceTypeCreate;
  57. interface IClusCfgMemberSetChangeListener;
  58. interface IClusCfgEvictCleanup;
  59. interface IClusCfgManagedResourceData;
  60. interface IClusCfgVerifyQuorum;
  61. //////////////////////////////////////////////////////////////////////////////
  62. // Type Definitions
  63. //////////////////////////////////////////////////////////////////////////////
  64. //
  65. // This enumeration is used to indicate the differetnt usage
  66. // states of a drive letter.
  67. //
  68. typedef enum
  69. {
  70. dluUNKNOWN = 0,
  71. dluNO_ROOT_DIRECTORY,
  72. dluREMOVABLE_DISK,
  73. dluFIXED_DISK,
  74. dluNETWORK_DRIVE,
  75. dluCOMPACT_DISC,
  76. dluRAM_DISK,
  77. dluSYSTEM,
  78. dluUNUSED,
  79. //
  80. // Disks that are on a system bus will have a usage enum that starts from here.
  81. //
  82. dluSTART_OF_SYSTEM_BUS = 50,
  83. dluNO_ROOT_DIRECTORY_SYSTEM_BUS,
  84. dluREMOVABLE_DISK_SYSTEM_BUS,
  85. dluFIXED_DISK_SYSTEM_BUS,
  86. dluNETWORK_DRIVE_SYSTEM_BUS,
  87. dluCOMPACT_DISC_SYSTEM_BUS,
  88. dluRAM_DISK_SYSTEM_BUS,
  89. dluSYSTEM_SYSTEM_BUS,
  90. dluUNUSED_SYSTEM_BUS,
  91. dluMAX
  92. } EDriveLetterUsage;
  93. typedef struct _DRIVELETTERMAPPING
  94. {
  95. EDriveLetterUsage dluDrives[ 26 ];
  96. } SDriveLetterMapping;
  97. //
  98. // This enumeration is used to indicate the mode of the ClusCfgServer commit operation.
  99. //
  100. typedef enum
  101. {
  102. cmUNKNOWN = 0,
  103. cmCREATE_CLUSTER,
  104. cmADD_NODE_TO_CLUSTER,
  105. cmCLEANUP_NODE_AFTER_EVICT,
  106. cmMAX
  107. } ECommitMode;
  108. typedef
  109. [
  110. uuid( FFCF84AD-5892-4f4c-8C22-ACE041D6ACC2 ),
  111. helpstring( "The reason that Cleanup was called." )
  112. ]
  113. enum EClusCfgCleanupReason {
  114. [ helpstring( "The operation completed successfully" ) ] crSUCCESS = 0,
  115. [ helpstring( "The operation was cancelled" ) ] crCANCELLED = 1,
  116. [ helpstring( "The operation encountered an error and was terminated" ) ] crERROR = 2
  117. } EClusCfgCleanupReason;
  118. typedef
  119. [
  120. uuid( 1DAF9692-6662-43b1-AD45-D50F7849B0CD ),
  121. helpstring( "Resource dependency flags" )
  122. ]
  123. enum EDependencyFlags
  124. {
  125. [ helpstring( "Unknown access" ) ] dfUNKNOWN = 0,
  126. [ helpstring( "Shared access resource" ) ] dfSHARED = 1,
  127. [ helpstring( "Exclusive access resource" ) ] dfEXCLUSIVE = 2
  128. } EDependencyFlags;
  129. //////////////////////////////////////////////////////////////////////////////
  130. // Constant Definitions
  131. //////////////////////////////////////////////////////////////////////////////
  132. //////////////////////////////////////////////////////////////////////////////
  133. // Interface Definitions
  134. //////////////////////////////////////////////////////////////////////////////
  135. //****************************************************************************
  136. //++
  137. //
  138. // interface IClusCfgNodeInfo
  139. //
  140. // Description:
  141. // This interface contains information about the node configuration.
  142. //
  143. //--
  144. //****************************************************************************
  145. [
  146. object,
  147. uuid( E4B5FA15-DD07-439e-A623-8823524E3D19 ),
  148. async_uuid( 4F3BB40B-DF27-40a0-B31A-BA18324CEB9D ),
  149. pointer_default( unique )
  150. ]
  151. interface IClusCfgNodeInfo : IUnknown
  152. {
  153. //
  154. // Name
  155. //
  156. //////////////////////////////////////////////////////////////////////////////
  157. //
  158. // STDMETHOD
  159. // GetName(
  160. // [ out ] BSTR * pbstrNameOut
  161. // )
  162. //
  163. // Description:
  164. // Retrieves the node's fully qualified domain name. e.g.
  165. // cluster1.ntdev.microsoft.com.
  166. //
  167. // Parameter:
  168. // pbstrNameOut
  169. // Pointer to the name of the node. This should be freed by the caller
  170. // by calling SysFreeString( ).
  171. //
  172. // Return Values:
  173. // S_OK
  174. // The call succeeded.
  175. //
  176. // E_OUTOFMEMORY
  177. // Out of memory.
  178. //
  179. // other HRESULTs
  180. // The call failed.
  181. //
  182. //////////////////////////////////////////////////////////////////////////////
  183. HRESULT
  184. GetName( [ out ] BSTR * pbstrNameOut );
  185. //////////////////////////////////////////////////////////////////////////////
  186. //
  187. // STDMETHOD
  188. // SetName(
  189. // [ in ] LPCWSTR pcszNameIn
  190. // )
  191. //
  192. // Description:
  193. // Stores the new name for the node. This does not take effect until after
  194. // the changes have been commited. This is stubbed out for future
  195. // functionality.
  196. //
  197. // Parameter:
  198. // pcszNameIn
  199. // The new name for the node.
  200. //
  201. // Return Values:
  202. // E_NOTIMPL
  203. // The call is not implemented.
  204. //
  205. //////////////////////////////////////////////////////////////////////////////
  206. HRESULT
  207. SetName( [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn );
  208. //
  209. // Membership?
  210. //
  211. //////////////////////////////////////////////////////////////////////////////
  212. //
  213. // STDMETHOD
  214. // IsMemberOfCluster( void )
  215. //
  216. // Description:
  217. // Call this to determine if the node is part of a cluster.
  218. //
  219. // Return Values:
  220. // S_OK
  221. // Call succeeded and the result is "TRUE."
  222. //
  223. // S_FALSE
  224. // Call succeeded and the result is "FALSE."
  225. //
  226. // other HRESULT
  227. // The call failed.
  228. //
  229. //////////////////////////////////////////////////////////////////////////////
  230. HRESULT
  231. IsMemberOfCluster( void );
  232. //////////////////////////////////////////////////////////////////////////////
  233. //
  234. // STDMETHOD
  235. // GetClusterConfigInfo(
  236. // [ out ] IClusCfgClusterInfo ** ppClusCfgClusterInfoOut
  237. // )
  238. //
  239. // Description:
  240. // If it is a member, use this method to obtain an interface to
  241. // IClusCfgClusterInfo.
  242. //
  243. // Parameter:
  244. // ppClusCfgClusterInfoOut
  245. // Pointer to the IClusCfgClusterInfo interface.
  246. //
  247. // Return Values:
  248. // S_OK
  249. // The call succeeded.
  250. //
  251. // other HRESULTs
  252. // The call failed.
  253. //
  254. //////////////////////////////////////////////////////////////////////////////
  255. HRESULT
  256. GetClusterConfigInfo( [ out ] IClusCfgClusterInfo ** ppClusCfgClusterInfoOut );
  257. //////////////////////////////////////////////////////////////////////////////
  258. //
  259. // STDMETHOD
  260. // GetOSVersion(
  261. // [ out ] DWORD * pdwMajorVersionOut,
  262. // [ out ] DWORD * pdwMinorVersionOut,
  263. // [ out ] WORD * pwSuiteMaskOut,
  264. // [ out ] BYTE * pbProductTypeOut,
  265. // [ out ] BSTR * pbstrCSDVersionOut
  266. // )
  267. //
  268. //////////////////////////////////////////////////////////////////////////////
  269. HRESULT
  270. GetOSVersion(
  271. [ out ] DWORD * pdwMajorVersionOut,
  272. [ out ] DWORD * pdwMinorVersionOut,
  273. [ out ] WORD * pwSuiteMaskOut,
  274. [ out ] BYTE * pbProductTypeOut,
  275. [ out ] BSTR * pbstrCSDVersionOut
  276. );
  277. //////////////////////////////////////////////////////////////////////////////
  278. //
  279. // STDMETHOD
  280. // GetClusterVersion(
  281. // [ out ] DWORD * pdwNodeHighestVersion,
  282. // [ out ] DWORD * pdwNodeLowestVersion
  283. // )
  284. //
  285. // Description:
  286. // Retrieves the version of the cluster.
  287. //
  288. // Parameters:
  289. // pdwNodeHighestVersion
  290. // The highest version in the cluster.
  291. //
  292. // pdwNodeLowestVersion
  293. // The lowest version in the cluster.
  294. //
  295. // Return Values:
  296. // S_OK
  297. // The call succeeded.
  298. //
  299. // other HRESULTs
  300. // The call failed.
  301. //
  302. //////////////////////////////////////////////////////////////////////////////
  303. HRESULT
  304. GetClusterVersion(
  305. [ out ] DWORD * pdwNodeHighestVersion,
  306. [ out ] DWORD * pdwNodeLowestVersion
  307. );
  308. //////////////////////////////////////////////////////////////////////////////
  309. //
  310. // STDMETHOD
  311. // GetDriveLetterMappings(
  312. // [ out ] SDriveLetterMapping dlmDriveLetterUsageOut
  313. // )
  314. //
  315. // Description:
  316. // Retrieves the drive letter mappings on the node.
  317. //
  318. // Parameter:
  319. // rgDriveLetterUsage
  320. // An array of flags representing A: thru Z: (26) drive mappings to
  321. // the drives. See SDriveLetterMapping for flag values.
  322. //
  323. // Return Values:
  324. // S_OK
  325. // Success.
  326. //
  327. // other HRESULT
  328. // The call failed.
  329. //
  330. //////////////////////////////////////////////////////////////////////////
  331. HRESULT
  332. GetDriveLetterMappings( [ out ] SDriveLetterMapping * pdlmDriveLetterUsageOut );
  333. //////////////////////////////////////////////////////////////////////////
  334. //
  335. // STDMETHOD
  336. // GetMaxNodeCount(
  337. // [ out ] DWORD * pcMaxNodesOut
  338. // )
  339. //
  340. // Description:
  341. // Returns the maximun number of nodes for this node's product
  342. // suite type.
  343. //
  344. // Notes:
  345. //
  346. // Parameter:
  347. // pcMaxNodesOut
  348. // The maximum number of nodes allowed by this node's product
  349. // suite type.
  350. //
  351. // Return Value:
  352. // S_OK
  353. // Success.
  354. //
  355. // other HRESULT
  356. // The call failed.
  357. //
  358. //////////////////////////////////////////////////////////////////////////
  359. HRESULT
  360. GetMaxNodeCount(
  361. [ out ] DWORD * pcMaxNodesOut
  362. );
  363. //////////////////////////////////////////////////////////////////////////
  364. //
  365. // STDMETHOD
  366. // GetProcessorInfo(
  367. // [ out ] WORD * pwProcessorArchitectureOut
  368. // , [ out ] WORD * pwProcessorLevelOut
  369. // )
  370. //
  371. // Description:
  372. // Returns the processor information for this node.
  373. //
  374. // Notes:
  375. //
  376. // Parameter:
  377. // pwProcessorArchitectureOut
  378. // The processor architecture.
  379. //
  380. // pwProcessorLevelOut
  381. // The processor level.
  382. //
  383. // Return Value:
  384. // S_OK
  385. // Success.
  386. //
  387. // other HRESULT
  388. // The call failed.
  389. //
  390. // Remarks:
  391. // See SYSTEM_INFO in MSDN and/or the Platform SDK for more
  392. // information.
  393. //
  394. //////////////////////////////////////////////////////////////////////////
  395. HRESULT
  396. GetProcessorInfo(
  397. [ out ] WORD * pwProcessorArchitectureOut
  398. , [ out ] WORD * pwProcessorLevelOut
  399. );
  400. }; //*** interface IClusCfgNodeInfo
  401. //****************************************************************************
  402. //++
  403. //
  404. // interface IEnumClusCfgManagedResources
  405. //
  406. // Description:
  407. // This interface enumerates all resources on this computer that the
  408. // cluster service can manage.
  409. //
  410. //--
  411. //****************************************************************************
  412. [
  413. object,
  414. uuid( 7DBE11EB-A5DF-4534-ABF6-8BAC7B53FC95 ),
  415. async_uuid( B138483F-9695-4fa6-A98F-0DE2FB355449 ),
  416. pointer_default( unique )
  417. ]
  418. interface IEnumClusCfgManagedResources : IUnknown
  419. {
  420. //////////////////////////////////////////////////////////////////////////
  421. //
  422. // STDMETHOD
  423. // Next(
  424. // [ in ] ULONG cNumberRequestedIn,
  425. // [ out, size_is( cNumberRequestedIn ), length_is(*pcNumberFetchedOut) ] IClusCfgManagedResourceInfo ** rgpManagedResourceInfoOut,
  426. // [ out ] ULONG * pcNumberFetchedOut
  427. // );
  428. //
  429. // Description:
  430. // Retrieves the next cNumberRequestedIn items in the enumeration sequence.
  431. // If there are fewer than the requested number of elements left in the
  432. // sequence, it retrieves the remaining elements. The number of elements
  433. // actually retrieved is returned through pcNumberFetchedOut (unless the
  434. // caller passed in NULL for that parameter).
  435. //
  436. // Parameters:
  437. // cNumberRequestedIn
  438. // number of elements being requested.
  439. //
  440. // rgpManagedResourceInfoOut
  441. // Array of size cNumberRequestedIn (or larger) of the elements of interest.
  442. // The type of this parameter depends on the item being enumerated.
  443. //
  444. // pcNumberFetchedOut
  445. // Pointer to the number of elements actually supplied in
  446. // rgpManagedResourceInfoOut. Caller can pass in NULL if cNumberRequestedIn
  447. // is one.
  448. //
  449. // Return Values:
  450. // S_OK
  451. // The number of elements supplied is cNumberRequestedIn
  452. //
  453. // S_FALSE
  454. // The number of elements supplied is not cNumberRequestedIn
  455. //
  456. // other HRESULT
  457. // The call failed.
  458. //
  459. //////////////////////////////////////////////////////////////////////////
  460. HRESULT
  461. Next(
  462. [ in ] ULONG cNumberRequestedIn,
  463. [ out, size_is( cNumberRequestedIn ), length_is(*pcNumberFetchedOut) ] IClusCfgManagedResourceInfo ** rgpManagedResourceInfoOut,
  464. [ out ] ULONG * pcNumberFetchedOut
  465. );
  466. //////////////////////////////////////////////////////////////////////////
  467. //
  468. // STDMETHOD
  469. // Reset( void );
  470. //
  471. // Description:
  472. // Reset the enumeration sequence to the beginning.
  473. //
  474. // Return Value:
  475. // S_OK
  476. // Success.
  477. //
  478. // other HRESULT
  479. // The call failed.
  480. //
  481. //////////////////////////////////////////////////////////////////////////
  482. HRESULT
  483. Reset( void );
  484. //////////////////////////////////////////////////////////////////////////
  485. //
  486. // STDMETHOD
  487. // Skip(
  488. // [ in ] ULONG cNumberToSkip
  489. // );
  490. //
  491. // Description:
  492. // Skips over the next specified number of elements in the enumeration sequence.
  493. //
  494. // Parameter:
  495. // cNumberToSkip
  496. // The number of elements to be skipped.
  497. //
  498. // Return Value:
  499. // S_OK
  500. // The number of elements skipped is cNumberToSkip.
  501. //
  502. // S_FALSE
  503. // Success, but you're past the last element.
  504. //
  505. // other HRESULT
  506. // The call failed.
  507. //
  508. //////////////////////////////////////////////////////////////////////////
  509. HRESULT
  510. Skip( [ in ] ULONG cNumberToSkip );
  511. //////////////////////////////////////////////////////////////////////////
  512. //
  513. // STDMETHOD
  514. // Clone(
  515. // [ out ] IEnumClusCfgManagedResources ** ppEnumManagedResources
  516. // );
  517. //
  518. // Description:
  519. // Creates another enumerator that contains the same enumeration state
  520. // as the current one. Using this function, a client can record a
  521. // particular point in the enumeration sequence, and then return to
  522. // that point at a later time. The new enumerator supports the same
  523. // interface as the original one.
  524. //
  525. // Return Values:
  526. // E_INVALIDARG
  527. // ppEnumManagedResources is invalid.
  528. //
  529. // E_OUTOFMEMORY
  530. // Out of memory.
  531. //
  532. // E_UNEXPECTED
  533. // Unknown error (it's in the EnumXXXX docs).
  534. //
  535. //////////////////////////////////////////////////////////////////////////
  536. HRESULT
  537. Clone( [ out ] IEnumClusCfgManagedResources ** ppEnumManagedResourcesOut );
  538. //////////////////////////////////////////////////////////////////////////
  539. //
  540. // STDMETHOD
  541. // Count(
  542. // [ out, ref ] DWORD * pnCountOut
  543. // );
  544. //
  545. // Description:
  546. // Returns the size (possibly zero) of the enumerator's collection.
  547. //
  548. // Return Values:
  549. // E_POINTER
  550. // pnCountOut was null.
  551. //
  552. //////////////////////////////////////////////////////////////////////////
  553. HRESULT
  554. Count( [ out, ref ] DWORD * pnCountOut );
  555. }; //*** interface IEnumClusCfgManagedResources
  556. //****************************************************************************
  557. //++
  558. //
  559. // interface IEnumClusCfgNetworks
  560. //
  561. // Description:
  562. // This interface enumerates the networks on this computer.
  563. //
  564. //--
  565. //****************************************************************************
  566. [
  567. object,
  568. uuid( CF3FAED8-1322-4bcb-9923-B5B745A69E36 ),
  569. async_uuid( F56B9B0D-E7B8-49ec-A843-5475076B947D ),
  570. pointer_default( unique )
  571. ]
  572. interface IEnumClusCfgNetworks : IUnknown
  573. {
  574. //////////////////////////////////////////////////////////////////////////
  575. //
  576. // STDMETHOD
  577. // Next(
  578. // [ in ] ULONG cNumberRequestedIn,
  579. // [ out, size_is( cNumberRequestedIn ), length_is(*pcNumberFetchedOut) ] IClusCfgNetworkInfo ** rgpNetworkInfoOut,
  580. // [ out ] ULONG * pcNumberFetchedOut
  581. // );
  582. //
  583. // Description:
  584. // Retrieves the next cNumberRequestedIn items in the enumeration sequence.
  585. // If there are fewer than the requested number of elements left in the
  586. // sequence, it retrieves the remaining elements. The number of elements
  587. // actually retrieved is returned through pcNumberFetchedOut (unless the
  588. // caller passed in NULL for that parameter).
  589. //
  590. // Parameters:
  591. // cNumberRequestedIn
  592. // number of elements being requested.
  593. //
  594. // rgpNetworkInfoOut
  595. // Array of size cNumberRequestedIn (or larger) of the elements of interest.
  596. // The type of this parameter depends on the item being enumerated.
  597. //
  598. // pcNumberFetchedOut
  599. // Pointer to the number of elements actually supplied in
  600. // rgpNetworkInfoOut. Caller can pass in NULL if cNumberRequestedIn
  601. // is one.
  602. //
  603. // Return Values:
  604. // S_OK
  605. // The number of elements supplied is cNumberRequestedIn
  606. //
  607. // S_FALSE
  608. // The number of elements supplied is not cNumberRequestedIn.
  609. //
  610. // other HRESULT
  611. // The call failed.
  612. //
  613. //////////////////////////////////////////////////////////////////////////
  614. HRESULT
  615. Next(
  616. [ in ] ULONG cNumberRequestedIn,
  617. [ out, size_is( cNumberRequestedIn ), length_is(*pcNumberFetchedOut) ] IClusCfgNetworkInfo ** rgpNetworkInfoOut,
  618. [ out ] ULONG * pcNumberFetchedOut
  619. );
  620. //////////////////////////////////////////////////////////////////////////
  621. //
  622. // STDMETHOD
  623. // Skip(
  624. // [ in ] ULONG cNumberToSkip
  625. // );
  626. //
  627. // Description:
  628. // Skips over the next specified number of elements in the enumeration sequence.
  629. //
  630. // Parameter:
  631. // cNumberToSkip
  632. // The number of elements to be skipped.
  633. //
  634. // Return Value:
  635. // S_OK
  636. // The number of elements skipped is cNumberToSkip.
  637. //
  638. // S_FALSE
  639. // Success, but you've past the last element.
  640. //
  641. // other HRESULT
  642. // The call failed.
  643. //
  644. //////////////////////////////////////////////////////////////////////////
  645. HRESULT
  646. Skip( [ in ] ULONG cNumberToSkipIn );
  647. //////////////////////////////////////////////////////////////////////////
  648. //
  649. // STDMETHOD
  650. // Reset( void );
  651. //
  652. // Description:
  653. // Reset the enumeration sequence to the beginning.
  654. //
  655. // Return Value:
  656. // S_OK
  657. // Success.
  658. //
  659. // other HRESULT
  660. // The call failed.
  661. //
  662. //////////////////////////////////////////////////////////////////////////
  663. HRESULT
  664. Reset( void );
  665. //////////////////////////////////////////////////////////////////////////
  666. //
  667. // STDMETHOD
  668. // Clone(
  669. // [ out ] IEnumClusCfgNetworks ** ppEnumNetworksOut
  670. // );
  671. //
  672. // Description:
  673. // Creates another enumerator that contains the same enumeration state
  674. // as the current one. Using this function, a client can record a
  675. // particular point in the enumeration sequence, and then return to
  676. // that point at a later time. The new enumerator supports the same
  677. // interface as the original one.
  678. //
  679. // Parameter:
  680. // ppEnumNetworksOut
  681. // Address of IEnumClusCfgManagedResources * pointer variable that receives
  682. // the interface pointer to the enumeration object. If the method is
  683. // unsuccessful, the value of this output variable is undefined.
  684. //
  685. // Return Values:
  686. // E_INVALIDARG
  687. // ppEnumNetworksOut is invalid.
  688. //
  689. // E_OUTOFMEMORY
  690. // Out of memory.
  691. //
  692. // E_UNEXPECTED
  693. // Unknown error (it's in the EnumXXXX docs).
  694. //
  695. //////////////////////////////////////////////////////////////////////////
  696. HRESULT
  697. Clone( [ out ] IEnumClusCfgNetworks ** ppEnumNetworksOut );
  698. //////////////////////////////////////////////////////////////////////////
  699. //
  700. // STDMETHOD
  701. // Count(
  702. // [ out, ref ] DWORD * pnCountOut
  703. // );
  704. //
  705. // Description:
  706. // Returns the size (possibly zero) of the enumerator's collection.
  707. //
  708. // Return Values:
  709. // E_POINTER
  710. // pnCountOut was null.
  711. //
  712. //////////////////////////////////////////////////////////////////////////
  713. HRESULT
  714. Count( [ out, ref ] DWORD * pnCountOut );
  715. }; //*** interface IEnumClusCfgNetworks
  716. //****************************************************************************
  717. //++
  718. //
  719. // interface IClusCfgManagedResourceInfo
  720. //
  721. // Description:
  722. // This interface encapsulates a manageable resource on this computer.
  723. //
  724. //--
  725. //****************************************************************************
  726. [
  727. object,
  728. uuid( 8389D687-DF99-442b-81AB-58BA5B029688 ),
  729. async_uuid( 0560D153-892F-4bf5-87B0-06AF2803955C ),
  730. pointer_default( unique )
  731. ]
  732. interface IClusCfgManagedResourceInfo : IUnknown
  733. {
  734. //
  735. // UID
  736. //
  737. //////////////////////////////////////////////////////////////////////////
  738. //
  739. // STDMETHOD
  740. // GetUID(
  741. // [ out ] BSTR * pbstrUIDOut
  742. // )
  743. //
  744. // Description:
  745. // Retrieve the Unique IDentifier for this resource. This is not a Universally
  746. // Unique IDentifier (UUID or GUID). This indentifer should match identifiers
  747. // that can be generated on other nodes that can see this resource from a shared
  748. // bus (such as a SCSI disk).
  749. //
  750. // Parameters:
  751. // pbstrUIDOut
  752. // Pointer to the UID string. pbstrUIDOut should be freed by the caller
  753. // by calling SysFreeString( ).
  754. //
  755. // Return Values:
  756. // S_OK
  757. // Success.
  758. //
  759. // E_OUTOFMEMORY
  760. // Out of memory.
  761. //
  762. // other HRESULT
  763. // The call failed.
  764. //
  765. //////////////////////////////////////////////////////////////////////////
  766. HRESULT
  767. GetUID( [ out ] BSTR * pbstrUIDOut );
  768. //
  769. // Name
  770. //
  771. //////////////////////////////////////////////////////////////////////////
  772. //
  773. // STDMETHOD
  774. // GetName(
  775. // [ out ] BSTR * pbstrNameOut
  776. // )
  777. //
  778. // Description:
  779. // Retrieves a "user friendly" name of the resource.
  780. //
  781. // Parameter:
  782. // pbstrNameOut
  783. // Pointer to resource name. This should be freed by the caller by calling
  784. // SysFreeString( ).
  785. //
  786. // Return Values:
  787. // S_OK
  788. // Success.
  789. //
  790. // E_OUTOFMEMORY
  791. // Out of memory.
  792. //
  793. // other HRESULT
  794. // The call failed.
  795. //
  796. //////////////////////////////////////////////////////////////////////////
  797. HRESULT
  798. GetName( [ out ] BSTR * pbstrNameOut );
  799. //////////////////////////////////////////////////////////////////////////
  800. //
  801. // STDMETHOD
  802. // SetName(
  803. // [ in ] LPCWSTR pcszNameIn
  804. // )
  805. //
  806. // Description:
  807. // Stores a new name for the resource to be set when the cluster
  808. // configuration is commited.
  809. //
  810. // Parameter:
  811. // pcszNameIn
  812. // The name of the user wants to assigned the resource.
  813. //
  814. // Return Value:
  815. // S_OK
  816. // Success.
  817. //
  818. // E_OUTOFMEMORY
  819. // Out of memory.
  820. //
  821. // other HRESULT
  822. // The call failed.
  823. //
  824. //////////////////////////////////////////////////////////////////////////
  825. HRESULT
  826. SetName( [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn );
  827. //
  828. // Managed by cluster?
  829. //
  830. //////////////////////////////////////////////////////////////////////////
  831. //
  832. // STDMETHOD
  833. // IsManaged( void )
  834. //
  835. // Description:
  836. // Call this to determine if the resource is/will be managed by the cluster.
  837. //
  838. // A managed device will always have a resource created for it in the
  839. // cluster.
  840. //
  841. // Return Values:
  842. // S_OK
  843. // Call succeeded and the result is "TRUE."
  844. //
  845. // S_FALSE
  846. // Call succeeded and the result is "FALSE."
  847. //
  848. // other HRESULT
  849. // The call failed.
  850. //
  851. //////////////////////////////////////////////////////////////////////////
  852. HRESULT
  853. IsManaged( void );
  854. //////////////////////////////////////////////////////////////////////////
  855. //
  856. // STDMETHOD
  857. // SetManaged(
  858. // [ in ] BOOL fIsManagedIn
  859. // )
  860. //
  861. // Description:
  862. // Setting this flag will cause the resource to be configured as being managed
  863. // by the cluster.
  864. //
  865. // Parameter:
  866. // fIsManagedIn
  867. // If TRUE, the resource will be marked as being managed by the cluster.
  868. //
  869. // Setting this to TRUE will cause a resource to be created for this device
  870. // in the cluster. Setting this to FALSE will prevent a resource for for
  871. // this device from being created in the cluster.
  872. //
  873. // Return Value:
  874. // S_OK
  875. // Success.
  876. //
  877. // other HRESULT
  878. // The call failed.
  879. //
  880. //////////////////////////////////////////////////////////////////////////
  881. HRESULT
  882. SetManaged( [ in ] BOOL fIsManagedIn );
  883. //
  884. // Quorum resource?
  885. //
  886. //////////////////////////////////////////////////////////////////////////
  887. //
  888. // STDMETHOD
  889. // IsQuorumResource( void )
  890. //
  891. // Description:
  892. // Call this to determine if the resource is/will be set as the quorum
  893. // resource.
  894. //
  895. // Return Values:
  896. // S_OK
  897. // Call succeeded and the result is "TRUE."
  898. //
  899. // S_FALSE
  900. // Call succeeded and the result is "FALSE."
  901. //
  902. // other HRESULT
  903. // The call failed.
  904. //
  905. //////////////////////////////////////////////////////////////////////////
  906. HRESULT
  907. IsQuorumResource( void );
  908. //////////////////////////////////////////////////////////////////////////
  909. //
  910. // STDMETHOD
  911. // SetQuorumResource(
  912. // [ in ] BOOL fIsQuorumResourceIn
  913. // )
  914. //
  915. // Description:
  916. // Setting this flag will cause the resource to be configured as the
  917. // quorum resource in the cluster.
  918. //
  919. // Parameter:
  920. // fIsQuorumResourceIn
  921. // If TRUE, the resource will be marked to be the quorum resource.
  922. //
  923. // Return Value:
  924. // S_OK
  925. // Success.
  926. //
  927. // HRESULT_FROM_WIN32( ERROR_NOT_QUORUM_CAPABLE )
  928. // You tried to set a resource to be the quorum when the resource
  929. // is not capable of being a quorum resource.
  930. //
  931. // other HRESULT
  932. // The call failed.
  933. //
  934. //////////////////////////////////////////////////////////////////////////
  935. HRESULT
  936. SetQuorumResource( [ in ] BOOL fIsQuorumResourceIn );
  937. //
  938. // Quorum Capable?
  939. //
  940. //////////////////////////////////////////////////////////////////////////
  941. //
  942. // STDMETHOD
  943. // IsQuorumCapable( void )
  944. //
  945. // Description:
  946. // Call this to determine if the resource is capable be set as the quorum
  947. // resource.
  948. //
  949. // Return Values:
  950. // S_OK
  951. // Call succeeded and the result is "TRUE."
  952. //
  953. // S_FALSE
  954. // Call succeeded and the result is "FALSE."
  955. //
  956. // other HRESULT
  957. // The call failed.
  958. //
  959. //////////////////////////////////////////////////////////////////////////
  960. HRESULT
  961. IsQuorumCapable( void );
  962. //
  963. // Set Quorum Capable
  964. //
  965. //////////////////////////////////////////////////////////////////////////
  966. //
  967. // STDMETHOD
  968. // SetQuorumCapable(
  969. // [ in ] BOOL fIsQuorumCapableIn
  970. // )
  971. //
  972. // Description:
  973. // Call this to set whether the resource is capable to be the quorum
  974. // resource or not.
  975. //
  976. // Parameter:
  977. // fSetQuorumCapableIn
  978. // If TRUE, the resource will be marked as quorum capable.
  979. //
  980. // Return Values:
  981. // S_OK
  982. // Call succeeded.
  983. // E_NOTIMPL
  984. // The call is not implemented.
  985. //
  986. //////////////////////////////////////////////////////////////////////////
  987. HRESULT
  988. SetQuorumCapable( [ in ] BOOL fIsQuorumCapableIn );
  989. //
  990. // Drive Letter Mapping
  991. //
  992. //////////////////////////////////////////////////////////////////////////
  993. //
  994. // STDMETHOD
  995. // GetDriveLetterMappings(
  996. // [ out ] SDriveLetterMapping dlmDriveLetterMappingsOut
  997. // )
  998. //
  999. // Description:
  1000. // Retrieves the drive mappings for the resource (if any).
  1001. //
  1002. // Parameter:
  1003. // rgDriveLetterMappings
  1004. // An array of flags representing A: thru Z: (26) drive mappings to
  1005. // the resource. See SDriveLetterMapping for flag values.
  1006. //
  1007. // Return Values:
  1008. // S_OK
  1009. // Success.
  1010. //
  1011. // other HRESULT
  1012. // The call failed.
  1013. //
  1014. //////////////////////////////////////////////////////////////////////////
  1015. HRESULT
  1016. GetDriveLetterMappings( [ out ] SDriveLetterMapping * pdlmDriveLetterMappingOut );
  1017. //////////////////////////////////////////////////////////////////////////
  1018. //
  1019. // STDMETHOD
  1020. // SetDriveLetterMappings(
  1021. // [ in ] SDriveLetterMapping dlmDriveLetterMappingIn
  1022. // )
  1023. //
  1024. // Description:
  1025. // Stores the drive mappings for the resource. The change will not take
  1026. // effect until the configuration has been committed.
  1027. //
  1028. // Parameter:
  1029. // rgDriveLetterMappings
  1030. // An array of flags representing A: thru Z: (26) drive mappings to
  1031. // the resource. See EDriveLetterUsage for flag values.
  1032. //
  1033. // Return Values:
  1034. // S_OK
  1035. // Success.
  1036. //
  1037. // other HRESULT
  1038. // The call failed.
  1039. //
  1040. //////////////////////////////////////////////////////////////////////////
  1041. HRESULT
  1042. SetDriveLetterMappings( [ in ] SDriveLetterMapping dlmDriveLetterMappingIn );
  1043. //
  1044. // Manageable by the cluster?
  1045. //
  1046. //////////////////////////////////////////////////////////////////////////
  1047. //
  1048. // STDMETHOD
  1049. // IsManagedByDefault( void )
  1050. //
  1051. // Description:
  1052. // Call this to determine if the resource wants to be managed by default
  1053. // by the cluster.
  1054. //
  1055. // When doing a full configuration all devices that are
  1056. // managed by default will be have resources created for them
  1057. // in the cluster and will therefore be managed by the cluster.
  1058. // When doing a minimum configuration resources will not be created
  1059. // for any devices that want to be managed by default by the cluster.
  1060. //
  1061. // Return Values:
  1062. // S_OK
  1063. // Call succeeded and the result is "TRUE."
  1064. //
  1065. // S_FALSE
  1066. // Call succeeded and the result is "FALSE."
  1067. //
  1068. // other HRESULT
  1069. // The call failed.
  1070. //
  1071. //////////////////////////////////////////////////////////////////////////
  1072. HRESULT
  1073. IsManagedByDefault( void );
  1074. //////////////////////////////////////////////////////////////////////////
  1075. //
  1076. // STDMETHOD
  1077. // SetManagedByDefault(
  1078. // [ in ] BOOL fIsManageableIn
  1079. // )
  1080. //
  1081. // Description:
  1082. // Setting this flag will cause the resource to be managed by default
  1083. // by the cluster.
  1084. //
  1085. // Parameter:
  1086. // fIsManagedByDefaultIn
  1087. // If TRUE, the resource will be marked as being managed by default
  1088. // by the cluster.
  1089. //
  1090. // Setting this to TRUE will cause a cluster resource to be created for
  1091. // this device by default when doing a full configuration. By
  1092. // setting this to FALSE the device will not have a resource created
  1093. // for it in the cluster by default.
  1094. //
  1095. // Return Value:
  1096. // S_OK
  1097. // Success.
  1098. //
  1099. // other HRESULT
  1100. // The call failed.
  1101. //
  1102. //////////////////////////////////////////////////////////////////////////
  1103. HRESULT
  1104. SetManagedByDefault( [ in ] BOOL fIsManagedByDefaultIn );
  1105. }; //*** interface IClusCfgManagedResourceInfo
  1106. //****************************************************************************
  1107. //++
  1108. //
  1109. // interface IEnumClusCfgPartitions
  1110. //
  1111. // Description:
  1112. // This interface enumerates the partitions on a storage device that the
  1113. // cluster service can manage.
  1114. //
  1115. //--
  1116. //****************************************************************************
  1117. [
  1118. object,
  1119. uuid( 4440BB6A-B0AC-479d-B534-7265A31D6C55 ),
  1120. async_uuid( 4440BB6A-B0AC-479d-B534-7265A31D6C56 ),
  1121. pointer_default( unique )
  1122. ]
  1123. interface IEnumClusCfgPartitions : IUnknown
  1124. {
  1125. //////////////////////////////////////////////////////////////////////////
  1126. //
  1127. // STDMETHOD
  1128. // Next(
  1129. // [ in ] ULONG cNumberRequestedIn,
  1130. // [ out, size_is( cNumberRequestedIn ), length_is(*pcNumberFetchedOut) ] IClusCfgPartitionInfo ** rgpPartitionInfoOut,
  1131. // [ out ] ULONG * pcNumberFetchedOut
  1132. // );
  1133. //
  1134. // Description:
  1135. // Retrieves the next cNumberRequestedIn items in the enumeration sequence.
  1136. // If there are fewer than the requested number of elements left in the
  1137. // sequence, it retrieves the remaining elements. The number of elements
  1138. // actually retrieved is returned through pcNumberFetchedOut (unless the
  1139. // caller passed in NULL for that parameter).
  1140. //
  1141. // Parameters:
  1142. // cNumberRequestedIn
  1143. // number of elements being requested.
  1144. //
  1145. // rgpPartitionInfoOut
  1146. // Array of size cNumberRequestedIn (or larger) of the elements of interest.
  1147. // The type of this parameter depends on the item being enumerated.
  1148. //
  1149. // pcNumberFetchedOut
  1150. // Pointer to the number of elements actually supplied in
  1151. // rgpPartitionInfoOut. Caller can pass in NULL if cNumberRequestedIn
  1152. // is one.
  1153. //
  1154. // Return Values:
  1155. // S_OK
  1156. // The number of elements supplied is cNumberRequestedIn
  1157. //
  1158. // S_FALSE
  1159. // The number of elements supplied is not cNumberRequestedIn
  1160. //
  1161. // other HRESULT
  1162. // The call failed.
  1163. //
  1164. //////////////////////////////////////////////////////////////////////////
  1165. HRESULT
  1166. Next(
  1167. [ in ] ULONG cNumberRequestedIn,
  1168. [ out, size_is( cNumberRequestedIn ), length_is(*pcNumberFetchedOut) ] IClusCfgPartitionInfo ** rgpPartitionInfoOut,
  1169. [ out ] ULONG * pcNumberFetchedOut
  1170. );
  1171. //////////////////////////////////////////////////////////////////////////
  1172. //
  1173. // STDMETHOD
  1174. // Reset( void );
  1175. //
  1176. // Description:
  1177. // Reset the enumeration sequence to the beginning.
  1178. //
  1179. // Return Value:
  1180. // S_OK
  1181. // Success.
  1182. //
  1183. // other HRESULT
  1184. // The call failed.
  1185. //
  1186. //////////////////////////////////////////////////////////////////////////
  1187. HRESULT
  1188. Reset( void );
  1189. //////////////////////////////////////////////////////////////////////////
  1190. //
  1191. // STDMETHOD
  1192. // Skip(
  1193. // [ in ] ULONG cNumberToSkip
  1194. // );
  1195. //
  1196. // Description:
  1197. // Skips over the next specified number of elements in the enumeration sequence.
  1198. //
  1199. // Parameter:
  1200. // cNumberToSkip
  1201. // The number of elements to be skipped.
  1202. //
  1203. // Return Value:
  1204. // S_OK
  1205. // The number of elements skipped is cNumberToSkip.
  1206. //
  1207. // S_FALSE
  1208. // Success, but you've past the last element.
  1209. //
  1210. // other HRESULT
  1211. // The call failed.
  1212. //
  1213. //////////////////////////////////////////////////////////////////////////
  1214. HRESULT
  1215. Skip( [ in ] ULONG cNumberToSkip );
  1216. //////////////////////////////////////////////////////////////////////////
  1217. //
  1218. // STDMETHOD
  1219. // Clone(
  1220. // [ out ] IEnumClusCfgPartitions ** ppEnumPartitions
  1221. // );
  1222. //
  1223. // Description:
  1224. // Creates another enumerator that contains the same enumeration state
  1225. // as the current one. Using this function, a client can record a
  1226. // particular point in the enumeration sequence, and then return to
  1227. // that point at a later time. The new enumerator supports the same
  1228. // interface as the original one.
  1229. //
  1230. // Return Values:
  1231. // E_INVALIDARG
  1232. // ppEnumPartitions is invalid.
  1233. //
  1234. // E_OUTOFMEMORY
  1235. // Out of memory.
  1236. //
  1237. // E_UNEXPECTED
  1238. // Unknown error (it's in the EnumXXXX docs).
  1239. //
  1240. //////////////////////////////////////////////////////////////////////////
  1241. HRESULT
  1242. Clone( [ out ] IEnumClusCfgPartitions ** ppEnumPartitions );
  1243. //////////////////////////////////////////////////////////////////////////
  1244. //
  1245. // STDMETHOD
  1246. // Count(
  1247. // [ out, ref ] DWORD * pnCountOut
  1248. // );
  1249. //
  1250. // Description:
  1251. // Returns the size (possibly zero) of the enumerator's collection.
  1252. //
  1253. // Return Values:
  1254. // E_POINTER
  1255. // pnCountOut was null.
  1256. //
  1257. //////////////////////////////////////////////////////////////////////////
  1258. HRESULT
  1259. Count( [ out, ref ] DWORD * pnCountOut );
  1260. }; //*** interface IEnumClusCfgPartitions
  1261. //****************************************************************************
  1262. //++
  1263. //
  1264. // interface IClusCfgPartitionInfo
  1265. //
  1266. // Description:
  1267. // This interface provides the partition info.
  1268. //
  1269. //--
  1270. //****************************************************************************
  1271. [
  1272. object,
  1273. uuid( EC1EBD9F-5866-4846-8952-EC36C3961EEE ),
  1274. async_uuid( EC1EBD9F-5866-4846-8952-EC36C3961EEF ),
  1275. pointer_default( unique )
  1276. ]
  1277. interface IClusCfgPartitionInfo : IUnknown
  1278. {
  1279. //
  1280. // UID
  1281. //
  1282. //////////////////////////////////////////////////////////////////////////
  1283. //
  1284. // STDMETHOD
  1285. // GetUID(
  1286. // [ out ] BSTR * pbstrUIDOut
  1287. // )
  1288. //
  1289. // Description:
  1290. // Retrieve the "Unique IDentifier" for this partition. This is not a Universally
  1291. // Unique IDentifier (UUID or GUID). This indentifer should match identifiers
  1292. // that can be generated on other nodes, but must be unique for the partition
  1293. // the interface (NIC) is on.
  1294. //
  1295. // Parameters:
  1296. // pbstrUIDOut
  1297. // Pointer to the UID string. pbstrUIDOut should be freed by the caller
  1298. // by calling SysFreeString( ).
  1299. //
  1300. // Return Values:
  1301. // S_OK
  1302. // Success.
  1303. //
  1304. // E_OUTOFMEMORY
  1305. // Out of memory.
  1306. //
  1307. // other HRESULT
  1308. // The call failed.
  1309. //
  1310. //////////////////////////////////////////////////////////////////////////
  1311. HRESULT
  1312. GetUID( [ out ] BSTR * pbstrUIDOut );
  1313. //
  1314. // Name
  1315. //
  1316. //////////////////////////////////////////////////////////////////////////
  1317. //
  1318. // STDMETHOD
  1319. // GetName(
  1320. // [ out ] BSTR * pbstrNameOut
  1321. // )
  1322. //
  1323. // Description:
  1324. // Retrieves a "user friendly" name of the interface.
  1325. //
  1326. // Parameter:
  1327. // pbstrNameOut
  1328. // Pointer to partition interface name. This should be freed by the caller
  1329. // by calling SysFreeString( ).
  1330. //
  1331. // Return Values:
  1332. // S_OK
  1333. // Success.
  1334. //
  1335. // E_OUTOFMEMORY
  1336. // Out of memory.
  1337. //
  1338. // other HRESULT
  1339. // The call failed.
  1340. //
  1341. //////////////////////////////////////////////////////////////////////////
  1342. HRESULT
  1343. GetName( [ out ] BSTR * pbstrNameOut );
  1344. //////////////////////////////////////////////////////////////////////////
  1345. //
  1346. // STDMETHOD
  1347. // SetName(
  1348. // [ in ] LPCWSTR pcszNameIn
  1349. // )
  1350. //
  1351. // Description:
  1352. // Stores a new name of the partition interface to be set when the cluster
  1353. // configuration is commited.
  1354. //
  1355. // Parameter:
  1356. // pcszNameIn
  1357. // The name of the user wants to assigned the interface.
  1358. //
  1359. // Return Value:
  1360. // S_OK
  1361. // Success.
  1362. //
  1363. // E_OUTOFMEMORY
  1364. // Out of memory.
  1365. //
  1366. // other HRESULT
  1367. // The call failed.
  1368. //
  1369. //////////////////////////////////////////////////////////////////////////
  1370. HRESULT
  1371. SetName( [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn );
  1372. //
  1373. // Description
  1374. //
  1375. //////////////////////////////////////////////////////////////////////////
  1376. //
  1377. // STDMETHOD
  1378. // GetDescription(
  1379. // [ out ] BSTR * pbstrDescriptionOut
  1380. // )
  1381. //
  1382. // Description:
  1383. // Retrieves the description string for a partition interface.
  1384. //
  1385. // Parameter:
  1386. // pbstrDescription
  1387. // Pointer to the description of the partition. This should be freed
  1388. // by the caller by calling SysFreeString( ).
  1389. //
  1390. // Return Values:
  1391. // S_OK
  1392. // Success.
  1393. //
  1394. // E_OUTOFMEMORY
  1395. // Out of memory.
  1396. //
  1397. // other HRESULT
  1398. // The call failed.
  1399. //
  1400. //////////////////////////////////////////////////////////////////////////
  1401. HRESULT
  1402. GetDescription( [ out ] BSTR * pbstrDescriptionOut );
  1403. //////////////////////////////////////////////////////////////////////////
  1404. //
  1405. // STDMETHOD
  1406. // SetDescription(
  1407. // [ in ] LPCWSTR pcszDescriptionIn
  1408. // )
  1409. //
  1410. // Description:
  1411. // Stores a new name of the partition interface to be set when the cluster
  1412. // configuration is commited.
  1413. //
  1414. // Parameter:
  1415. // pcszDescriptionIn
  1416. // The description the user wants to assign to the interface.
  1417. //
  1418. // Return Values:
  1419. // S_OK
  1420. // Success.
  1421. //
  1422. // E_OUTOFMEMORY
  1423. // Out of memory.
  1424. //
  1425. // other HRESULT
  1426. // The call failed.
  1427. //
  1428. //////////////////////////////////////////////////////////////////////////
  1429. HRESULT
  1430. SetDescription(
  1431. [ in, pointer_default( unique ) ] LPCWSTR pcszDescriptionIn
  1432. );
  1433. //
  1434. // Drive Letter Mapping
  1435. //
  1436. //////////////////////////////////////////////////////////////////////////////
  1437. //
  1438. // STDMETHOD
  1439. // GetDriveLetterMappings(
  1440. // [ out ] SDriveLetterMapping dlmDriveLetterUsageOut
  1441. // )
  1442. //
  1443. // Description:
  1444. // Retrieves the drive letter mappings of the partition.
  1445. //
  1446. // Parameter:
  1447. // rgDriveLetterUsage
  1448. // An array of flags representing A: thru Z: (26) drive mappings to
  1449. // the disk. See SDriveLetterMapping for flag values.
  1450. //
  1451. // Return Values:
  1452. // S_OK
  1453. // Success.
  1454. //
  1455. // other HRESULT
  1456. // The call failed.
  1457. //
  1458. //////////////////////////////////////////////////////////////////////////
  1459. HRESULT
  1460. GetDriveLetterMappings( [ out ] SDriveLetterMapping * pdlmDriveLetterUsageOut );
  1461. //////////////////////////////////////////////////////////////////////////
  1462. //
  1463. // STDMETHOD
  1464. // SetDriveLetterMappings(
  1465. // [ in ] SDriveLetterMapping dlmDriveLetterMappingIn
  1466. // )
  1467. //
  1468. // Description:
  1469. // Stores the drive mappings for the disk. The change will not take
  1470. // effect until the configuration has been committed.
  1471. //
  1472. // Parameter:
  1473. // rgDriveLetterMappings
  1474. // An array of flags representing A: thru Z: (26) drive mappings to
  1475. // the disk. See EDriveLetterUsage for flag values.
  1476. //
  1477. // Return Values:
  1478. // S_OK
  1479. // Success.
  1480. //
  1481. // other HRESULT
  1482. // The call failed.
  1483. //
  1484. //////////////////////////////////////////////////////////////////////////
  1485. HRESULT
  1486. SetDriveLetterMappings( [ in ] SDriveLetterMapping dlmDriveLetterMappingIn );
  1487. //
  1488. // Partition Size
  1489. //
  1490. //////////////////////////////////////////////////////////////////////////////
  1491. //
  1492. // STDMETHOD
  1493. // GetSize(
  1494. // [ out ] ULONG * pcMegaBytes
  1495. // )
  1496. //
  1497. // Description:
  1498. // Retrieves the size of the partition in Megabytes.
  1499. //
  1500. // Parameter:
  1501. // pcMegaBytes
  1502. // Retrieves the partition size.
  1503. //
  1504. // Return Values:
  1505. // S_OK
  1506. // Success.
  1507. //
  1508. // other HRESULT
  1509. // The call failed.
  1510. //
  1511. //////////////////////////////////////////////////////////////////////////
  1512. HRESULT
  1513. GetSize( [ out ] ULONG * pcMegaBytes );
  1514. }; //*** interface IClusCfgPartitionInfo
  1515. //****************************************************************************
  1516. //++
  1517. //
  1518. // interface IEnumClusCfgIPAddresses
  1519. //
  1520. // Description:
  1521. // This interface enumerates the IP addresses on this adapter.
  1522. //
  1523. //--
  1524. //****************************************************************************
  1525. [
  1526. object,
  1527. uuid( BD5F35BA-0BC0-455f-926D-C3D356419486 ),
  1528. async_uuid( BD5F35BA-0BC0-455f-926D-C3D356419487 ),
  1529. pointer_default( unique )
  1530. ]
  1531. interface IEnumClusCfgIPAddresses : IUnknown
  1532. {
  1533. //////////////////////////////////////////////////////////////////////////
  1534. //
  1535. // STDMETHOD
  1536. // Next(
  1537. // [ in ] ULONG cNumberRequestedIn,
  1538. // [ out, size_is( cNumberRequestedIn ), length_is(*pcNumberFetchedOut) ] IClusCfgIPAddressInfo ** rgpIPAddressInfoOut,
  1539. // [ out ] ULONG * pcNumberFetchedOut
  1540. // );
  1541. //
  1542. // Description:
  1543. // Retrieves the next cNumberRequestedIn items in the enumeration sequence.
  1544. // If there are fewer than the requested number of elements left in the
  1545. // sequence, it retrieves the remaining elements. The number of elements
  1546. // actually retrieved is returned through pcNumberFetchedOut (unless the
  1547. // caller passed in NULL for that parameter).
  1548. //
  1549. // Parameters:
  1550. // cNumberRequestedIn
  1551. // number of elements being requested.
  1552. //
  1553. // rgpIPAddressInfoOut
  1554. // Array of size cNumberRequestedIn (or larger) of the elements of interest.
  1555. // The type of this parameter depends on the item being enumerated.
  1556. //
  1557. // pcNumberFetchedOut
  1558. // Pointer to the number of elements actually supplied in
  1559. // rgpIPAddressInfoOut. Caller can pass in NULL if cNumberRequestedIn
  1560. // is one.
  1561. //
  1562. // Return Values:
  1563. // S_OK
  1564. // The number of elements supplied is cNumberRequestedIn
  1565. //
  1566. // S_FALSE
  1567. // The number of elements supplied is not cNumberRequestedIn.
  1568. //
  1569. // other HRESULT
  1570. // The call failed.
  1571. //
  1572. //////////////////////////////////////////////////////////////////////////
  1573. HRESULT
  1574. Next(
  1575. [ in ] ULONG cNumberRequestedIn,
  1576. [ out, size_is( cNumberRequestedIn ), length_is(*pcNumberFetchedOut) ] IClusCfgIPAddressInfo ** rgpIPAddressInfoOut,
  1577. [ out ] ULONG * pcNumberFetchedOut
  1578. );
  1579. //////////////////////////////////////////////////////////////////////////
  1580. //
  1581. // STDMETHOD
  1582. // Skip(
  1583. // [ in ] ULONG cNumberToSkip
  1584. // );
  1585. //
  1586. // Description:
  1587. // Skips over the next specified number of elements in the enumeration sequence.
  1588. //
  1589. // Parameter:
  1590. // cNumberToSkip
  1591. // The number of elements to be skipped.
  1592. //
  1593. // Return Value:
  1594. // S_OK
  1595. // The number of elements skipped is cNumberToSkip.
  1596. //
  1597. // S_FALSE
  1598. // Success, but you've past the last element.
  1599. //
  1600. // other HRESULT
  1601. // The call failed.
  1602. //
  1603. //////////////////////////////////////////////////////////////////////////
  1604. HRESULT
  1605. Skip( [ in ] ULONG cNumberToSkipIn );
  1606. //////////////////////////////////////////////////////////////////////////
  1607. //
  1608. // STDMETHOD
  1609. // Reset( void );
  1610. //
  1611. // Description:
  1612. // Reset the enumeration sequence to the beginning.
  1613. //
  1614. // Return Value:
  1615. // S_OK
  1616. // Success.
  1617. //
  1618. // other HRESULT
  1619. // The call failed.
  1620. //
  1621. //////////////////////////////////////////////////////////////////////////
  1622. HRESULT
  1623. Reset( void );
  1624. //////////////////////////////////////////////////////////////////////////
  1625. //
  1626. // STDMETHOD
  1627. // Clone(
  1628. // [ out ] IEnumClusCfgIPAddresses ** ppEnumIPAddressesOut
  1629. // );
  1630. //
  1631. // Description:
  1632. // Creates another enumerator that contains the same enumeration state
  1633. // as the current one. Using this function, a client can record a
  1634. // particular point in the enumeration sequence, and then return to
  1635. // that point at a later time. The new enumerator supports the same
  1636. // interface as the original one.
  1637. //
  1638. // Parameter:
  1639. // ppEnumIPAddressesOut
  1640. // Address of IEnumClusCfgManagedResources * pointer variable that receives
  1641. // the interface pointer to the enumeration object. If the method is
  1642. // unsuccessful, the value of this output variable is undefined.
  1643. //
  1644. // Return Values:
  1645. // E_INVALIDARG
  1646. // ppEnumIPAddressesOut is invalid.
  1647. //
  1648. // E_OUTOFMEMORY
  1649. // Out of memory.
  1650. //
  1651. // E_UNEXPECTED
  1652. // Unknown error (it's in the EnumXXXX docs).
  1653. //
  1654. //////////////////////////////////////////////////////////////////////////
  1655. HRESULT
  1656. Clone( [ out ] IEnumClusCfgIPAddresses ** ppEnumIPAddressesOut );
  1657. //////////////////////////////////////////////////////////////////////////
  1658. //
  1659. // STDMETHOD
  1660. // Count(
  1661. // [ out, ref ] DWORD * pnCountOut
  1662. // );
  1663. //
  1664. // Description:
  1665. // Returns the size (possibly zero) of the enumerator's collection.
  1666. //
  1667. // Return Values:
  1668. // E_POINTER
  1669. // pnCountOut was null.
  1670. //
  1671. //////////////////////////////////////////////////////////////////////////
  1672. HRESULT
  1673. Count( [ out, ref ] DWORD * pnCountOut );
  1674. }; //*** interface IEnumClusCfgIPAddresses
  1675. //****************************************************************************
  1676. //++
  1677. //
  1678. // interface IClusCfgIPAddressInfo
  1679. //
  1680. // Description:
  1681. // This interface encapsulates the info about an IP address.
  1682. //
  1683. //--
  1684. //****************************************************************************
  1685. [
  1686. object,
  1687. uuid( AAEAF0A5-E310-4604-A55E-2F9DDC4157A8 ),
  1688. async_uuid( AAEAF0A5-E310-4604-A55E-2F9DDC4157A9 ),
  1689. pointer_default( unique )
  1690. ]
  1691. interface IClusCfgIPAddressInfo : IUnknown
  1692. {
  1693. //
  1694. // UID
  1695. //
  1696. //////////////////////////////////////////////////////////////////////////
  1697. //
  1698. // STDMETHOD
  1699. // GetUID(
  1700. // [ out ] BSTR * pbstrUIDOut
  1701. // )
  1702. //
  1703. // Description:
  1704. // Retrieve the "Unique IDentifier" for this IP address. This is not a Universally
  1705. // Unique IDentifier (UUID or GUID). This indentifer should match identifiers
  1706. // that can be generated on other nodes, but must be unique for the network
  1707. // the interface (NIC) is on.
  1708. //
  1709. // Parameters:
  1710. // pbstrUIDOut
  1711. // Pointer to the UID string. pbstrUIDOut should be freed by the caller
  1712. // by calling SysFreeString( ).
  1713. //
  1714. // Return Values:
  1715. // S_OK
  1716. // Success.
  1717. //
  1718. // E_OUTOFMEMORY
  1719. // Out of memory.
  1720. //
  1721. // other HRESULT
  1722. // The call failed.
  1723. //
  1724. //////////////////////////////////////////////////////////////////////////
  1725. HRESULT
  1726. GetUID( [ out ] BSTR * pbstrUIDOut );
  1727. //
  1728. // IP Address
  1729. //
  1730. //////////////////////////////////////////////////////////////////////////
  1731. //
  1732. // STDMETHOD
  1733. // GetIPAddress(
  1734. // [ out ] ULONG * pulDottedQuadOut
  1735. // )
  1736. //
  1737. // Description:
  1738. // Retrieves an IP Address for the network inteface.
  1739. //
  1740. // Paramater:
  1741. // pulDottedQuadOut
  1742. // The IP address of the interface in dotted quad format.
  1743. //
  1744. // Return Values:
  1745. // S_OK
  1746. // Success.
  1747. //
  1748. // other HRESULT
  1749. // The call failed.
  1750. //
  1751. //////////////////////////////////////////////////////////////////////////
  1752. HRESULT
  1753. GetIPAddress( [ out ] ULONG * pulDottedQuadOut );
  1754. //////////////////////////////////////////////////////////////////////////
  1755. //
  1756. // STDMETHOD
  1757. // SetIPAddress(
  1758. // [ in ] ULONG ulDottedQuadIn
  1759. // )
  1760. //
  1761. // Description:
  1762. // Stores an IP Address of the network interface to be set when the cluster
  1763. // configuration is committed.
  1764. //
  1765. // Parameter:
  1766. // ulDottedQuadIn
  1767. // The IP address of the interface to be stored in dotted quad format.
  1768. //
  1769. // Return Values:
  1770. // S_OK
  1771. // Success.
  1772. //
  1773. // other HRESULT
  1774. // The call failed.
  1775. //
  1776. //////////////////////////////////////////////////////////////////////////
  1777. HRESULT
  1778. SetIPAddress( [ in ] ULONG ulDottedQuadIn );
  1779. //
  1780. // Subnet Mask
  1781. //
  1782. //////////////////////////////////////////////////////////////////////////
  1783. //
  1784. // STDMETHOD
  1785. // GetSubnetMask(
  1786. // [ out ] ULONG * pulDottedQuadOut
  1787. // )
  1788. //
  1789. // Description:
  1790. // Retrieves a subnet mask for the network interface.
  1791. //
  1792. // Parameter:
  1793. // ulDottedQuadOut
  1794. // The subnet mask of the interface in dotted quad format.
  1795. //
  1796. // Return Value:
  1797. // S_OK
  1798. // Success.
  1799. //
  1800. // other HRESULT
  1801. // The call failed.
  1802. //
  1803. //////////////////////////////////////////////////////////////////////////
  1804. HRESULT
  1805. GetSubnetMask( [ out ] ULONG * pulDottedQuadOut );
  1806. //////////////////////////////////////////////////////////////////////////
  1807. //
  1808. // STDMETHOD
  1809. // SetSubnetMask(
  1810. // [ in ] ULONG ulDottedQuadIn
  1811. // )
  1812. //
  1813. // Description:
  1814. // Stores a subnet mask for the network interface to be set when the cluster
  1815. // configuration is committed.
  1816. //
  1817. // Parameter:
  1818. // ulDottedQuadIn
  1819. // The subnet mask of the interface to be stored in dotted quad format.
  1820. //
  1821. // Return Values:
  1822. // S_OK
  1823. // Success.
  1824. //
  1825. // other HRESULT
  1826. // The call failed.
  1827. //
  1828. //////////////////////////////////////////////////////////////////////////
  1829. HRESULT
  1830. SetSubnetMask( [ in ] ULONG ulDottedQuadIn );
  1831. }; //*** interface IClusCfgIPAddressInfo
  1832. //****************************************************************************
  1833. //++
  1834. //
  1835. // interface IClusCfgNetworkInfo
  1836. //
  1837. // Description:
  1838. // This interface enumerates the networks on this computer.
  1839. //
  1840. //--
  1841. //****************************************************************************
  1842. [
  1843. object,
  1844. uuid( 19FC7580-950A-44a6-966E-74B14B20918F ),
  1845. async_uuid( ED71FD2D-AD02-4dfc-B376-5FFA5F5A7C2C ),
  1846. pointer_default( unique )
  1847. ]
  1848. interface IClusCfgNetworkInfo : IUnknown
  1849. {
  1850. //
  1851. // UID
  1852. //
  1853. //////////////////////////////////////////////////////////////////////////
  1854. //
  1855. // STDMETHOD
  1856. // GetUID(
  1857. // [ out ] BSTR * pbstrUIDOut
  1858. // )
  1859. //
  1860. // Description:
  1861. // Retrieve the "Unique IDentifier" for this network. This is not a Universally
  1862. // Unique IDentifier (UUID or GUID). This indentifer should match identifiers
  1863. // that can be generated on other nodes, but must be unique for the network
  1864. // the interface (NIC) is on.
  1865. //
  1866. // Parameters:
  1867. // pbstrUIDOut
  1868. // Pointer to the UID string. pbstrUIDOut should be freed by the caller
  1869. // by calling SysFreeString( ).
  1870. //
  1871. // Return Values:
  1872. // S_OK
  1873. // Success.
  1874. //
  1875. // E_OUTOFMEMORY
  1876. // Out of memory.
  1877. //
  1878. // other HRESULT
  1879. // The call failed.
  1880. //
  1881. //////////////////////////////////////////////////////////////////////////
  1882. HRESULT
  1883. GetUID( [ out ] BSTR * pbstrUIDOut );
  1884. //
  1885. // Name
  1886. //
  1887. //////////////////////////////////////////////////////////////////////////
  1888. //
  1889. // STDMETHOD
  1890. // GetName(
  1891. // [ out ] BSTR * pbstrNameOut
  1892. // )
  1893. //
  1894. // Description:
  1895. // Retrieves a "user friendly" name of the interface.
  1896. //
  1897. // Parameter:
  1898. // pbstrNameOut
  1899. // Pointer to network interface name. This should be freed by the caller
  1900. // by calling SysFreeString( ).
  1901. //
  1902. // Return Values:
  1903. // S_OK
  1904. // Success.
  1905. //
  1906. // E_OUTOFMEMORY
  1907. // Out of memory.
  1908. //
  1909. // other HRESULT
  1910. // The call failed.
  1911. //
  1912. //////////////////////////////////////////////////////////////////////////
  1913. HRESULT
  1914. GetName( [ out ] BSTR * pbstrNameOut );
  1915. //////////////////////////////////////////////////////////////////////////
  1916. //
  1917. // STDMETHOD
  1918. // SetName(
  1919. // [ in ] LPCWSTR pcszNameIn
  1920. // )
  1921. //
  1922. // Description:
  1923. // Stores a new name of the network interface to be set when the cluster
  1924. // configuration is commited.
  1925. //
  1926. // Parameter:
  1927. // pcszNameIn
  1928. // The name of the user wants to assigned the interface.
  1929. //
  1930. // Return Value:
  1931. // S_OK
  1932. // Success.
  1933. //
  1934. // E_OUTOFMEMORY
  1935. // Out of memory.
  1936. //
  1937. // other HRESULT
  1938. // The call failed.
  1939. //
  1940. //////////////////////////////////////////////////////////////////////////
  1941. HRESULT
  1942. SetName( [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn );
  1943. //
  1944. // Description
  1945. //
  1946. //////////////////////////////////////////////////////////////////////////
  1947. //
  1948. // STDMETHOD
  1949. // GetDescription(
  1950. // [ out ] BSTR * pbstrDescriptionOut
  1951. // )
  1952. //
  1953. // Description:
  1954. // Retrieves the description string for a network interface.
  1955. //
  1956. // Parameter:
  1957. // pbstrDescription
  1958. // Pointer to the description of the network. This should be freed
  1959. // by the caller by calling SysFreeString( ).
  1960. //
  1961. // Return Values:
  1962. // S_OK
  1963. // Success.
  1964. //
  1965. // E_OUTOFMEMORY
  1966. // Out of memory.
  1967. //
  1968. // other HRESULT
  1969. // The call failed.
  1970. //
  1971. //////////////////////////////////////////////////////////////////////////
  1972. HRESULT
  1973. GetDescription( [ out ] BSTR * pbstrDescriptionOut );
  1974. //////////////////////////////////////////////////////////////////////////
  1975. //
  1976. // STDMETHOD
  1977. // SetDescription(
  1978. // [ in ] LPCWSTR pcszDescriptionIn
  1979. // )
  1980. //
  1981. // Description:
  1982. // Stores a new name of the network interface to be set when the cluster
  1983. // configuration is commited.
  1984. //
  1985. // Parameter:
  1986. // pcszDescriptionIn
  1987. // The description the user wants to assign to the interface.
  1988. //
  1989. // Return Values:
  1990. // S_OK
  1991. // Success.
  1992. //
  1993. // E_OUTOFMEMORY
  1994. // Out of memory.
  1995. //
  1996. // other HRESULT
  1997. // The call failed.
  1998. //
  1999. //////////////////////////////////////////////////////////////////////////
  2000. HRESULT
  2001. SetDescription(
  2002. [ in, pointer_default( unique ) ] LPCWSTR pcszDescriptionIn
  2003. );
  2004. //
  2005. // Network Address
  2006. //
  2007. //////////////////////////////////////////////////////////////////////////
  2008. //
  2009. // STDMETHOD
  2010. // GetPrimaryNetworkAddress(
  2011. // [ out ] IClusCfgIPAddressInfo ** ppIPAddressOut
  2012. // )
  2013. //
  2014. // Description:
  2015. // Get the primary network address.
  2016. //
  2017. // Parameter:
  2018. // ppIPAddressOut
  2019. // Pointer to the IClusCfgIPAddressInfo interface.
  2020. //
  2021. // Return Values:
  2022. // S_OK
  2023. // The call succeeded.
  2024. //
  2025. // other HRESULTs
  2026. // The call failed.
  2027. //
  2028. //////////////////////////////////////////////////////////////////////////
  2029. HRESULT
  2030. GetPrimaryNetworkAddress( [ out ] IClusCfgIPAddressInfo ** ppIPAddressOut );
  2031. //////////////////////////////////////////////////////////////////////////
  2032. //
  2033. // STDMETHOD
  2034. // SetPrimaryNetworkAddress(
  2035. // [ in ] IClusCfgIPAddressInfo * pIPAddressIn
  2036. // )
  2037. //
  2038. // Description:
  2039. // Set the primary network address.
  2040. //
  2041. // Parameter:
  2042. // pIPAddressIn
  2043. // Pointer to the IClusCfgIPAddressInfo interface.
  2044. //
  2045. // Return Values:
  2046. // S_OK
  2047. // The call succeeded.
  2048. //
  2049. // other HRESULTs
  2050. // The call failed.
  2051. //
  2052. //////////////////////////////////////////////////////////////////////////
  2053. HRESULT
  2054. SetPrimaryNetworkAddress( [ in ] IClusCfgIPAddressInfo * pIPAddressIn );
  2055. //
  2056. // Public?
  2057. //
  2058. //////////////////////////////////////////////////////////////////////////
  2059. //
  2060. // STDMETHOD
  2061. // IsPublic( void )
  2062. //
  2063. // Description:
  2064. // Call this to determine if the network has been configured to be a
  2065. // public network. Note that an interface can be both public and private.
  2066. //
  2067. // Return Values:
  2068. // S_OK
  2069. // Call succeeded and the result is "TRUE."
  2070. //
  2071. // S_FALSE
  2072. // Call succeeded and the result is "FALSE."
  2073. //
  2074. // other HRESULT
  2075. // The call failed.
  2076. //
  2077. //////////////////////////////////////////////////////////////////////////
  2078. HRESULT
  2079. IsPublic( void );
  2080. //////////////////////////////////////////////////////////////////////////
  2081. //
  2082. // STDMETHOD
  2083. // SetPublic(
  2084. // [ in ] BOOL fIsPublicIn
  2085. // )
  2086. //
  2087. // Description:
  2088. // Sets the "public property" of a network interface. The change will not
  2089. // take effect until the configuration has been committed.
  2090. //
  2091. // Parameter:
  2092. // fIsPublicIn
  2093. // If TRUE, the interface will be marked to be a public interface.
  2094. //
  2095. // Return Value:
  2096. // S_OK
  2097. // Success.
  2098. //
  2099. // other HRESULT
  2100. // The call failed.
  2101. //
  2102. //////////////////////////////////////////////////////////////////////////
  2103. HRESULT
  2104. SetPublic( [ in ] BOOL fIsPublicIn );
  2105. //
  2106. // Private?
  2107. //
  2108. //////////////////////////////////////////////////////////////////////////
  2109. //
  2110. // STDMETHOD
  2111. // IsPrivate( void )
  2112. //
  2113. // Description:
  2114. // Call this to determine if the network has been configured to be a
  2115. // private network. Note that an interface can be both public and private.
  2116. //
  2117. // Return Values:
  2118. // S_OK
  2119. // Call succeeded and the result is "TRUE."
  2120. // S_FALSE
  2121. // Call succeeded and the result is "FALSE."
  2122. // other HRESULT
  2123. // The call failed.
  2124. //
  2125. //////////////////////////////////////////////////////////////////////////
  2126. HRESULT
  2127. IsPrivate( void );
  2128. //////////////////////////////////////////////////////////////////////////
  2129. //
  2130. // STDMETHOD
  2131. // SetPrivate(
  2132. // [ in ] BOOL fIsPrivateIn
  2133. // )
  2134. //
  2135. // Description:
  2136. // Sets the "private property" of a network interface. The change will not
  2137. // take effect until the configuration has been committed.
  2138. //
  2139. // Parameter:
  2140. // fIsPrivateIn
  2141. // Value to set the flag to. If TRUE the interface will be marked as
  2142. // a private interface. If FALSE the interface will be marked as NOT
  2143. // a private interface.
  2144. //
  2145. // Return Value:
  2146. // S_OK
  2147. // Success.
  2148. //
  2149. // other HRESULT
  2150. // The call failed.
  2151. //
  2152. //////////////////////////////////////////////////////////////////////////
  2153. HRESULT
  2154. SetPrivate( [ in ] BOOL fIsPrivateIn );
  2155. }; //*** interface IClusCfgNetworkInfo
  2156. //****************************************************************************
  2157. //++
  2158. //
  2159. // interface IClusCfgClusterInfo
  2160. //
  2161. // Description:
  2162. // This interface contains information about the cluster configuration.
  2163. //
  2164. //--
  2165. //****************************************************************************
  2166. [
  2167. object,
  2168. uuid( 85B4BBC0-DDC4-4ae7-8268-F4850BB2A6EE ),
  2169. async_uuid( 8BDBA247-04F5-4114-837E-B263412A4B64 ),
  2170. pointer_default( unique )
  2171. ]
  2172. interface IClusCfgClusterInfo : IUnknown
  2173. {
  2174. //
  2175. // CommitChanges Mode
  2176. //
  2177. //////////////////////////////////////////////////////////////////////////
  2178. //
  2179. // STDMETHOD
  2180. // SetCommitMode(
  2181. // [ in ] ECommitMode ecmNewModeIn
  2182. // )
  2183. //
  2184. // Description:
  2185. // Sets the CommitChanges processing to be the new mode that
  2186. /// is passed in.
  2187. //
  2188. // Parameter:
  2189. // eccbNewModeIn
  2190. // The new mode to set the CommitChanges processing to.
  2191. //
  2192. // Return Values:
  2193. // S_OK
  2194. // Call succeed.
  2195. //
  2196. // other HRESULT
  2197. // The call failed.
  2198. //
  2199. //////////////////////////////////////////////////////////////////////////
  2200. HRESULT
  2201. SetCommitMode( [ in ] ECommitMode ecmNewModeIn );
  2202. //////////////////////////////////////////////////////////////////////////
  2203. //
  2204. // STDMETHOD
  2205. // GetCommitMode(
  2206. // [ out ] ECommitMode * pecmCurrentModeOut
  2207. // )
  2208. //
  2209. // Description:
  2210. // Call this to determine the operation that will be done when
  2211. // CommitChanges is invoked.
  2212. //
  2213. // Parameter:
  2214. // pecmCurrentModeOut
  2215. // The current mode for CommitChanges processing.
  2216. //
  2217. // Return Values:
  2218. // S_OK
  2219. // Call succeeded.
  2220. //
  2221. // other HRESULT
  2222. // The call failed.
  2223. //
  2224. //////////////////////////////////////////////////////////////////////////
  2225. HRESULT
  2226. GetCommitMode( [ out ] ECommitMode * pecmCurrentModeOut );
  2227. //
  2228. // Cluster Name
  2229. //
  2230. //////////////////////////////////////////////////////////////////////////
  2231. //
  2232. // STDMETHOD
  2233. // GetName(
  2234. // [ out ] BSTR * pbstrNameOut
  2235. // )
  2236. //
  2237. // Description:
  2238. // Retrieves the name of the cluster to be formed or joined.
  2239. //
  2240. // Notes:
  2241. // Name (Fully Qualified Domiain Name) e.g. cluster1.ntdev.microsoft.com
  2242. //
  2243. // In Forming the cluster, this is the resulting cluster name.
  2244. // In Joining the cluster, this is the sponsers cluster name.
  2245. //
  2246. // Parameter:
  2247. // pbstrNameOut
  2248. // Pointer to cluster name. This should be freed by the caller by calling
  2249. // SysFreeString( ).
  2250. //
  2251. // Return Values:
  2252. // S_OK
  2253. // Success.
  2254. //
  2255. // E_OUTOFMEMORY
  2256. // Out of memory.
  2257. //
  2258. // other HRESULT
  2259. // The call failed.
  2260. //
  2261. //////////////////////////////////////////////////////////////////////////
  2262. HRESULT
  2263. GetName( [ out ] BSTR * pbstrNameOut );
  2264. //////////////////////////////////////////////////////////////////////////
  2265. //
  2266. // STDMETHOD
  2267. // SetName(
  2268. // [ in ] LPCWSTR pcszNameIn
  2269. // )
  2270. //
  2271. // Description:
  2272. // Stores a new name for the cluster to be set when the cluster
  2273. // configuration is commited. If the node is joining, then this will
  2274. /// will be the cluster to be joined.
  2275. //
  2276. // Notes:
  2277. // Name (Fully Qualified Domiain Name) e.g. cluster1.ntdev.microsoft.com
  2278. //
  2279. // In Forming the cluster, this is the resulting cluster name.
  2280. // In Joining the cluster, this is the sponsers cluster name.
  2281. //
  2282. // Parameter:
  2283. // pcszNameIn
  2284. // The name of the user wants to assign to the cluster.
  2285. //
  2286. // Return Value:
  2287. // S_OK
  2288. // Success.
  2289. //
  2290. // E_OUTOFMEMORY
  2291. // Out of memory.
  2292. //
  2293. // other HRESULT
  2294. // The call failed.
  2295. //
  2296. //////////////////////////////////////////////////////////////////////////
  2297. HRESULT
  2298. SetName( [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn );
  2299. //
  2300. // Cluster IP Address
  2301. //
  2302. //////////////////////////////////////////////////////////////////////////
  2303. //
  2304. // STDMETHOD
  2305. // GetIPAddress(
  2306. // [ out ] ULONG * pulDottedQuadOut
  2307. // )
  2308. //
  2309. // Description:
  2310. // Retrieves the IP address of the cluster.
  2311. //
  2312. // Parameter:
  2313. // pulDottedQuadOut
  2314. // The IP address of the cluster in dotted quad format.
  2315. //
  2316. // Return Value:
  2317. // S_OK
  2318. // The call succeeded.
  2319. //
  2320. // other HRESULTs
  2321. // The call failed.
  2322. //
  2323. //////////////////////////////////////////////////////////////////////////
  2324. HRESULT
  2325. GetIPAddress( [ out ] ULONG * pulDottedQuadOut );
  2326. //////////////////////////////////////////////////////////////////////////
  2327. //
  2328. // STDMETHOD
  2329. // SetIPAddress(
  2330. // [ in ] ULONG ulDottedQuadIn
  2331. // )
  2332. //
  2333. // Description:
  2334. // Stores the IP address to be used to form the cluster. If joining,
  2335. // this is the IP address of the sponsor.
  2336. //
  2337. // Parameter:
  2338. // ulDottedQuadIn
  2339. // IP address in dotted quad format.
  2340. //
  2341. // Return Value:
  2342. // S_OK
  2343. // The call succeeded.
  2344. //
  2345. // other HRESULT
  2346. // The call failed.
  2347. //
  2348. //////////////////////////////////////////////////////////////////////////
  2349. HRESULT
  2350. SetIPAddress( [ in ] ULONG ulDottedQuadIn );
  2351. //
  2352. // Cluster Subnet Mask
  2353. //
  2354. //////////////////////////////////////////////////////////////////////////
  2355. //
  2356. // STDMETHOD
  2357. // GetSubnetMask(
  2358. // [ out ] ULONG * pulDottedQuadOut
  2359. // )
  2360. //
  2361. // Description:
  2362. // Retrieves the subnet mask to be used for the cluster.
  2363. //
  2364. // Parameter:
  2365. // pulDottedQuadOut
  2366. // Subnet mask of the cluster in dotted quad format.
  2367. //
  2368. // Return Values:
  2369. // S_OK
  2370. // The call succeeded.
  2371. //
  2372. // other HRESULTs
  2373. // The call failed.
  2374. //
  2375. //////////////////////////////////////////////////////////////////////////
  2376. HRESULT
  2377. GetSubnetMask( [ out ] ULONG * pulDottedQuadOut );
  2378. //////////////////////////////////////////////////////////////////////////
  2379. //
  2380. // STDMETHOD
  2381. // SetSubnetMask(
  2382. // [ in ] ULONG ulDottedQuadIn
  2383. // )
  2384. //
  2385. // Description:
  2386. // Stores the subnet mask to be used to form the cluster. If joining,
  2387. // this is the subnet mask of the sponsor.
  2388. //
  2389. // Parameter:
  2390. // ulDottedQuadIn
  2391. // Subnet mask in dotted quad format.
  2392. //
  2393. // Return Values:
  2394. // S_OK
  2395. // The call succeeded.
  2396. //
  2397. // other HRESULTs
  2398. // The call failed.
  2399. //
  2400. //////////////////////////////////////////////////////////////////////////
  2401. HRESULT
  2402. SetSubnetMask( [ in ] ULONG ulDottedQuadIn );
  2403. //////////////////////////////////////////////////////////////////////////
  2404. //
  2405. // STDMETHOD
  2406. // GetNetworkInfo(
  2407. // [ out ] IClusCfgNetworkInfo ** ppiccniOut
  2408. // )
  2409. //
  2410. // Description:
  2411. // Retrieves the network to be used for the cluster IP address
  2412. // and name.
  2413. //
  2414. // Parameter:
  2415. // ppiccniOut
  2416. // Pointer of the network to use for the cluster IP address
  2417. // and name.
  2418. //
  2419. // Return Values:
  2420. // S_OK
  2421. // The call succeeded.
  2422. //
  2423. // other HRESULTs
  2424. // The call failed.
  2425. //
  2426. //////////////////////////////////////////////////////////////////////////
  2427. HRESULT
  2428. GetNetworkInfo( [ out ] IClusCfgNetworkInfo ** ppiccniOut );
  2429. //////////////////////////////////////////////////////////////////////////
  2430. //
  2431. // STDMETHOD
  2432. // SetNetworkInfo(
  2433. // [ in ] IClusCfgNetworkInfo * piccniIn
  2434. // )
  2435. //
  2436. // Description:
  2437. // Stores the network to be used for the cluster IP address and name.
  2438. //
  2439. // Parameter:
  2440. // piccniIn
  2441. // Pointer to the network to use for the cluster IP address
  2442. // and name.
  2443. //
  2444. // Return Values:
  2445. // S_OK
  2446. // The call succeeded.
  2447. //
  2448. // other HRESULTs
  2449. // The call failed.
  2450. //
  2451. //////////////////////////////////////////////////////////////////////////
  2452. HRESULT
  2453. SetNetworkInfo( [ in ] IClusCfgNetworkInfo * piccniIn );
  2454. //
  2455. // Cluster Service Account
  2456. //
  2457. //////////////////////////////////////////////////////////////////////////
  2458. //
  2459. // STDMETHOD
  2460. // GetClusterServiceAccountCredentials(
  2461. // [ out ] IClusCfgCredentials ** ppicccCredentialsOut
  2462. // )
  2463. //
  2464. // Description:
  2465. // Retrieves the cluster service account credentials used by the
  2466. // cluster for authenication. The password is not available from the
  2467. // sponsor node and must be supplied by the user. Once supplied, it can
  2468. // be retrieved by calling this method.
  2469. //
  2470. // Parameters:
  2471. // ppicccCredentialsOut
  2472. // An IClusCfgCredentials * that contains the cluster
  2473. // service account credentials.
  2474. //
  2475. // Return Values:
  2476. // S_OK
  2477. // The called succeeded.
  2478. //
  2479. // E_OUTOFMEMORY
  2480. // Out of memory.
  2481. //
  2482. // other HRESULTs
  2483. // The call failed.
  2484. //
  2485. //////////////////////////////////////////////////////////////////////////
  2486. HRESULT
  2487. GetClusterServiceAccountCredentials(
  2488. [ out ] IClusCfgCredentials ** ppicccCredentialsOut
  2489. );
  2490. //
  2491. // Cluster Binding String
  2492. //
  2493. //////////////////////////////////////////////////////////////////////////
  2494. //
  2495. // STDMETHOD
  2496. // GetBindingString(
  2497. // [ out ] BSTR * pbstrBindingStringOut
  2498. // )
  2499. //
  2500. // Description:
  2501. // Retrieves the binding string (IP address) of the cluster to be
  2502. // formed or joined.
  2503. //
  2504. // Notes:
  2505. //
  2506. // Parameter:
  2507. // pbstrBindingStringOut
  2508. // Pointer to a BSTR. This should be freed by the caller by
  2509. // calling SysFreeString( ).
  2510. //
  2511. // Return Values:
  2512. // S_OK
  2513. // Success.
  2514. //
  2515. // E_OUTOFMEMORY
  2516. // Out of memory.
  2517. //
  2518. // other HRESULT
  2519. // The call failed.
  2520. //
  2521. //////////////////////////////////////////////////////////////////////////
  2522. HRESULT
  2523. GetBindingString( [ out ] BSTR * pbstrBindingStringOut );
  2524. //////////////////////////////////////////////////////////////////////////
  2525. //
  2526. // STDMETHOD
  2527. // SetBindingString(
  2528. // [ in ] LPCWSTR pcszBindingStringIn
  2529. // )
  2530. //
  2531. // Description:
  2532. // Stores the binding string for the cluster.
  2533. //
  2534. // Notes:
  2535. //
  2536. // Parameter:
  2537. // pcszBindingStringIn
  2538. // The binding string to use when connecting to this cluster.
  2539. //
  2540. // Return Value:
  2541. // S_OK
  2542. // Success.
  2543. //
  2544. // E_OUTOFMEMORY
  2545. // Out of memory.
  2546. //
  2547. // other HRESULT
  2548. // The call failed.
  2549. //
  2550. //////////////////////////////////////////////////////////////////////////
  2551. HRESULT
  2552. SetBindingString(
  2553. [ in, pointer_default( unique ) ] LPCWSTR pcszBindingStringIn
  2554. );
  2555. //////////////////////////////////////////////////////////////////////////
  2556. //
  2557. // STDMETHOD
  2558. // GetMaxNodeCount(
  2559. // [ out ] DWORD * pcMaxNodesOut
  2560. // )
  2561. //
  2562. // Description:
  2563. // Returns the maximun number of nodes supported in this cluster.
  2564. //
  2565. // Notes:
  2566. //
  2567. // Parameter:
  2568. // pcMaxNodesOut
  2569. // The maximum number of nodes allowed in this cluster.
  2570. //
  2571. // Return Value:
  2572. // S_OK
  2573. // Success.
  2574. //
  2575. // other HRESULT
  2576. // The call failed.
  2577. //
  2578. //////////////////////////////////////////////////////////////////////////
  2579. HRESULT
  2580. GetMaxNodeCount(
  2581. [ out ] DWORD * pcMaxNodesOut
  2582. );
  2583. }; //*** interface IClusCfgClusterInfo
  2584. //****************************************************************************
  2585. //++
  2586. //
  2587. // interface IClusCfgInitialize
  2588. //
  2589. // Description:
  2590. // This interface is used to initialize a configuration object.
  2591. //
  2592. //--
  2593. //****************************************************************************
  2594. [
  2595. object,
  2596. uuid( 2A0EB82D-F878-492a-951E-AE000918C4A6 ),
  2597. async_uuid( 2A0EB82E-F878-492a-951E-AE000918C4A6 ),
  2598. pointer_default( unique )
  2599. ]
  2600. interface IClusCfgInitialize : IUnknown
  2601. {
  2602. //////////////////////////////////////////////////////////////////////////
  2603. //
  2604. // STDMETHOD
  2605. // Initialize(
  2606. // [ in ] IUnknown * punkCallbackIn,
  2607. // [ in ] LCID lcidIn
  2608. // )
  2609. //
  2610. // Description:
  2611. // Register callbacks, locale id, etc.
  2612. //
  2613. // Parameters:
  2614. // punkCallbackIn
  2615. // The callback interface.
  2616. //
  2617. // lcidIn
  2618. // The locale ID to be used for strings that are passed.
  2619. //
  2620. // Return Values:
  2621. // S_OK
  2622. // The initialization succeeded.
  2623. //
  2624. // other HRESULTs
  2625. // The call failed.
  2626. //
  2627. //////////////////////////////////////////////////////////////////////////
  2628. HRESULT
  2629. Initialize(
  2630. [ in ] IUnknown * punkCallbackIn,
  2631. [ in ] LCID lcidIn
  2632. );
  2633. }; //*** interface IClusCfgInitialize
  2634. //****************************************************************************
  2635. //++
  2636. //
  2637. // interface IClusCfgCallback
  2638. //
  2639. // Description:
  2640. // This interface is used to callback to the client to indicate
  2641. // status or progess (or both) about a task being completed on the
  2642. // server.
  2643. //
  2644. //--
  2645. //****************************************************************************
  2646. [
  2647. object,
  2648. uuid( 238DCA63-E2EF-4f32-A24D-ACBF975BE842 ),
  2649. async_uuid( EBCE8945-AC69-4b3a-865D-E2D4EB33E41B ),
  2650. pointer_default( unique )
  2651. ]
  2652. interface IClusCfgCallback : IUnknown
  2653. {
  2654. //////////////////////////////////////////////////////////////////////////
  2655. //
  2656. // STDMETHOD
  2657. // SendStatusReport(
  2658. // [ in ] LPCWSTR pcszNodeNameIn,
  2659. // [ in ] CLSID clsidTaskMajorIn
  2660. // [ in ] CLSID clsidTaskMinorIn,
  2661. // [ in ] ULONG ulMinIn,
  2662. // [ in ] ULONG ulMaxIn,
  2663. // [ in ] ULONG ulCurrentIn,
  2664. // [ in ] HRESULT hrStatusIn,
  2665. // [ in ] LPCWSTR pcszDescriptionIn,
  2666. // [ in ] FILETIME * pftTimeIn,
  2667. // [ in ] LPCWSTR pcszReferenceIn
  2668. // )
  2669. //
  2670. // Description:
  2671. // Send a status report back to the user interface/script.
  2672. //
  2673. // Parameters:
  2674. // pcszNodeNameIn
  2675. // The name of the node (server) that sent the report.
  2676. //
  2677. // clsidTaskMajorIn
  2678. // CLSID of the major task item to give status about. For the
  2679. // wizard, this indicates which node in the tree view control
  2680. // to publish this status message under. If clsidTaskMajorIn
  2681. // equals TASKID_Major_Client_Log, TASKID_Major_Server_Log, or
  2682. // TASKID_Major_Client_And_Server_Log, only a log entry will be
  2683. // made.
  2684. //
  2685. // clsidTaskMinorIn
  2686. // CLSID of the minor task to give status about. These should be
  2687. // unique to each sub-task and message.
  2688. //
  2689. // ulMinIn
  2690. // The min value of progress.
  2691. //
  2692. // ulMaxIn
  2693. // The max value of progress.
  2694. //
  2695. // ulCurrentIn
  2696. // The current value of progress.
  2697. //
  2698. // hrStatusIn
  2699. // The current status.
  2700. //
  2701. // pcszDescriptionIn
  2702. // The description of the status. Can be NULL to indicate that nothing
  2703. // needs to be passed.
  2704. //
  2705. // pftTimeIn
  2706. // UTC time of when this event was generated.
  2707. //
  2708. // pcszReference
  2709. // Optional reference data, additional context, URL, etc. that
  2710. // might better help explain the problem is this is an error
  2711. // report.
  2712. //
  2713. // Return Values:
  2714. // S_OK
  2715. // The call succeeded.
  2716. //
  2717. // other HRESULTs
  2718. // The call failed.
  2719. //
  2720. //////////////////////////////////////////////////////////////////////////
  2721. HRESULT
  2722. SendStatusReport(
  2723. [ in, pointer_default( unique ) ] LPCWSTR pcszNodeNameIn,
  2724. [ in ] CLSID clsidTaskMajorIn,
  2725. [ in ] CLSID clsidTaskMinorIn,
  2726. [ in ] ULONG ulMinIn,
  2727. [ in ] ULONG ulMaxIn,
  2728. [ in ] ULONG ulCurrentIn,
  2729. [ in ] HRESULT hrStatusIn,
  2730. [ in, pointer_default( unique ) ] LPCWSTR pcszDescriptionIn,
  2731. [ in ] FILETIME * pftTimeIn,
  2732. [ in, pointer_default( unique ) ] LPCWSTR pcszReferenceIn
  2733. );
  2734. }; //*** interface IClusCfgCallback
  2735. //****************************************************************************
  2736. //++
  2737. //
  2738. // interface IClusCfgCredentials
  2739. //
  2740. // Description:
  2741. // The IClusCfgCredentials interface provides the functions
  2742. // for getting and setting user credentials.
  2743. //
  2744. //--
  2745. //****************************************************************************
  2746. [
  2747. object,
  2748. uuid( 54AA9406-A409-4b49-B314-5F0A0CE4C88E ),
  2749. async_uuid( 54AA9406-A409-4b49-B314-5F0A0CE4C88F ),
  2750. pointer_default( unique )
  2751. ]
  2752. interface IClusCfgCredentials : IUnknown
  2753. {
  2754. //////////////////////////////////////////////////////////////////////////
  2755. //
  2756. // STDMETHOD
  2757. // SetCredentials(
  2758. // [ in ] LPCWSTR pcszUserIn,
  2759. // [ in ] LPCWSTR pcszDomainIn,
  2760. // [ in ] LPCWSTR pcszPasswordIn
  2761. // )
  2762. //
  2763. // Description:
  2764. // Set the credentials.
  2765. //
  2766. // Parameters:
  2767. // pcszUserIn
  2768. // The user name.
  2769. //
  2770. // pcszDomainIn
  2771. // The domain name.
  2772. //
  2773. // pcszPasswordIn
  2774. // The user's password.
  2775. //
  2776. // Return Values:
  2777. // S_OK
  2778. // The call succeeded.
  2779. //
  2780. // other HRESULTs
  2781. // The call failed.
  2782. //
  2783. //////////////////////////////////////////////////////////////////////////
  2784. HRESULT
  2785. SetCredentials(
  2786. [ in, pointer_default( unique ) ] LPCWSTR pcszUserIn
  2787. , [ in, pointer_default( unique ) ] LPCWSTR pcszDomainIn
  2788. , [ in, pointer_default( unique ) ] LPCWSTR pcszPasswordIn
  2789. );
  2790. //////////////////////////////////////////////////////////////////////////
  2791. //
  2792. // STDMETHOD
  2793. // GetCredentials(
  2794. // [ out ] BSTR * pbstrUserOut,
  2795. // [ out ] BSTR * pbstrDomainOut,
  2796. // [ out ] BSTR * pbstrPasswordOut
  2797. // )
  2798. //
  2799. // Description:
  2800. // Get the credentials.
  2801. //
  2802. // Parameters:
  2803. // pbstrUserOut
  2804. // Catches the user name.
  2805. //
  2806. // pbstrDomainOut
  2807. // Catches the domain name.
  2808. //
  2809. // pbstrPasswordOut
  2810. // Catches the user's password.
  2811. //
  2812. // Return Values:
  2813. // S_OK
  2814. // The call succeeded.
  2815. //
  2816. // other HRESULTs
  2817. // The call failed.
  2818. //
  2819. //////////////////////////////////////////////////////////////////////////
  2820. HRESULT
  2821. GetCredentials(
  2822. [ out ] BSTR * pbstrUserOut
  2823. , [ out ] BSTR * pbstrDomainOut
  2824. , [ out ] BSTR * pbstrPasswordOut
  2825. );
  2826. //////////////////////////////////////////////////////////////////////////
  2827. //
  2828. // STDMETHOD
  2829. // GetIdentity(
  2830. // [ out ] BSTR * pbstrUserOut,
  2831. // [ out ] BSTR * pbstrDomainOut
  2832. // )
  2833. //
  2834. // Description:
  2835. // Get the credentials.
  2836. //
  2837. // Parameters:
  2838. // pbstrUserOut
  2839. // Catches the user name.
  2840. //
  2841. // pbstrDomainOut
  2842. // Catches the domain name.
  2843. //
  2844. // Return Values:
  2845. // S_OK
  2846. // The call succeeded.
  2847. //
  2848. // other HRESULTs
  2849. // The call failed.
  2850. //
  2851. //////////////////////////////////////////////////////////////////////////
  2852. HRESULT
  2853. GetIdentity(
  2854. [ out ] BSTR * pbstrUserOut
  2855. , [ out ] BSTR * pbstrDomainOut
  2856. );
  2857. //////////////////////////////////////////////////////////////////////////
  2858. //
  2859. // STDMETHOD
  2860. // GetPassword( [ out ] BSTR * pbstrPasswordOut )
  2861. //
  2862. // Description:
  2863. // Get the credentials.
  2864. //
  2865. // Parameters:
  2866. //
  2867. // pbstrPasswordOut
  2868. // Catches the user's password.
  2869. //
  2870. // Return Values:
  2871. // S_OK
  2872. // The call succeeded.
  2873. //
  2874. // other HRESULTs
  2875. // The call failed.
  2876. //
  2877. //////////////////////////////////////////////////////////////////////////
  2878. HRESULT
  2879. GetPassword( [ out ] BSTR * pbstrPasswordOut );
  2880. //////////////////////////////////////////////////////////////////////////
  2881. //
  2882. // STDMETHOD
  2883. // AssignTo(
  2884. // [ in ] IClusCfgCredentials * picccDestIn
  2885. // )
  2886. //
  2887. // Description:
  2888. // Write contents to another instance.
  2889. //
  2890. // Parameters:
  2891. // picccDestIn
  2892. // Instance that receives contents.
  2893. //
  2894. // Return Values:
  2895. // S_OK
  2896. // The call succeeded.
  2897. //
  2898. // other HRESULTs
  2899. // The call failed.
  2900. //
  2901. //////////////////////////////////////////////////////////////////////////
  2902. HRESULT
  2903. AssignTo(
  2904. [ in ] IClusCfgCredentials * picccDestIn
  2905. );
  2906. //////////////////////////////////////////////////////////////////////////
  2907. //
  2908. // STDMETHOD
  2909. // AssignFrom(
  2910. // [ in ] IClusCfgCredentials * picccSourceIn
  2911. // )
  2912. //
  2913. // Description:
  2914. // Overwrite contents with those from another instance.
  2915. //
  2916. // Parameters:
  2917. // picccSourceIn
  2918. // Instance from which to overwrite contents.
  2919. //
  2920. // Return Values:
  2921. // S_OK
  2922. // The call succeeded.
  2923. //
  2924. // other HRESULTs
  2925. // The call failed.
  2926. //
  2927. //////////////////////////////////////////////////////////////////////////
  2928. HRESULT
  2929. AssignFrom(
  2930. [ in ] IClusCfgCredentials * picccSourceIn
  2931. );
  2932. }; //*** interface IClusCfgCredentials
  2933. //****************************************************************************
  2934. //++
  2935. //
  2936. // interface IClusCfgCapabilities
  2937. //
  2938. // Description:
  2939. // The IClusCfgCapabilities interface provides the functions
  2940. // for determining the capabilities of a node.
  2941. //
  2942. //--
  2943. //****************************************************************************
  2944. [
  2945. object,
  2946. uuid( D94AB253-36C7-41c1-B52E-26B451975C8D ),
  2947. pointer_default( unique )
  2948. ]
  2949. interface IClusCfgCapabilities : IUnknown
  2950. {
  2951. //////////////////////////////////////////////////////////////////////////
  2952. //
  2953. // STDMETHOD
  2954. // CanNodeBeClustered( void )
  2955. //
  2956. // Description:
  2957. // Determines if a node can be clustered.
  2958. //
  2959. // Parameters:
  2960. // None.
  2961. //
  2962. // Return Values:
  2963. // S_OK
  2964. // The call succeeded. The node can be clustered.
  2965. //
  2966. // S_FALSE
  2967. // The call succeeded. The node can not be clustered.
  2968. //
  2969. // E_NOTIMPL
  2970. // The call failed. This is treated as a "don't care."
  2971. //
  2972. // other HRESULTs
  2973. // The call failed.
  2974. //
  2975. //////////////////////////////////////////////////////////////////////////
  2976. HRESULT
  2977. CanNodeBeClustered( void );
  2978. }; //*** interface IClusCfgCapabilities
  2979. //****************************************************************************
  2980. //++
  2981. //
  2982. // interface IClusCfgManagedResourceCfg
  2983. //
  2984. //--
  2985. //****************************************************************************
  2986. [
  2987. object,
  2988. uuid( 60300A0F-77E1-440c-BD94-6BFB0DBFDB3A ),
  2989. local,
  2990. pointer_default( unique )
  2991. ]
  2992. interface IClusCfgManagedResourceCfg : IUnknown
  2993. {
  2994. //////////////////////////////////////////////////////////////////////////
  2995. //
  2996. // STDMETHOD
  2997. // IClusCfgManagedResourceCfg::PreCreate(
  2998. // IUnknown * punkServicesIn
  2999. // )
  3000. //
  3001. // Description:
  3002. // This method is called by the post configuration manager to
  3003. // determine the requirements of the resource. Querying the
  3004. // punkServicesIn allows the managed resource to use services
  3005. // provided by the manager.
  3006. //
  3007. // Arguments:
  3008. // punkServicesIn
  3009. // The resource should QI this interface for services provided
  3010. // by the post configuration manager and to set its dependencies.
  3011. //
  3012. // Return Values:
  3013. // S_OK
  3014. // Success.
  3015. //
  3016. // other HRESULTs.
  3017. // The call failed.
  3018. //
  3019. //////////////////////////////////////////////////////////////////////////
  3020. HRESULT
  3021. PreCreate( [ in ] IUnknown * punkServicesIn );
  3022. //////////////////////////////////////////////////////////////////////////
  3023. //
  3024. // STDMETHOD
  3025. // IClusCfgManagedResourceCfg::Create(
  3026. // IUnknown * punkServicesIn
  3027. // )
  3028. //
  3029. // Description:
  3030. // This method is called by the post configuration manager to
  3031. // have the resource create an instance of itself. Querying the
  3032. // punkServicesIn allows the managed resource to use services
  3033. // provided by the manager.
  3034. //
  3035. // Arguments:
  3036. // punkServicesIn
  3037. // The resource should QI this interface for services provided
  3038. // by the post configuration manager and to create itself.
  3039. //
  3040. // Return Values:
  3041. // S_OK
  3042. // Success.
  3043. //
  3044. // other HRESULTs.
  3045. // The call failed.
  3046. //
  3047. //////////////////////////////////////////////////////////////////////////
  3048. HRESULT
  3049. Create( [ in ] IUnknown * punkServicesIn );
  3050. //////////////////////////////////////////////////////////////////////////
  3051. //
  3052. // STDMETHOD
  3053. // IClusCfgManagedResourceCfg::PostCreate(
  3054. // IUnknown * punkServicesIn
  3055. // )
  3056. //
  3057. // Description:
  3058. // This method is called by the post configuration manager to allow
  3059. // resources to perform any post-creation configuration that may be
  3060. // needed. At this point the cluster is fully configured. Querying
  3061. // the punkServicesIn allows the managed resource to use services
  3062. // provided by the manager.
  3063. //
  3064. // Arguments:
  3065. // punkServicesIn
  3066. // The resource should QI this interface for services provided
  3067. // by the post configuration manager.
  3068. //
  3069. // Return Values:
  3070. // S_OK
  3071. // Success.
  3072. //
  3073. // other HRESULTs.
  3074. // The call failed.
  3075. //
  3076. //////////////////////////////////////////////////////////////////////////
  3077. HRESULT
  3078. PostCreate( [ in ] IUnknown * punkServicesIn );
  3079. //////////////////////////////////////////////////////////////////////////
  3080. //
  3081. // STDMETHOD
  3082. // IClusCfgManagedResourceCfg::Evict(
  3083. // IUnknown * punkServicesIn
  3084. // )
  3085. //
  3086. // Description:
  3087. // This method is called by the post configuration manager to alert
  3088. // the resource that this node was evicted from the cluster. The
  3089. // resource should do whatever cleanup it needs to do revert to a
  3090. // non-clustered state. Querying the punkServicesIn allows the
  3091. // managed resource to uses services provided by the post
  3092. // configuration manager.
  3093. //
  3094. // Arguments:
  3095. // punkServicesIn
  3096. // The resource should QI this interface for services provided
  3097. // by the post configuration manager.
  3098. //
  3099. // Return Values:
  3100. // S_OK
  3101. // Success.
  3102. //
  3103. // other HRESULTs.
  3104. // The call failed. Errors are ignored and do not prevent a node
  3105. // from being evicted.
  3106. //
  3107. //////////////////////////////////////////////////////////////////////////
  3108. HRESULT
  3109. Evict( [ in ] IUnknown * punkServicesIn );
  3110. }; //*** interface IClusCfgManagedResourceCfg
  3111. //****************************************************************************
  3112. //++
  3113. //
  3114. // interface IClusCfgResourcePreCreate
  3115. //
  3116. //--
  3117. //****************************************************************************
  3118. [
  3119. object,
  3120. uuid( 4240F6A1-9D49-427e-8F3D-09384E1F59E4 ),
  3121. local,
  3122. pointer_default( unique )
  3123. ]
  3124. interface IClusCfgResourcePreCreate : IUnknown
  3125. {
  3126. //////////////////////////////////////////////////////////////////////////
  3127. //
  3128. // STDMETHOD
  3129. // IClusCfgResourcePreCreate::SetDependency(
  3130. // LPCLSID pclsidDepResTypeIn,
  3131. // EDependencyFlags dflagIn
  3132. // )
  3133. //
  3134. // Description:
  3135. // Informs the post configuration manager that a resource has a
  3136. // dependency on another type of resource and if the resource needs
  3137. // the resource for shared access or exclusive access.
  3138. //
  3139. // Arguments:
  3140. // pclsidDepResTypeIn
  3141. // The CLSID of the type of resource that a resource is
  3142. // requesting a dependency on. These are documented in the SDK
  3143. // or by the 3rd party resource.
  3144. //
  3145. // dfIn
  3146. // Flags to modify the dependency relationship. The following
  3147. // are defined flags:
  3148. //
  3149. // dfSHARED - the dependent resource can be shared.
  3150. // dfEXCLUSIVE - the dependent resource can not be shared.
  3151. //
  3152. // Return Value:
  3153. // S_OK
  3154. // Success.
  3155. //
  3156. // other HRESULTs.
  3157. // The call failed.
  3158. //
  3159. //////////////////////////////////////////////////////////////////////////
  3160. HRESULT
  3161. SetDependency(
  3162. [ in ] LPCLSID pclsidDepResTypeIn
  3163. , [ in ] DWORD dfIn
  3164. );
  3165. //////////////////////////////////////////////////////////////////////////
  3166. //
  3167. // STDMETHOD
  3168. // IClusCfgResourcePreCreate::SetType(
  3169. // CLSID * pclsidIn
  3170. // )
  3171. //
  3172. // Description:
  3173. // A managed resource MUST call this to indicate its resource type.
  3174. // Failure to call this during PreCreate will result in your
  3175. // resource not being created.
  3176. //
  3177. // Arguments:
  3178. // pclsidIn
  3179. // Pointer to the GUID of the resource type.
  3180. //
  3181. // Return Values:
  3182. // S_OK
  3183. // Success.
  3184. //
  3185. // other HRESULTs.
  3186. // The call failed.
  3187. //
  3188. //////////////////////////////////////////////////////////////////////////
  3189. HRESULT
  3190. SetType( [ in ] CLSID * pclsidIn );
  3191. //////////////////////////////////////////////////////////////////////////
  3192. //
  3193. // STDMETHOD
  3194. // IClusCfgResourcePreCreate::SetClassType(
  3195. // CLSID * pclsidIn
  3196. // )
  3197. //
  3198. // Description:
  3199. // A managed resource sets this to indicate that its resource type
  3200. // can be considered to be of a class of resource. You may call this
  3201. // multiple times to indicate all the classes you belong to.
  3202. //
  3203. // Arguments:
  3204. // pclsidIn
  3205. // Pointer to the GUID of the resource class type.
  3206. //
  3207. // Return Values:
  3208. // S_OK
  3209. // Success.
  3210. //
  3211. // other HRESULTs.
  3212. // The call failed.
  3213. //
  3214. //////////////////////////////////////////////////////////////////////////
  3215. HRESULT
  3216. SetClassType( [ in ] CLSID * pclsidIn );
  3217. }; //*** interface IClusCfgResourcePreCreate
  3218. //****************************************************************************
  3219. //++
  3220. //
  3221. // interface IClusCfgResourceCreate
  3222. //
  3223. //--
  3224. //****************************************************************************
  3225. [
  3226. object,
  3227. uuid( 0647B41A-C777-443c-9432-02CCCF4FF443 ),
  3228. local,
  3229. pointer_default( unique )
  3230. ]
  3231. interface IClusCfgResourceCreate : IUnknown
  3232. {
  3233. //////////////////////////////////////////////////////////////////////////
  3234. //
  3235. // STDMETHOD
  3236. // IClusCfgResourceCreate::SetPropertyBinary(
  3237. // [ in ] LPCWSTR pcszNameIn
  3238. // , [ in ] const DWORD cbSizeIn
  3239. // , [ in ] const BYTE * pbyteIn
  3240. // )
  3241. //
  3242. // Description:
  3243. //
  3244. // Arguments:
  3245. //
  3246. // Return Value:
  3247. // S_OK
  3248. // Success.
  3249. //
  3250. // other HRESULTs.
  3251. // The call failed.
  3252. //
  3253. //////////////////////////////////////////////////////////////////////////
  3254. HRESULT
  3255. SetPropertyBinary(
  3256. [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn
  3257. , [ in ] const DWORD cbSizeIn
  3258. , [ in ] const BYTE * pbyteIn
  3259. );
  3260. //////////////////////////////////////////////////////////////////////////
  3261. //
  3262. // STDMETHOD
  3263. // IClusCfgResourceCreate::SetPropertyDWORD(
  3264. // [ in ] LPCWSTR pcszNameIn
  3265. // , [ in ] const DWORD dwDWORDIn
  3266. // )
  3267. //
  3268. // Description:
  3269. //
  3270. // Arguments:
  3271. //
  3272. // Return Value:
  3273. // S_OK
  3274. // Success.
  3275. //
  3276. // other HRESULTs.
  3277. // The call failed.
  3278. //
  3279. //////////////////////////////////////////////////////////////////////////
  3280. HRESULT
  3281. SetPropertyDWORD(
  3282. [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn
  3283. , [ in ] const DWORD dwDWORDIn
  3284. );
  3285. //////////////////////////////////////////////////////////////////////////
  3286. //
  3287. // STDMETHOD
  3288. // IClusCfgResourceCreate::SetPropertyString(
  3289. // [ in ] LPCWSTR pcszNameIn
  3290. // , [ in ] LPCWSTR pcszStringIn
  3291. // )
  3292. //
  3293. // Description:
  3294. //
  3295. // Arguments:
  3296. //
  3297. // Return Value:
  3298. // S_OK
  3299. // Success.
  3300. //
  3301. // other HRESULTs.
  3302. // The call failed.
  3303. //
  3304. //////////////////////////////////////////////////////////////////////////
  3305. HRESULT
  3306. SetPropertyString(
  3307. [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn
  3308. , [ in, pointer_default( unique ) ] LPCWSTR pcszStringIn
  3309. );
  3310. //////////////////////////////////////////////////////////////////////////
  3311. //
  3312. // STDMETHOD
  3313. // IClusCfgResourceCreate::SetPropertyExpandString(
  3314. // [ in ] LPCWSTR pcszNameIn
  3315. // , [ in ] LPCWSTR pcszStringIn
  3316. // )
  3317. //
  3318. // Description:
  3319. //
  3320. // Arguments:
  3321. //
  3322. // Return Value:
  3323. // S_OK
  3324. // Success.
  3325. //
  3326. // other HRESULTs.
  3327. // The call failed.
  3328. //
  3329. //////////////////////////////////////////////////////////////////////////
  3330. HRESULT
  3331. SetPropertyExpandString(
  3332. [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn
  3333. , [ in, pointer_default( unique ) ] LPCWSTR pcszStringIn
  3334. );
  3335. //////////////////////////////////////////////////////////////////////////
  3336. //
  3337. // STDMETHOD
  3338. // IClusCfgResourceCreate::SetPropertyMultiString(
  3339. // [ in ] LPCWSTR pcszNameIn
  3340. // , [ in ] const DWORD cbMultiStringIn
  3341. // , [ in ] LPCWSTR pcszMultiStringIn
  3342. // )
  3343. //
  3344. // Description:
  3345. //
  3346. // Arguments:
  3347. //
  3348. // Return Value:
  3349. // S_OK
  3350. // Success.
  3351. //
  3352. // other HRESULTs.
  3353. // The call failed.
  3354. //
  3355. //////////////////////////////////////////////////////////////////////////
  3356. HRESULT
  3357. SetPropertyMultiString(
  3358. [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn
  3359. , [ in ] const DWORD cbMultiStringIn
  3360. , [ in, pointer_default( unique ) ] LPCWSTR pcszMultiStringIn
  3361. );
  3362. //////////////////////////////////////////////////////////////////////////
  3363. //
  3364. // STDMETHOD
  3365. // IClusCfgResourceCreate::SetPropertyUnsignedLargeInt(
  3366. // [ in ] LPCWSTR pcszNameIn
  3367. // , [ in ] const ULARGE_INTEGER ulIntIn
  3368. // )
  3369. //
  3370. // Description:
  3371. //
  3372. // Arguments:
  3373. //
  3374. // Return Value:
  3375. // S_OK
  3376. // Success.
  3377. //
  3378. // other HRESULTs.
  3379. // The call failed.
  3380. //
  3381. //////////////////////////////////////////////////////////////////////////
  3382. HRESULT
  3383. SetPropertyUnsignedLargeInt(
  3384. [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn
  3385. , [ in ] const ULARGE_INTEGER ulIntIn
  3386. );
  3387. //////////////////////////////////////////////////////////////////////////
  3388. //
  3389. // STDMETHOD
  3390. // IClusCfgResourceCreate::SetPropertyLong(
  3391. // [ in ] LPCWSTR pcszNameIn
  3392. // , [ in ] const LONG lLongIn
  3393. // )
  3394. //
  3395. // Description:
  3396. //
  3397. // Arguments:
  3398. //
  3399. // Return Value:
  3400. // S_OK
  3401. // Success.
  3402. //
  3403. // other HRESULTs.
  3404. // The call failed.
  3405. //
  3406. //////////////////////////////////////////////////////////////////////////
  3407. HRESULT
  3408. SetPropertyLong(
  3409. [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn
  3410. , [ in ] const LONG lLongIn
  3411. );
  3412. //////////////////////////////////////////////////////////////////////////
  3413. //
  3414. // STDMETHOD
  3415. // IClusCfgResourceCreate::SetPropertySecurityDescriptor(
  3416. // [ in ] LPCWSTR pcszNameIn
  3417. // , [ in ] const SECURITY_DESCRIPTOR * pcsdIn
  3418. // )
  3419. //
  3420. // Description:
  3421. //
  3422. // Arguments:
  3423. //
  3424. // Return Value:
  3425. // S_OK
  3426. // Success.
  3427. //
  3428. // other HRESULTs.
  3429. // The call failed.
  3430. //
  3431. //////////////////////////////////////////////////////////////////////////
  3432. HRESULT
  3433. SetPropertySecurityDescriptor(
  3434. [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn
  3435. , [ in ] const SECURITY_DESCRIPTOR * pcsdIn );
  3436. //////////////////////////////////////////////////////////////////////////
  3437. //
  3438. // STDMETHOD
  3439. // IClusCfgResourceCreate::SetPropertyLargeInt(
  3440. // [ in ] LPCWSTR pcszNameIn
  3441. // , [ in ] const LARGE_INTEGER lIntIn
  3442. // )
  3443. //
  3444. // Description:
  3445. //
  3446. // Arguments:
  3447. //
  3448. // Return Value:
  3449. // S_OK
  3450. // Success.
  3451. //
  3452. // other HRESULTs.
  3453. // The call failed.
  3454. //
  3455. //////////////////////////////////////////////////////////////////////////
  3456. HRESULT
  3457. SetPropertyLargeInt(
  3458. [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn
  3459. , [ in ] const LARGE_INTEGER lIntIn
  3460. );
  3461. //////////////////////////////////////////////////////////////////////////
  3462. //
  3463. // STDMETHOD
  3464. // IClusCfgResourceCreate::SendResourceControl(
  3465. // [ in ] DWORD dwControlCode
  3466. // , [ in ] LPVOID lpInBuffer
  3467. // , [ in ] DWORD cbInBufferSize
  3468. // )
  3469. //
  3470. // Description:
  3471. //
  3472. // Arguments:
  3473. //
  3474. // Return Value:
  3475. // S_OK
  3476. // Success.
  3477. //
  3478. // other HRESULTs.
  3479. // The call failed.
  3480. //
  3481. //////////////////////////////////////////////////////////////////////////
  3482. HRESULT
  3483. SendResourceControl(
  3484. [ in ] DWORD dwControlCodeIn
  3485. , [ in ] LPVOID lpBufferIn
  3486. , [ in ] DWORD cbBufferSizeIn
  3487. );
  3488. }; //*** interface IClusCfgResourceCreate
  3489. //****************************************************************************
  3490. //++
  3491. //
  3492. // interface IClusCfgResourcePostCreate
  3493. //
  3494. //--
  3495. //****************************************************************************
  3496. [
  3497. object,
  3498. uuid( 72A9BF54-13B6-451f-910D-6913EBF025AB ),
  3499. local,
  3500. pointer_default( unique )
  3501. ]
  3502. interface IClusCfgResourcePostCreate : IUnknown
  3503. {
  3504. //////////////////////////////////////////////////////////////////////////
  3505. //
  3506. // STDMETHOD
  3507. // IClusCfgResourcePostCreate::ChangeName(
  3508. // [ in ] LPCWSTR pcszNameIn
  3509. // )
  3510. //
  3511. // Description:
  3512. // Changes the name of the resource.
  3513. //
  3514. // Arguments:
  3515. // pcszNameIn
  3516. // The name to assign the group.
  3517. //
  3518. // Return Value:
  3519. // S_OK
  3520. // Success.
  3521. //
  3522. // other HRESULTs.
  3523. // The call failed.
  3524. //
  3525. //////////////////////////////////////////////////////////////////////////
  3526. HRESULT
  3527. ChangeName( [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn );
  3528. //////////////////////////////////////////////////////////////////////////
  3529. //
  3530. // STDMETHOD
  3531. // IClusCfgResourceCreate::SendResourceControl(
  3532. // [ in ] DWORD dwControlCode
  3533. // , [ in ] LPVOID lpInBuffer
  3534. // , [ in ] DWORD cbInBufferSize
  3535. // , [ in ] LPVOID lpOutBuffer
  3536. // , [ in ] DWORD cbOutBufferSize
  3537. // , [ out ] LPDWORD lpcbBytesReturned
  3538. // )
  3539. //
  3540. // Description:
  3541. //
  3542. // Arguments:
  3543. //
  3544. // Return Value:
  3545. // S_OK
  3546. // Success.
  3547. //
  3548. // other HRESULTs.
  3549. // The call failed.
  3550. //
  3551. //////////////////////////////////////////////////////////////////////////
  3552. HRESULT
  3553. SendResourceControl(
  3554. [ in ] DWORD dwControlCodeIn
  3555. , [ in ] LPVOID lpBufferIn
  3556. , [ in ] DWORD cbBufferSizeIn
  3557. , [ in ] LPVOID lBufferInout
  3558. , [ in ] DWORD cbOutBufferSizeIn
  3559. , [ out ] LPDWORD lpcbBytesReturnedOut
  3560. );
  3561. }; //*** interface IClusCfgResourcePostCreate
  3562. //****************************************************************************
  3563. //++
  3564. //
  3565. // interface IClusCfgGroupCfg
  3566. //
  3567. //--
  3568. //****************************************************************************
  3569. [
  3570. object,
  3571. uuid( DCB6D3D2-A55F-49e5-A64A-0CCFEB01ED3A ),
  3572. local,
  3573. pointer_default( unique )
  3574. ]
  3575. interface IClusCfgGroupCfg : IUnknown
  3576. {
  3577. //////////////////////////////////////////////////////////////////////////
  3578. //
  3579. // STDMETHOD
  3580. // IClusCfgGroupCfg::SetName(
  3581. // [ in ] LPCWSTR pcszNameIn
  3582. // )
  3583. //
  3584. // Description:
  3585. // Changes the name of the group in which the resource was created.
  3586. // Note that the last resource to set the name wins. The ordering
  3587. // of the last resource is the resource that doesn't have anything
  3588. // depending on it.
  3589. //
  3590. // Arguments:
  3591. // pcszNameIn
  3592. // The name to assign the group.
  3593. //
  3594. // Return Value:
  3595. // S_OK
  3596. // Success.
  3597. //
  3598. // other HRESULTs.
  3599. // The call failed.
  3600. //
  3601. //////////////////////////////////////////////////////////////////////////
  3602. HRESULT
  3603. SetName( [ in, pointer_default( unique ) ] LPCWSTR pcszNameIn );
  3604. //////////////////////////////////////////////////////////////////////////
  3605. //
  3606. // STDMETHOD
  3607. // IClusCfgGroupCfg::GetName(
  3608. // BSTR * pbstrNameOut
  3609. // )
  3610. //
  3611. // Description:
  3612. // Retrieves the name of the group in which the resource was created.
  3613. // Note that the last resource to set the name wins. The ordering
  3614. // of the last resource is the resource that doesn't have anything
  3615. // depending on it. Do not cache this value as the name may change
  3616. // after control has been returned to the manager.
  3617. //
  3618. // Arguments:
  3619. // pbstrNameOut
  3620. // The name to assign the group.
  3621. //
  3622. // Return Value:
  3623. // S_OK
  3624. // Success.
  3625. //
  3626. // HRESULT_FROM_WIN32( ERROR_MORE_DATA )
  3627. // The buffer size specified is too small.
  3628. //
  3629. // other HRESULTs.
  3630. // The call failed.
  3631. //
  3632. //////////////////////////////////////////////////////////////////////////
  3633. HRESULT
  3634. GetName( [ out ] BSTR * pbstrNameOut );
  3635. }; //*** interface IClusCfgGroupCfg
  3636. //****************************************************************************
  3637. //++
  3638. //
  3639. // interface IClusCfgMemberSetChangeListener
  3640. //
  3641. // Description:
  3642. // This interface is implemented by an component that wishes to be notified
  3643. // of when the local computer becomes part of a cluster or when it leaves
  3644. // a cluster - in other words, when the member set of a cluster changes
  3645. // as a result of a cluster configuration operation on the local computer.
  3646. //
  3647. //--
  3648. //****************************************************************************
  3649. [
  3650. object,
  3651. uuid( 2B64534F-2643-4ABC-A4E5-824D881B7582 ),
  3652. async_uuid( 2B645350-2643-4ABC-A4E5-824D881B7582 ),
  3653. pointer_default( unique )
  3654. ]
  3655. interface IClusCfgMemberSetChangeListener : IUnknown
  3656. {
  3657. //////////////////////////////////////////////////////////////////////////
  3658. //
  3659. // STDMETHOD
  3660. // IClusCfgMemberSetChangeListener::Notify(
  3661. // [ in ] IUnknown * punkClusterInfoIn
  3662. // )
  3663. //
  3664. // Description:
  3665. // This method is called to notify a component that this computer has
  3666. // either joined or left a cluster. During this call, a component typically
  3667. // performs operations that are required to switch it from the "clustered"
  3668. // to "non-clustered" mode or vice versa. For example, an application
  3669. // that implements this interface could use this function to create
  3670. // its resource type when the local computer joins a cluster.
  3671. //
  3672. // If the node has just become part of a cluster, the cluster
  3673. // service is guaranteed to be running when this method is called.
  3674. // Querying the punkClusterInfoIn allows the listener to get more
  3675. // information about the event that caused the listener to be notified.
  3676. //
  3677. // Arguments:
  3678. // punkClusterInfoIn
  3679. // The resource should QI this interface for services provided
  3680. // by the caller of this function. Typically, the component that
  3681. // this punk refers to also implements the IClusCfgClusterInfo
  3682. // interface.
  3683. //
  3684. // Return Values:
  3685. // S_OK
  3686. // Success.
  3687. //
  3688. // other HRESULTs.
  3689. // The call failed.
  3690. //
  3691. //////////////////////////////////////////////////////////////////////////
  3692. HRESULT
  3693. Notify( [ in ] IUnknown * punkClusterInfoIn );
  3694. }; //*** interface IClusCfgMemberSetChangeListener
  3695. //****************************************************************************
  3696. //++
  3697. //
  3698. // interface IClusCfgResourceTypeInfo
  3699. //
  3700. // Description:
  3701. // This interface is implemented by components that wish to configure
  3702. // ( create, delete, etc. ) resource types during cluster configuration
  3703. // ( cluster formation, node addition, node eviction, etc. ).
  3704. //
  3705. //--
  3706. //****************************************************************************
  3707. [
  3708. object,
  3709. uuid( C649A281-C847-4F5C-9841-D2F73B5AA71D ),
  3710. async_uuid( C649A282-C847-4F5C-9841-D2F73B5AA71D ),
  3711. pointer_default( unique )
  3712. ]
  3713. interface IClusCfgResourceTypeInfo : IUnknown
  3714. {
  3715. //////////////////////////////////////////////////////////////////////////
  3716. //
  3717. // STDMETHOD
  3718. // IClusCfgResourceTypeInfo::CommitChanges(
  3719. // [ in ] IUnknown * punkClusterInfoIn
  3720. // )
  3721. //
  3722. // Description:
  3723. // A component that wishes to participate in the configuration of
  3724. // cluster resource types should perform the configuration steps
  3725. // necessary for its resource type in this method.
  3726. //
  3727. // This method is called by the cluster configuration server when
  3728. // the local computer becomes part of a cluster. The cluster service
  3729. // is guaranteed to be running at this stage. This method is also
  3730. // called when the local computer is evicted from a cluster - the
  3731. // cluster service will not be running if this is the case.
  3732. //
  3733. // Typically, a component will create a resource type in this method
  3734. // during cluster formation and join and will perform any cleanup
  3735. // required during node evict.
  3736. //
  3737. // Arguments:
  3738. // punkClusterInfoIn
  3739. // The resource type should QI this interface for services provided
  3740. // by the caller of this function. Typically, the component that
  3741. // this punk refers to also implements the IClusCfgClusterInfo
  3742. // interface.
  3743. //
  3744. // punkResTypeServicesIn
  3745. // Pointer to the IUnknown interface of a component that provides
  3746. // methods that help configuring a resource type. For example,
  3747. // during a join or a form, this punk can be queried for the
  3748. // IClusCfgResourceTypeCreate interface, which provides methods
  3749. // for resource type creation.
  3750. //
  3751. // Return Values:
  3752. // S_OK
  3753. // Success.
  3754. //
  3755. // other HRESULTs.
  3756. // The call failed.
  3757. //
  3758. //////////////////////////////////////////////////////////////////////////
  3759. HRESULT
  3760. CommitChanges(
  3761. [ in ] IUnknown * punkClusterInfoIn,
  3762. [ in ] IUnknown * punkResTypeServicesIn
  3763. );
  3764. //////////////////////////////////////////////////////////////////////////
  3765. //
  3766. // STDMETHOD
  3767. // IClusCfgResourceTypeInfo::GetTypeName(
  3768. // [ out ] BSTR * pbstrTypeNameOut
  3769. // )
  3770. //
  3771. // Description:
  3772. // Get the resource type name of this resource type.
  3773. //
  3774. // Arguments:
  3775. // pbstrTypeNameOut
  3776. // Pointer to the BSTR that holds the name of the resource type.
  3777. // This BSTR has to be freed by the caller using the function
  3778. // SysFreeString().
  3779. //
  3780. // Return Values:
  3781. // S_OK
  3782. // The call succeeded.
  3783. //
  3784. // E_OUTOFMEMORY
  3785. // Out of memory.
  3786. //
  3787. // other HRESULTs
  3788. // The call failed.
  3789. //
  3790. //////////////////////////////////////////////////////////////////////////
  3791. HRESULT
  3792. GetTypeName( [ out ] BSTR * pbstrTypeNameOut );
  3793. //////////////////////////////////////////////////////////////////////////
  3794. //
  3795. // STDMETHOD
  3796. // IClusCfgResourceTypeInfo::GetTypeGUID(
  3797. // [ out ] GUID * pguidGUIDOut
  3798. // )
  3799. //
  3800. // Description:
  3801. // Get the globally unique identifier of this resource type.
  3802. //
  3803. // Arguments:
  3804. // pguidGUIDOut
  3805. // Pointer to the GUID object which will receive the GUID of this
  3806. // resource type.
  3807. //
  3808. // Return Values:
  3809. // S_OK
  3810. // The call succeeded and the *pguidGUIDOut contains the type GUID.
  3811. //
  3812. // S_FALSE
  3813. // The call succeeded but this resource type does not have a GUID.
  3814. // The value of *pguidGUIDOut is undefined after this call.
  3815. //
  3816. // other HRESULTs
  3817. // The call failed.
  3818. //
  3819. //////////////////////////////////////////////////////////////////////////
  3820. HRESULT
  3821. GetTypeGUID( [ out ] GUID * pguidGUIDOut );
  3822. }; //*** interface IClusCfgResourceTypeInfo
  3823. //****************************************************************************
  3824. //++
  3825. //
  3826. // interface IClusCfgResourceTypeCreate
  3827. //
  3828. // Description:
  3829. // This interface provides functions that help create a resource type
  3830. // during cluster configuration. A pointer to this interface is provided
  3831. // to components that participate in resource type configuration during
  3832. // cluster configuration.
  3833. //
  3834. //--
  3835. //****************************************************************************
  3836. [
  3837. object,
  3838. uuid( 3AFCE3B8-5F3E-4DDF-A8F4-4B4FCBF28F8F ),
  3839. async_uuid( 3AFCE3B9-5F3E-4DDF-A8F4-4B4FCBF28F8F ),
  3840. pointer_default( unique )
  3841. ]
  3842. interface IClusCfgResourceTypeCreate : IUnknown
  3843. {
  3844. //////////////////////////////////////////////////////////////////////////
  3845. //
  3846. // STDMETHOD
  3847. // IClusCfgResourceTypeCreate::Create(
  3848. // [in, string ] const WCHAR * pcszResTypeNameIn,
  3849. // [in, string ] const WCHAR * pcszResTypeDisplayNameIn,
  3850. // [in, string ] const WCHAR * pcszResDllNameIn,
  3851. // [in] DWORD dwLooksAliveIntervalIn,
  3852. // [in] DWORD dwIsAliveIntervalIn
  3853. // )
  3854. //
  3855. // Description:
  3856. // This method creates a cluster resource type.
  3857. //
  3858. // Arguments:
  3859. // pcszResTypeNameIn
  3860. // Name of the resource type
  3861. //
  3862. // pcszResTypeDisplayNameIn
  3863. // Display name of the resource type
  3864. //
  3865. // pcszResDllNameIn
  3866. // Name (with or without path information) of DLL of the resource type.
  3867. //
  3868. // dwLooksAliveIntervalIn
  3869. // Looks-alive interval for the resource type (in milliseconds).
  3870. //
  3871. // dwIsAliveIntervalIn
  3872. // Is-alive interval for the resource type (in milliseconds).
  3873. //
  3874. // Return Values:
  3875. // S_OK
  3876. // Success.
  3877. //
  3878. // other HRESULTs.
  3879. // The call failed.
  3880. //
  3881. //////////////////////////////////////////////////////////////////////////
  3882. HRESULT
  3883. Create(
  3884. [in, string ] const WCHAR * pcszResTypeNameIn,
  3885. [in, string ] const WCHAR * pcszResTypeDisplayNameIn,
  3886. [in, string ] const WCHAR * pcszResDllNameIn,
  3887. [in] DWORD dwLooksAliveIntervalIn,
  3888. [in] DWORD dwIsAliveIntervalIn
  3889. );
  3890. //////////////////////////////////////////////////////////////////////////
  3891. //
  3892. // STDMETHOD
  3893. // IClusCfgResourceTypeCreate::RegisterAdminExtensions(
  3894. // [in, string ] const WCHAR * pcszResDllNameIn,
  3895. // [in] ULONG cExtClsidCountIn,
  3896. // [in, size_is( cExtClsidCountIn ) ] const CLSID * rgclsidExtClsidsIn
  3897. // )
  3898. //
  3899. // Description:
  3900. // This method registers the cluster administrator extensions for
  3901. // a resource type.
  3902. //
  3903. // Arguments:
  3904. // pcszResTypeNameIn
  3905. // Name of the resource type against for the extensions are to be
  3906. // registered.
  3907. //
  3908. // cExtClsidCountIn
  3909. // Number of extension class ids in the next parameter.
  3910. //
  3911. // rgclsidExtClsidsIn
  3912. // Pointer to an array of class ids of cluster administrator extensions.
  3913. // This can be NULL if cExtClsidCountIn is 0.
  3914. //
  3915. //
  3916. // Return Values:
  3917. // S_OK
  3918. // Success.
  3919. //
  3920. // other HRESULTs.
  3921. // The call failed.
  3922. //
  3923. //////////////////////////////////////////////////////////////////////////
  3924. HRESULT
  3925. RegisterAdminExtensions(
  3926. [in, string ] const WCHAR * pcszResTypeNameIn,
  3927. [in] ULONG cExtClsidCountIn,
  3928. [in, size_is( cExtClsidCountIn ) ] const CLSID * rgclsidExtClsidsIn
  3929. );
  3930. }; //*** interface IClusCfgResourceTypeCreate
  3931. //****************************************************************************
  3932. //++
  3933. //
  3934. // interface IClusCfgEvictCleanup
  3935. //
  3936. // Description:
  3937. // This interface can be used to cleanup a node that has been evicted from
  3938. // a cluster.
  3939. //
  3940. //--
  3941. //****************************************************************************
  3942. [
  3943. object,
  3944. uuid( 6FE3E361-D373-4C5F-A0AF-1DFE8493C655 ),
  3945. async_uuid( 6FE3E362-D373-4C5F-A0AF-1DFE8493C655 ),
  3946. pointer_default( unique )
  3947. ]
  3948. interface
  3949. IClusCfgEvictCleanup : IUnknown
  3950. {
  3951. //////////////////////////////////////////////////////////////////////////
  3952. //
  3953. // STDMETHOD
  3954. // IClusCfgEvictCleanup::CleanupLocal( [ in ] DWORD dwDelayIn )
  3955. //
  3956. // Description:
  3957. // This method performs the clean up actions on the local node after
  3958. // it has been evicted from a cluster, so that the node can go back
  3959. // to its "pre-clustered" state.
  3960. //
  3961. // Arguments:
  3962. // DWORD dwDelayIn
  3963. // Number of milliseconds that this method will wait before starting
  3964. // cleanup. If some other process cleans up this node while this thread
  3965. // is waiting, the wait is terminated. If this value is zero, this method
  3966. // will attempt to clean up this node immediately.
  3967. //
  3968. // Return Values:
  3969. // S_OK
  3970. // Success.
  3971. //
  3972. // Other HRESULTs
  3973. // The call failed.
  3974. //
  3975. //////////////////////////////////////////////////////////////////////////
  3976. HRESULT
  3977. CleanupLocalNode( [ in ] DWORD dwDelayIn );
  3978. //////////////////////////////////////////////////////////////////////////
  3979. //
  3980. // STDMETHOD
  3981. // IClusCfgEvictCleanup::CleanupRemoteNode(
  3982. // const WCHAR * pcszEvicteeNodeNameIn
  3983. // , DWORD dwDelayIn
  3984. // )
  3985. //
  3986. // Description:
  3987. // This method performs the clean up actions on a remote node after
  3988. // it has been evicted from a cluster, so that the node can go back
  3989. // to its "pre-clustered" state.
  3990. //
  3991. // Arguments:
  3992. // const WCHAR * pcszEvictedNodeNameIn
  3993. // Name of the node that has just been evicted. This can be the
  3994. // NetBios name of the node, the fully qualified domain name or
  3995. // the node IP address.
  3996. //
  3997. // DWORD dwDelayIn
  3998. // Number of milliseconds that this method will wait before starting
  3999. // cleanup. If some other process cleans up this node while this thread
  4000. // is waiting, the wait is terminated. If this value is zero, this method
  4001. // will attempt to clean up this node immediately.
  4002. //
  4003. // Return Values:
  4004. // S_OK
  4005. // Success.
  4006. //
  4007. // Other HRESULTs
  4008. // The call failed.
  4009. //
  4010. //////////////////////////////////////////////////////////////////////////
  4011. HRESULT
  4012. CleanupRemoteNode(
  4013. [ in, string ] const WCHAR * pcszEvictedNodeNameIn
  4014. , [ in ] DWORD dwDelayIn
  4015. );
  4016. }; // interface IClusCfgEvictCleanup
  4017. //****************************************************************************
  4018. //++
  4019. //
  4020. // interface IClusCfgStartupListener
  4021. //
  4022. // Description:
  4023. // This interface is implemented by a component that wishes to be notified
  4024. // when the cluster service has started.
  4025. //
  4026. //--
  4027. //****************************************************************************
  4028. [
  4029. object,
  4030. uuid( D282CAEF-2EDE-4ab9-A5D5-F7BDE3D23F0F ),
  4031. async_uuid( D282CAF0-2EDE-4ab9-A5D5-F7BDE3D23F10 ),
  4032. pointer_default( unique )
  4033. ]
  4034. interface
  4035. IClusCfgStartupListener : IUnknown
  4036. {
  4037. //////////////////////////////////////////////////////////////////////////
  4038. //
  4039. // STDMETHOD
  4040. // IClusCfgStartupListener::Notify( [ in ] IUnknown * punkIn )
  4041. //
  4042. // Description:
  4043. // This method is called to inform a component that the cluster service
  4044. // has started on the local node.
  4045. //
  4046. // Arguments:
  4047. // IUnknown * punkIn
  4048. // The component that implements this Punk may also provide services
  4049. // that are useful to the implementor of this method. For example,
  4050. // this component usually implements the IClusCfgResourceTypeCreate
  4051. // interface.
  4052. //
  4053. // Return Values:
  4054. // S_OK
  4055. // Success.
  4056. //
  4057. // Other HRESULTs
  4058. // The call failed.
  4059. //
  4060. //////////////////////////////////////////////////////////////////////////
  4061. HRESULT
  4062. Notify( [ in ] IUnknown * punkIn );
  4063. }; // interface IClusCfgStartupListener
  4064. //****************************************************************************
  4065. //++
  4066. //
  4067. // interface IClusCfgStartupNotify
  4068. //
  4069. // Description:
  4070. // This interface is implemented by a component that the cluster service
  4071. // instantiates. When the cluster service calls the only method on this
  4072. // interface, this component will enumerate the startup listeners and
  4073. // inform them that the cluster service has started on the local node.
  4074. //
  4075. //--
  4076. //****************************************************************************
  4077. [
  4078. object,
  4079. uuid( C2B0D069-6353-4EE1-B253-6B0D75DB2CD3 ),
  4080. async_uuid( C2B0D06A-6353-4EE1-B253-6B0D75DB2CD3 ),
  4081. pointer_default( unique )
  4082. ]
  4083. interface
  4084. IClusCfgStartupNotify : IUnknown
  4085. {
  4086. //////////////////////////////////////////////////////////////////////////
  4087. //
  4088. // STDMETHOD
  4089. // IClusCfgStartupNotify::SendNotifications( void )
  4090. //
  4091. // Description:
  4092. // This method is called by the Cluster Service to inform the implementor
  4093. // of this interface to send out notification of cluster service startup
  4094. // to interested listeners. If this method is being called for the first
  4095. // time, the method waits till the post configuration steps are complete
  4096. // before sending out the notifications.
  4097. //
  4098. // Arguments:
  4099. // None.
  4100. //
  4101. // Return Values:
  4102. // S_OK
  4103. // Success.
  4104. //
  4105. // Other HRESULTs
  4106. // The call failed.
  4107. //
  4108. //////////////////////////////////////////////////////////////////////////
  4109. HRESULT
  4110. SendNotifications( void );
  4111. }; // interface IClusCfgStartupNotify
  4112. //****************************************************************************
  4113. //++
  4114. //
  4115. // interface IClusCfgManagedResourceData
  4116. //
  4117. // Description:
  4118. // This inteface allows instances of resources to get, set, and exchange
  4119. // data between instances of themselves on different nodes.
  4120. //
  4121. //--
  4122. //****************************************************************************
  4123. [
  4124. object,
  4125. uuid( 8447ECB7-2171-4e21-A108-0EB5B0B516DA ),
  4126. pointer_default( unique )
  4127. ]
  4128. interface IClusCfgManagedResourceData : IUnknown
  4129. {
  4130. //////////////////////////////////////////////////////////////////////////
  4131. //
  4132. // STDMETHOD
  4133. // IClusCfgManagedResourceData::GetResourcePrivateData(
  4134. // [ out ] BYTE * pbBufferOut
  4135. // , [ out ] DWORD * pcbBufferInout
  4136. // )
  4137. //
  4138. // Description:
  4139. // Get an already managed resource's private state data. This
  4140. // data will then be passed to the instances of that resource on all
  4141. // nodes that are being added to the cluster.
  4142. //
  4143. // Arguments:
  4144. // pbBufferOut
  4145. // Pointer to a buffer to contain the resource's private state data.
  4146. //
  4147. // pcbBufferInout
  4148. // On input it is the size of the buffer. On output it is the size
  4149. // of the data.
  4150. //
  4151. // Return Value:
  4152. // S_OK
  4153. // Success.
  4154. //
  4155. // ERROR_INSUFFICIENT_BUFFER as an HRESULT
  4156. // When the passed in buffer is too small to hold the data.
  4157. // pcbBufferOutIn will contain the size required.
  4158. //
  4159. // other HRESULTs.
  4160. // The call failed.
  4161. //
  4162. //////////////////////////////////////////////////////////////////////////
  4163. HRESULT
  4164. GetResourcePrivateData(
  4165. [ out, size_is( *pcbBufferInout ) ] BYTE * pbBufferOut
  4166. , [ in, out ] DWORD * pcbBufferInout
  4167. );
  4168. //////////////////////////////////////////////////////////////////////////
  4169. //
  4170. // STDMETHOD
  4171. // IClusCfgManagedResourceData::SetResourcePrivateData(
  4172. // [ in ] const BYTE * pcbBufferIn
  4173. // , [ in ] DWORD cbBufferIn
  4174. // )
  4175. //
  4176. // Description:
  4177. // Set the private resource data into this instance of a managed
  4178. // resource.
  4179. //
  4180. // Arguments:
  4181. // pcbBufferIn
  4182. // Pointer to a buffer containing the resource's private data.
  4183. //
  4184. // cbBufferIn
  4185. // The length in bytes of the data buffer.
  4186. //
  4187. // Return Values:
  4188. // S_OK
  4189. // Success.
  4190. //
  4191. // other HRESULTs.
  4192. // The call failed.
  4193. //
  4194. //////////////////////////////////////////////////////////////////////////
  4195. HRESULT
  4196. SetResourcePrivateData(
  4197. [ in
  4198. , pointer_default( unique )
  4199. , size_is( cbBufferIn )
  4200. ] const BYTE * pcbBufferIn
  4201. , [ in ] DWORD cbBufferIn
  4202. );
  4203. }; //*** interface IClusCfgManagedResourceData
  4204. //****************************************************************************
  4205. //++
  4206. //
  4207. // interface IClusCfgVerifyQuorum
  4208. //
  4209. // Description:
  4210. // Ensure that the quorum resource can be hosted on all nodes being added
  4211. // to the cluster.
  4212. //
  4213. // The IClusCfgManagedResourceData interface will be called just prior to
  4214. // any calls to the methods of this interface to allow the quorum resource
  4215. // to set all data needed for the quorum to be hosted on the nodes that
  4216. // are being added to the cluster.
  4217. //
  4218. //--
  4219. //****************************************************************************
  4220. [
  4221. object,
  4222. uuid( 90A2EFAE-1B62-4ada-BF1C-BECAB56F748D ),
  4223. pointer_default( unique )
  4224. ]
  4225. interface IClusCfgVerifyQuorum : IUnknown
  4226. {
  4227. //////////////////////////////////////////////////////////////////////////
  4228. //
  4229. // STDMETHOD
  4230. // IClusCfgVerifyQuorum::PrepareToHostQuorumResource(
  4231. // void
  4232. // )
  4233. //
  4234. // Description:
  4235. // This method is called when the implementing managed resource
  4236. // is the quorum resource. This gives the implementer a chance
  4237. // to do anything required to ensure that this node can
  4238. // indeed host the quorum resource.
  4239. //
  4240. // This method will be called after the SetResourcePrivateData()
  4241. // method of the IClusCfgManagedResourceData interface has been
  4242. // called. This allows the implementer to get the latest state data
  4243. // from a running instance of their resource.
  4244. //
  4245. // Arguments:
  4246. // None.
  4247. //
  4248. // Return Value:
  4249. // S_OK
  4250. // Success.
  4251. //
  4252. // other HRESULTs.
  4253. // The call failed.
  4254. //
  4255. //////////////////////////////////////////////////////////////////////////
  4256. HRESULT
  4257. PrepareToHostQuorumResource( void );
  4258. //////////////////////////////////////////////////////////////////////////
  4259. //
  4260. // STDMETHOD
  4261. // IClusCfgVerifyQuorum::Cleanup(
  4262. // EClusCfgCleanupReason cccrReasonIn
  4263. // )
  4264. //
  4265. // Description:
  4266. // This method is called when a cluster configuration task is
  4267. // shutting down. The reason for the shut down is passed in
  4268. // the cccrReasonIn parameter.
  4269. //
  4270. // It is expected that any lingering changes made in
  4271. // PrepareToHostQuorumResource() would be undone when the
  4272. // reason code in not a success code.
  4273. //
  4274. // Arguments:
  4275. // cccrReasonIn
  4276. // The reason that this method was called. See
  4277. // EClusCfgCleanupReason for the complete list of possbile
  4278. // reason codes.
  4279. //
  4280. // Return Values:
  4281. // S_OK
  4282. // Success.
  4283. //
  4284. // other HRESULTs.
  4285. // The call failed.
  4286. //
  4287. //////////////////////////////////////////////////////////////////////////
  4288. HRESULT
  4289. Cleanup( [ in ] EClusCfgCleanupReason cccrReasonIn );
  4290. //////////////////////////////////////////////////////////////////////////
  4291. //
  4292. // STDMETHOD
  4293. // IsMultiNodeCapable( void )
  4294. //
  4295. // Description:
  4296. // Call this to determine if this quorum capable resource allows
  4297. // other nodes to join the cluster and create a multi node cluster.
  4298. //
  4299. // Return Values:
  4300. // S_OK
  4301. // Call succeeded and the result is "TRUE."
  4302. //
  4303. // S_FALSE
  4304. // Call succeeded and the result is "FALSE."
  4305. //
  4306. // other HRESULT
  4307. // The call failed.
  4308. //
  4309. //////////////////////////////////////////////////////////////////////////
  4310. HRESULT
  4311. IsMultiNodeCapable( void );
  4312. //////////////////////////////////////////////////////////////////////////
  4313. //
  4314. // STDMETHOD
  4315. // SetMultiNodeCapable(
  4316. // [ in ] BOOL fMultiNodeCapableIn
  4317. // )
  4318. //
  4319. // Description:
  4320. // Call this to set this quorum resource as being multi node capable.
  4321. //
  4322. // Return Values:
  4323. // S_OK
  4324. // Call succeeded
  4325. //
  4326. // other HRESULT
  4327. // The call failed.
  4328. //
  4329. //////////////////////////////////////////////////////////////////////////
  4330. HRESULT
  4331. SetMultiNodeCapable( [ in ] BOOL fMultiNodeCapableIn );
  4332. }; //*** interface IClusCfgVerifyQuorum
  4333. //****************************************************************************
  4334. //++
  4335. //
  4336. // interface IClusCfgEvictListener
  4337. //
  4338. // Description:
  4339. // This interface is implemented by a component that wishes to be notified
  4340. // when the a node has been evicted from the cluster.
  4341. //
  4342. //--
  4343. //****************************************************************************
  4344. [
  4345. object,
  4346. uuid( E20DDEE3-DEFC-4d54-B1F7-2AEB784C3847 ),
  4347. async_uuid( 08609AC3-D284-4009-805F-17D3CFE4160B ),
  4348. pointer_default( unique )
  4349. ]
  4350. interface
  4351. IClusCfgEvictListener : IUnknown
  4352. {
  4353. //////////////////////////////////////////////////////////////////////////
  4354. //
  4355. // STDMETHOD
  4356. // IClusCfgEvictListener::EvictNotify(
  4357. // [ in ] LPCWSTR pcszNodeNameIn
  4358. // )
  4359. //
  4360. // Description:
  4361. // This method is called to inform a component that a node has been
  4362. // evicted from the cluster.
  4363. //
  4364. // Arguments:
  4365. // pcszNodeNameIn
  4366. // The name of the node that was evicted.
  4367. //
  4368. // Return Values:
  4369. // S_OK
  4370. // Success.
  4371. //
  4372. // Other HRESULTs
  4373. // The call failed.
  4374. //
  4375. //////////////////////////////////////////////////////////////////////////
  4376. HRESULT
  4377. EvictNotify(
  4378. [ in, pointer_default( unique ) ] LPCWSTR pcszNodeNameIn
  4379. );
  4380. }; // interface IClusCfgEvictListener
  4381. //****************************************************************************
  4382. //++
  4383. //
  4384. // interface IClusCfgEvictNotify
  4385. //
  4386. // Description:
  4387. // This interface is implemented by a component that the cluster service
  4388. // instantiates. When the cluster service calls the only method on this
  4389. // interface, this component will enumerate the evict listeners and
  4390. // inform them that a node has been evicted from the cluster. These
  4391. // components will be running on a cluster node and are capable of using
  4392. // the cluster API in their implementation.
  4393. //
  4394. //--
  4395. //****************************************************************************
  4396. [
  4397. object,
  4398. uuid( 090E7745-9E5B-4d76-936E-D760CF2FF3B9 ),
  4399. async_uuid( AD2E83CC-1D14-4d20-928E-22D344847454 ),
  4400. pointer_default( unique )
  4401. ]
  4402. interface
  4403. IClusCfgEvictNotify : IUnknown
  4404. {
  4405. //////////////////////////////////////////////////////////////////////////
  4406. //
  4407. // STDMETHOD
  4408. // IClusCfgEvictNotify::SendNotifications(
  4409. // [ in, pointer_default( unique ) ] LPCWSTR pcszNodeNameIn
  4410. // )
  4411. //
  4412. // Description:
  4413. // This method is called by the Cluster Service to inform the implementor
  4414. // of this interface to send out notification when a node is evicted from
  4415. // the cluster to interested listeners.
  4416. //
  4417. // Arguments:
  4418. // pcszNodeNameIn
  4419. // The name of the node that was evicted.
  4420. //
  4421. // Return Values:
  4422. // S_OK
  4423. // Success.
  4424. //
  4425. // Other HRESULTs
  4426. // The call failed.
  4427. //
  4428. //////////////////////////////////////////////////////////////////////////
  4429. HRESULT
  4430. SendNotifications(
  4431. [ in, pointer_default( unique ) ] LPCWSTR pcszNodeNameIn
  4432. );
  4433. }; // interface IClusCfgEvictNotify