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.

986 lines
23 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. api_rpc.idl
  5. Abstract:
  6. Interface Description for Cluster API RPC interface
  7. Author:
  8. John Vert (jvert) 11-Jan-1996
  9. --*/
  10. //
  11. // Interface Attributes
  12. //
  13. [
  14. uuid(b97db8b2-4c63-11cf-bff6-08002be23f2f),
  15. version(2.0)
  16. ]
  17. interface clusapi
  18. {
  19. import "wtypes.idl";
  20. //
  21. // Types
  22. //
  23. typedef [context_handle] void *HCLUSTER_RPC;
  24. typedef [context_handle] void *HNOTIFY_RPC;
  25. typedef [context_handle] void *HNODE_RPC;
  26. typedef [context_handle] void *HGROUP_RPC;
  27. typedef [context_handle] void *HNETWORK_RPC;
  28. typedef [context_handle] void *HNETINTERFACE_RPC;
  29. typedef [context_handle] void *HRES_RPC;
  30. typedef [context_handle] void *HKEY_RPC;
  31. //
  32. // RPCable security structures (see winbase.h).
  33. //
  34. typedef struct _RPC_SECURITY_DESCRIPTOR {
  35. [ size_is( cbInSecurityDescriptor ), length_is( cbOutSecurityDescriptor ) ] UCHAR *lpSecurityDescriptor;
  36. DWORD cbInSecurityDescriptor;
  37. DWORD cbOutSecurityDescriptor;
  38. } RPC_SECURITY_DESCRIPTOR, *PRPC_SECURITY_DESCRIPTOR;
  39. typedef struct _RPC_SECURITY_ATTRIBUTES {
  40. DWORD nLength;
  41. RPC_SECURITY_DESCRIPTOR RpcSecurityDescriptor;
  42. BOOL bInheritHandle;
  43. } RPC_SECURITY_ATTRIBUTES, *PRPC_SECURITY_ATTRIBUTES;
  44. typedef struct _CLUSTER_OPERATIONAL_VERSION_INFO {
  45. DWORD dwSize;
  46. DWORD dwClusterHighestVersion;
  47. DWORD dwClusterLowestVersion;
  48. DWORD dwFlags;
  49. DWORD dwReserved;
  50. }CLUSTER_OPERATIONAL_VERSION_INFO, *PCLUSTER_OPERATIONAL_VERSION_INFO;
  51. //
  52. // Routines and structures for dealing with the cluster
  53. //
  54. HCLUSTER_RPC
  55. ApiOpenCluster(
  56. [ out ] error_status_t *Status
  57. );
  58. error_status_t
  59. ApiCloseCluster(
  60. [ in, out ] HCLUSTER_RPC *Cluster
  61. );
  62. error_status_t
  63. ApiSetClusterName(
  64. [ in ] LPCWSTR NewClusterName
  65. );
  66. error_status_t
  67. ApiGetClusterName(
  68. [ out ] LPWSTR *ClusterName,
  69. [ out ] LPWSTR *NodeName
  70. );
  71. error_status_t
  72. ApiGetClusterVersion(
  73. [ out ] WORD *lpwMajorVersion,
  74. [ out ] WORD *lpwMinorVersion,
  75. [ out ] WORD *lpwBuildNumber,
  76. [ out, string ] LPWSTR *lpszVendorId,
  77. [ out, string ] LPWSTR *lpszCSDVersion
  78. );
  79. error_status_t
  80. ApiGetQuorumResource(
  81. [ out, string ] LPWSTR *lpszResourceName,
  82. [ out, string ] LPWSTR *lpszDeviceName,
  83. [ out ] DWORD *pdwMaxQuorumLogSize
  84. );
  85. error_status_t
  86. ApiSetQuorumResource(
  87. [ in ] HRES_RPC hResource,
  88. [ in ] LPCWSTR lpszDeviceName,
  89. [ in ] DWORD dwMaxQuorumLogSize
  90. );
  91. //
  92. // Enumeration interface
  93. //
  94. typedef struct _ENUM_ENTRY {
  95. DWORD Type;
  96. [string] LPWSTR Name;
  97. } ENUM_ENTRY, *PENUM_ENTRY;
  98. typedef struct _ENUM_LIST {
  99. DWORD EntryCount;
  100. [size_is(EntryCount)] ENUM_ENTRY Entry[*];
  101. } ENUM_LIST, *PENUM_LIST;
  102. error_status_t
  103. ApiCreateEnum(
  104. [ in ] DWORD dwType,
  105. [ out ] PENUM_LIST *ReturnEnum
  106. );
  107. //
  108. // Resource interface
  109. //
  110. HRES_RPC
  111. ApiOpenResource(
  112. [ in, string ] LPCWSTR lpszResourceName,
  113. [ out ] error_status_t *Status
  114. );
  115. HRES_RPC
  116. ApiCreateResource(
  117. [ in ] HGROUP_RPC hGroup,
  118. [ in, string ] LPCWSTR lpszResourceName,
  119. [ in, string ] LPCWSTR lpszResourceType,
  120. [ in ] DWORD dwFlags,
  121. [ out ] error_status_t *Status
  122. );
  123. error_status_t
  124. ApiDeleteResource(
  125. [ in ] HRES_RPC hResource
  126. );
  127. error_status_t
  128. ApiCloseResource(
  129. [ in, out ] HRES_RPC *Resource
  130. );
  131. error_status_t
  132. ApiGetResourceState(
  133. [ in ] HRES_RPC hResource,
  134. [ out ] DWORD *State,
  135. [ out, string ] LPWSTR *NodeName,
  136. [ out, string ] LPWSTR *GroupName
  137. );
  138. error_status_t
  139. ApiSetResourceName(
  140. [ in ] HRES_RPC hResource,
  141. [ in, string ] LPCWSTR lpszResourceName
  142. );
  143. error_status_t
  144. ApiGetResourceId(
  145. [ in ] HRES_RPC hResource,
  146. [ out, string ] LPWSTR *pGuid
  147. );
  148. error_status_t
  149. ApiGetResourceType(
  150. [ in ] HRES_RPC hResource,
  151. [ out, string ] LPWSTR *lpszResourceType
  152. );
  153. error_status_t
  154. ApiFailResource(
  155. [ in ] HRES_RPC hResource
  156. );
  157. error_status_t
  158. ApiOnlineResource(
  159. [ in ] HRES_RPC hResource
  160. );
  161. error_status_t
  162. ApiOfflineResource(
  163. [ in ] HRES_RPC hResource
  164. );
  165. error_status_t
  166. ApiAddResourceDependency(
  167. [ in ] HRES_RPC hResource,
  168. [ in ] HRES_RPC hDependsOn
  169. );
  170. error_status_t
  171. ApiRemoveResourceDependency(
  172. [ in ] HRES_RPC hResource,
  173. [ in ] HRES_RPC hDependsOn
  174. );
  175. error_status_t
  176. ApiCanResourceBeDependent(
  177. [ in ] HRES_RPC hResource,
  178. [ in ] HRES_RPC hResourceDependent
  179. );
  180. error_status_t
  181. ApiCreateResEnum(
  182. [ in ] HRES_RPC hResource,
  183. [ in ] DWORD dwType,
  184. [ out ] PENUM_LIST *ReturnEnum
  185. );
  186. error_status_t
  187. ApiAddResourceNode(
  188. [ in ] HRES_RPC hResource,
  189. [ in ] HNODE_RPC hNode
  190. );
  191. error_status_t
  192. ApiRemoveResourceNode(
  193. [ in ] HRES_RPC hResource,
  194. [ in ] HNODE_RPC hNode
  195. );
  196. error_status_t
  197. ApiChangeResourceGroup(
  198. [ in ] HRES_RPC hResource,
  199. [ in ] HGROUP_RPC hGroup
  200. );
  201. error_status_t
  202. ApiCreateResourceType(
  203. [ in, string ] LPCWSTR lpszTypeName,
  204. [ in, string ] LPCWSTR lpszDisplayName,
  205. [ in, string ] LPCWSTR lpszDllName,
  206. [ in ] DWORD dwLooksAlive,
  207. [ in ] DWORD dwIsAlive
  208. );
  209. error_status_t
  210. ApiDeleteResourceType(
  211. [ in, string ] LPCWSTR lpszTypeName
  212. );
  213. //
  214. // Registry interfaces
  215. //
  216. HKEY_RPC
  217. ApiGetRootKey(
  218. [ in ] DWORD samDesired,
  219. [ out ] error_status_t *Status
  220. );
  221. HKEY_RPC
  222. ApiCreateKey(
  223. [ in ] HKEY_RPC hKey,
  224. [ in, string ] LPCWSTR lpSubKey,
  225. [ in ] DWORD dwOptions,
  226. [ in ] DWORD samDesired,
  227. [ in, unique ] PRPC_SECURITY_ATTRIBUTES lpSecurityAttributes,
  228. [ out ] LPDWORD lpdwDisposition,
  229. [ out ] error_status_t *Status
  230. );
  231. HKEY_RPC
  232. ApiOpenKey(
  233. [ in ] HKEY_RPC hKey,
  234. [ in, string ] LPCWSTR lpSubKey,
  235. [ in ] DWORD samDesired,
  236. [ out ] error_status_t *Status
  237. );
  238. error_status_t
  239. ApiEnumKey(
  240. [ in ] HKEY_RPC hKey,
  241. [ in ] DWORD dwIndex,
  242. [ out, string ] LPWSTR *KeyName,
  243. [ out ] FILETIME *lpftLastWriteTime
  244. );
  245. error_status_t
  246. ApiSetValue(
  247. [ in ] HKEY_RPC hKey,
  248. [ in, string ] LPCWSTR lpValueName,
  249. [ in ] DWORD dwType,
  250. [ in, size_is(cbData) ] const UCHAR *lpData,
  251. [ in ] DWORD cbData
  252. );
  253. error_status_t
  254. ApiDeleteValue(
  255. [ in ] HKEY_RPC hKey,
  256. [ in, string ] LPCWSTR lpValueName
  257. );
  258. error_status_t
  259. ApiQueryValue(
  260. [ in ] HKEY_RPC hKey,
  261. [ in, string ] LPCWSTR lpValueName,
  262. [ out ] DWORD *lpValueType,
  263. [ out, size_is(cbData) ] UCHAR *lpData,
  264. [ in ] DWORD cbData,
  265. [ out ] LPDWORD lpcbRequired
  266. );
  267. error_status_t
  268. ApiDeleteKey(
  269. [ in ] HKEY_RPC hKey,
  270. [ in, string ] LPCWSTR lpSubKey
  271. );
  272. error_status_t
  273. ApiEnumValue(
  274. [ in ] HKEY_RPC hKey,
  275. [ in ] DWORD dwIndex,
  276. [ out, string ] LPWSTR *lpValueName,
  277. [ out ] LPDWORD lpType,
  278. [ out, size_is(*lpcbData) ] UCHAR *lpData,
  279. [ in, out ] LPDWORD lpcbData,
  280. [ out ] LPDWORD TotalSize
  281. );
  282. error_status_t
  283. ApiCloseKey(
  284. [ in, out ] HKEY_RPC *pKey
  285. );
  286. error_status_t
  287. ApiQueryInfoKey(
  288. [ in ] HKEY_RPC hKey,
  289. [ out ] LPDWORD lpcSubKeys,
  290. [ out ] LPDWORD lpcbMaxSubKeyLen,
  291. [ out ] LPDWORD lpcValues,
  292. [ out ] LPDWORD lpcbMaxValueNameLen,
  293. [ out ] LPDWORD lpcbMaxValueLen,
  294. [ out ] LPDWORD lpcbSecurityDescriptor,
  295. [ out ] PFILETIME lpftLastWriteTime
  296. );
  297. error_status_t
  298. ApiSetKeySecurity(
  299. [ in ] HKEY_RPC hKey,
  300. [ in ] DWORD SecurityInformation,
  301. [ in ] PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptor
  302. );
  303. error_status_t
  304. ApiGetKeySecurity(
  305. [ in ] HKEY_RPC hKey,
  306. [ in ] DWORD SecurityInformation,
  307. [ in, out ] PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptor
  308. );
  309. //
  310. // Group interface
  311. //
  312. HGROUP_RPC
  313. ApiOpenGroup(
  314. [ in, string ] LPCWSTR lpszGroupName,
  315. [ out ] error_status_t *Status
  316. );
  317. HGROUP_RPC
  318. ApiCreateGroup(
  319. [ in, string ] LPCWSTR lpszGroupName,
  320. [ out ] error_status_t *Status
  321. );
  322. error_status_t
  323. ApiDeleteGroup(
  324. [ in ] HGROUP_RPC Group
  325. );
  326. error_status_t
  327. ApiCloseGroup(
  328. [ in, out ] HGROUP_RPC *Group
  329. );
  330. error_status_t
  331. ApiGetGroupState(
  332. [ in ] HGROUP_RPC hGroup,
  333. [ out ] DWORD *State,
  334. [ out, string ] LPWSTR *NodeName
  335. );
  336. error_status_t
  337. ApiSetGroupName(
  338. [ in ] HGROUP_RPC hGroup,
  339. [ in, string ] LPCWSTR lpszGroupName
  340. );
  341. error_status_t
  342. ApiGetGroupId(
  343. [ in ] HGROUP_RPC hGroup,
  344. [ out, string ] LPWSTR *pGuid
  345. );
  346. error_status_t
  347. ApiGetNodeId(
  348. [ in ] HNODE_RPC hNode,
  349. [ out, string ] LPWSTR *pGuid
  350. );
  351. error_status_t
  352. ApiOnlineGroup(
  353. [ in ] HGROUP_RPC hGroup
  354. );
  355. error_status_t
  356. ApiOfflineGroup(
  357. [ in ] HGROUP_RPC hGroup
  358. );
  359. error_status_t
  360. ApiMoveGroup(
  361. [ in ] HGROUP_RPC hGroup
  362. );
  363. error_status_t
  364. ApiMoveGroupToNode(
  365. [ in ] HGROUP_RPC hGroup,
  366. [ in ] HNODE_RPC hNode
  367. );
  368. error_status_t
  369. ApiCreateGroupResourceEnum(
  370. [ in ] HGROUP_RPC hGroup,
  371. [ in ] DWORD dwType,
  372. [ out ] PENUM_LIST *ReturnEnum
  373. );
  374. error_status_t
  375. ApiSetGroupNodeList(
  376. [ in ] HGROUP_RPC hGroup,
  377. [ in, unique, size_is(cbListSize) ] UCHAR *lpNodeList,
  378. [ in ] DWORD cbListSize
  379. );
  380. //
  381. // Notify interface
  382. //
  383. HNOTIFY_RPC
  384. ApiCreateNotify(
  385. [ out ] error_status_t *rpc_error
  386. );
  387. error_status_t
  388. ApiCloseNotify(
  389. [ in, out ] HNOTIFY_RPC *Notify
  390. );
  391. error_status_t
  392. ApiAddNotifyCluster(
  393. [ in ] HNOTIFY_RPC hNotify,
  394. [ in ] HCLUSTER_RPC hCluster,
  395. [ in ] DWORD dwFilter,
  396. [ in ] DWORD dwNotifyKey
  397. );
  398. error_status_t
  399. ApiAddNotifyNode(
  400. [ in ] HNOTIFY_RPC hNotify,
  401. [ in ] HNODE_RPC hNode,
  402. [ in ] DWORD dwFilter,
  403. [ in ] DWORD dwNotifyKey,
  404. [ out ] DWORD *dwStateSequence
  405. );
  406. error_status_t
  407. ApiAddNotifyGroup(
  408. [ in ] HNOTIFY_RPC hNotify,
  409. [ in ] HGROUP_RPC hGroup,
  410. [ in ] DWORD dwFilter,
  411. [ in ] DWORD dwNotifyKey,
  412. [ out ] DWORD *dwStateSequence
  413. );
  414. error_status_t
  415. ApiAddNotifyResource(
  416. [ in ] HNOTIFY_RPC hNotify,
  417. [ in ] HRES_RPC hResource,
  418. [ in ] DWORD dwFilter,
  419. [ in ] DWORD dwNotifyKey,
  420. [ out ] DWORD *dwStateSequence
  421. );
  422. error_status_t
  423. ApiAddNotifyKey(
  424. [ in ] HNOTIFY_RPC hNotify,
  425. [ in ] HKEY_RPC hKey,
  426. [ in ] DWORD dwNotifyKey,
  427. [ in ] DWORD Filter,
  428. [ in ] BOOL WatchSubTree
  429. );
  430. error_status_t
  431. ApiReAddNotifyNode(
  432. [ in ] HNOTIFY_RPC hNotify,
  433. [ in ] HNODE_RPC hNode,
  434. [ in ] DWORD dwFilter,
  435. [ in ] DWORD dwNotifyKey,
  436. [ in ] DWORD StateSequence
  437. );
  438. error_status_t
  439. ApiReAddNotifyGroup(
  440. [ in ] HNOTIFY_RPC hNotify,
  441. [ in ] HGROUP_RPC hGroup,
  442. [ in ] DWORD dwFilter,
  443. [ in ] DWORD dwNotifyKey,
  444. [ in ] DWORD StateSequence
  445. );
  446. error_status_t
  447. ApiReAddNotifyResource(
  448. [ in ] HNOTIFY_RPC hNotify,
  449. [ in ] HRES_RPC hResource,
  450. [ in ] DWORD dwFilter,
  451. [ in ] DWORD dwNotifyKey,
  452. [ in ] DWORD StateSequence
  453. );
  454. error_status_t
  455. ApiGetNotify(
  456. [ in ] HNOTIFY_RPC hNotify,
  457. [ in ] DWORD Timeout,
  458. [ out ] DWORD *dwNotifyKey,
  459. [ out ] DWORD *dwFilter,
  460. [ out ] DWORD *dwStateSequence,
  461. [ out, string ] LPWSTR *Name
  462. );
  463. HNODE_RPC
  464. ApiOpenNode(
  465. [ in, string ] LPCWSTR lpszNodeName,
  466. [ out ] error_status_t *Status
  467. );
  468. error_status_t
  469. ApiCloseNode(
  470. [ in, out ] HNODE_RPC *Node
  471. );
  472. error_status_t
  473. ApiGetNodeState(
  474. [ in ] HNODE_RPC hNode,
  475. [ out ] DWORD *State
  476. );
  477. error_status_t
  478. ApiPauseNode(
  479. [ in ] HNODE_RPC hNode
  480. );
  481. error_status_t
  482. ApiResumeNode(
  483. [ in ] HNODE_RPC hNode
  484. );
  485. error_status_t
  486. ApiEvictNode(
  487. [ in ] HNODE_RPC hNode
  488. );
  489. //
  490. // Resource/ResourceType IOCTL interface
  491. //
  492. error_status_t
  493. ApiNodeResourceControl(
  494. [ in ] HRES_RPC hResource,
  495. [ in ] HNODE_RPC hNode,
  496. [ in ] DWORD dwControlCode,
  497. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  498. [ in ] DWORD nInBufferSize,
  499. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  500. [ in ] DWORD nOutBufferSize,
  501. [ out ] DWORD *lpBytesReturned,
  502. [ out ] DWORD *lpcbRequired
  503. );
  504. error_status_t
  505. ApiResourceControl(
  506. [ in ] HRES_RPC hResource,
  507. [ in ] DWORD dwControlCode,
  508. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  509. [ in ] DWORD nInBufferSize,
  510. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  511. [ in ] DWORD nOutBufferSize,
  512. [ out ] DWORD *lpBytesReturned,
  513. [ out ] DWORD *lpcbRequired
  514. );
  515. error_status_t
  516. ApiNodeResourceTypeControl(
  517. [ in ] HCLUSTER_RPC hCluster,
  518. [ in, string ] LPCWSTR lpszResourceTypeName,
  519. [ in ] HNODE_RPC hNode,
  520. [ in ] DWORD dwControlCode,
  521. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  522. [ in ] DWORD nInBufferSize,
  523. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  524. [ in ] DWORD nOutBufferSize,
  525. [ out ] DWORD *lpBytesReturned,
  526. [ out ] DWORD *lpcbRequired
  527. );
  528. error_status_t
  529. ApiResourceTypeControl(
  530. [ in ] HCLUSTER_RPC hCluster,
  531. [ in, string ] LPCWSTR lpszResourceTypeName,
  532. [ in ] DWORD dwControlCode,
  533. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  534. [ in ] DWORD nInBufferSize,
  535. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  536. [ in ] DWORD nOutBufferSize,
  537. [ out ] DWORD *lpBytesReturned,
  538. [ out ] DWORD *lpcbRequired
  539. );
  540. //
  541. // Group IOCTL interface
  542. //
  543. error_status_t
  544. ApiNodeGroupControl(
  545. [ in ] HGROUP_RPC hGroup,
  546. [ in ] HNODE_RPC hNode,
  547. [ in ] DWORD dwControlCode,
  548. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  549. [ in ] DWORD nInBufferSize,
  550. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  551. [ in ] DWORD nOutBufferSize,
  552. [ out ] DWORD *lpBytesReturned,
  553. [ out ] DWORD *lpcbRequired
  554. );
  555. error_status_t
  556. ApiGroupControl(
  557. [ in ] HGROUP_RPC hGroup,
  558. [ in ] DWORD dwControlCode,
  559. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  560. [ in ] DWORD nInBufferSize,
  561. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  562. [ in ] DWORD nOutBufferSize,
  563. [ out ] DWORD *lpBytesReturned,
  564. [ out ] DWORD *lpcbRequired
  565. );
  566. //
  567. // Node IOCTL interface
  568. //
  569. error_status_t
  570. ApiNodeNodeControl(
  571. [ in ] HNODE_RPC hNode,
  572. [ in ] HNODE_RPC hHostNode,
  573. [ in ] DWORD dwControlCode,
  574. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  575. [ in ] DWORD nInBufferSize,
  576. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  577. [ in ] DWORD nOutBufferSize,
  578. [ out ] DWORD *lpBytesReturned,
  579. [ out ] DWORD *lpcbRequired
  580. );
  581. error_status_t
  582. ApiNodeControl(
  583. [ in ] HNODE_RPC hNode,
  584. [ in ] DWORD dwControlCode,
  585. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  586. [ in ] DWORD nInBufferSize,
  587. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  588. [ in ] DWORD nOutBufferSize,
  589. [ out ] DWORD *lpBytesReturned,
  590. [ out ] DWORD *lpcbRequired
  591. );
  592. //For eventlogging..this is only published in the idl interface for the eventlog
  593. //service. clusapi.dll doesnt export this functionality
  594. //SS: add a range to prevent DOS attacks - batching in eventlog service restricts this to 256K so 512K should be a safe limit for now
  595. error_status_t
  596. ApiEvPropEvents(
  597. [in, range(0, (512 * 1024))] DWORD dwEventInfoSize,
  598. [in , size_is(dwEventInfoSize)] UCHAR *pPackedEventInfo
  599. );
  600. //
  601. // Network interfaces
  602. //
  603. HNETWORK_RPC
  604. ApiOpenNetwork(
  605. [ in, string ] LPCWSTR lpszNetworkName,
  606. [ out ] error_status_t *Status
  607. );
  608. error_status_t
  609. ApiCloseNetwork(
  610. [ in, out ] HNETWORK_RPC *Network
  611. );
  612. error_status_t
  613. ApiGetNetworkState(
  614. [ in ] HNETWORK_RPC hNetwork,
  615. [ out ] DWORD *State
  616. );
  617. error_status_t
  618. ApiSetNetworkName(
  619. [ in ] HNETWORK_RPC hNetwork,
  620. [ in, string ] LPCWSTR lpszNetworkName
  621. );
  622. error_status_t
  623. ApiCreateNetworkEnum(
  624. [ in ] HNETWORK_RPC hNetwork,
  625. [ in ] DWORD dwType,
  626. [ out ] PENUM_LIST *ReturnEnum
  627. );
  628. error_status_t
  629. ApiGetNetworkId(
  630. [ in ] HNETWORK_RPC hNetwork,
  631. [ out, string ] LPWSTR *pGuid
  632. );
  633. error_status_t
  634. ApiSetNetworkPriorityOrder(
  635. [ in, range(0, 1000)] DWORD NetworkCount,
  636. [ in, size_is(NetworkCount) ] LPWSTR NetworkIdList[*]
  637. );
  638. //
  639. // Network IOCTL interface
  640. //
  641. error_status_t
  642. ApiNodeNetworkControl(
  643. [ in ] HNETWORK_RPC hNetwork,
  644. [ in ] HNODE_RPC hNode,
  645. [ in ] DWORD dwControlCode,
  646. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  647. [ in ] DWORD nInBufferSize,
  648. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  649. [ in ] DWORD nOutBufferSize,
  650. [ out ] DWORD *lpBytesReturned,
  651. [ out ] DWORD *lpcbRequired
  652. );
  653. error_status_t
  654. ApiNetworkControl(
  655. [ in ] HNETWORK_RPC hNetwork,
  656. [ in ] DWORD dwControlCode,
  657. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  658. [ in ] DWORD nInBufferSize,
  659. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  660. [ in ] DWORD nOutBufferSize,
  661. [ out ] DWORD *lpBytesReturned,
  662. [ out ] DWORD *lpcbRequired
  663. );
  664. error_status_t
  665. ApiAddNotifyNetwork(
  666. [ in ] HNOTIFY_RPC hNotify,
  667. [ in ] HNETWORK_RPC hNetwork,
  668. [ in ] DWORD dwFilter,
  669. [ in ] DWORD dwNotifyKey,
  670. [ out ] DWORD *dwStateSequence
  671. );
  672. error_status_t
  673. ApiReAddNotifyNetwork(
  674. [ in ] HNOTIFY_RPC hNotify,
  675. [ in ] HNETWORK_RPC hNetwork,
  676. [ in ] DWORD dwFilter,
  677. [ in ] DWORD dwNotifyKey,
  678. [ in ] DWORD StateSequence
  679. );
  680. //
  681. // NetInterface interfaces
  682. //
  683. HNETWORK_RPC
  684. ApiOpenNetInterface(
  685. [ in, string ] LPCWSTR lpszNetInterfaceName,
  686. [ out ] error_status_t *Status
  687. );
  688. error_status_t
  689. ApiCloseNetInterface(
  690. [ in, out ] HNETINTERFACE_RPC *NetInterface
  691. );
  692. error_status_t
  693. ApiGetNetInterfaceState(
  694. [ in ] HNETINTERFACE_RPC hNetInterface,
  695. [ out ] DWORD *State
  696. );
  697. error_status_t
  698. ApiGetNetInterface(
  699. [ in, string ] LPCWSTR lpszNodeName,
  700. [ in, string ] LPCWSTR lpszNetworkName,
  701. [ out, string ] LPWSTR *lppszInterfaceName
  702. );
  703. error_status_t
  704. ApiGetNetInterfaceId(
  705. [ in ] HNETINTERFACE_RPC hNetInterface,
  706. [ out, string ] LPWSTR *pGuid
  707. );
  708. //
  709. // NetInterface IOCTL interface
  710. //
  711. error_status_t
  712. ApiNodeNetInterfaceControl(
  713. [ in ] HNETINTERFACE_RPC hNetInterface,
  714. [ in ] HNODE_RPC hNode,
  715. [ in ] DWORD dwControlCode,
  716. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  717. [ in ] DWORD nInBufferSize,
  718. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  719. [ in ] DWORD nOutBufferSize,
  720. [ out ] DWORD *lpBytesReturned,
  721. [ out ] DWORD *lpcbRequired
  722. );
  723. error_status_t
  724. ApiNetInterfaceControl(
  725. [ in ] HNETINTERFACE_RPC hNetInterface,
  726. [ in ] DWORD dwControlCode,
  727. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  728. [ in ] DWORD nInBufferSize,
  729. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  730. [ in ] DWORD nOutBufferSize,
  731. [ out ] DWORD *lpBytesReturned,
  732. [ out ] DWORD *lpcbRequired
  733. );
  734. error_status_t
  735. ApiAddNotifyNetInterface(
  736. [ in ] HNOTIFY_RPC hNotify,
  737. [ in ] HNETINTERFACE_RPC hNetInterface,
  738. [ in ] DWORD dwFilter,
  739. [ in ] DWORD dwNotifyKey,
  740. [ out ] DWORD *dwStateSequence
  741. );
  742. error_status_t
  743. ApiReAddNotifyNetInterface(
  744. [ in ] HNOTIFY_RPC hNotify,
  745. [ in ] HNETINTERFACE_RPC hNetInterface,
  746. [ in ] DWORD dwFilter,
  747. [ in ] DWORD dwNotifyKey,
  748. [ in ] DWORD StateSequence
  749. );
  750. error_status_t
  751. ApiCreateNodeEnum(
  752. [ in ] HNODE_RPC hNode,
  753. [ in ] DWORD dwType,
  754. [ out ] PENUM_LIST *ReturnEnum
  755. );
  756. //added for nt 5
  757. //added for providing more complete cluster version
  758. error_status_t
  759. ApiGetClusterVersion2(
  760. [ out ] WORD *lpwMajorVersion,
  761. [ out ] WORD *lpwMinorVersion,
  762. [ out ] WORD *lpwBuildNumber,
  763. [ out, string ] LPWSTR *lpszVendorId,
  764. [ out, string ] LPWSTR *lpszCSDVersion,
  765. [ out ] PCLUSTER_OPERATIONAL_VERSION_INFO *ppClusterOpVerInfo
  766. );
  767. // Added for enumerating nodes that supports a certain resource type
  768. error_status_t
  769. ApiCreateResTypeEnum(
  770. [ in, string ] LPCWSTR lpszTypeName,
  771. [ in ] DWORD dwType,
  772. [ out ] PENUM_LIST *ReturnEnum
  773. );
  774. // Added for backing up the quorum log and checkpoint file to the specified directory
  775. error_status_t
  776. ApiBackupClusterDatabase(
  777. [ in, string ] LPCWSTR lpszPathName
  778. );
  779. //
  780. // Cluster ioctls
  781. //
  782. error_status_t
  783. ApiNodeClusterControl(
  784. [ in ] HCLUSTER_RPC hCluster,
  785. [ in ] HNODE_RPC hHostNode,
  786. [ in ] DWORD dwControlCode,
  787. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  788. [ in ] DWORD nInBufferSize,
  789. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  790. [ in ] DWORD nOutBufferSize,
  791. [ out ] DWORD *lpBytesReturned,
  792. [ out ] DWORD *lpcbRequired
  793. );
  794. error_status_t
  795. ApiClusterControl(
  796. [ in ] HCLUSTER_RPC hCluster,
  797. [ in ] DWORD dwControlCode,
  798. [ in, unique, size_is(nInBufferSize) ] UCHAR *lpInBuffer,
  799. [ in ] DWORD nInBufferSize,
  800. [ out, size_is(nOutBufferSize), length_is (*lpBytesReturned)] UCHAR *lpOutBuffer,
  801. [ in ] DWORD nOutBufferSize,
  802. [ out ] DWORD *lpBytesReturned,
  803. [ out ] DWORD *lpcbRequired
  804. );
  805. //
  806. // Added for unblocking the get notify thread without freeing the context handles
  807. //
  808. error_status_t
  809. ApiUnblockGetNotifyCall(
  810. [ in ] HNOTIFY_RPC hNotify
  811. );
  812. //
  813. // Added to enable change of the cluster service account password
  814. //
  815. // Structures IDL_CLUSTER_SET_PASSWORD_STATUS and IDL_CLUSTER_SET_PASSWORD_FLAGS
  816. // are also defined in clusapi.h. The duplication is necessary since the two
  817. // header files are completely independent. But the definitions of the two
  818. // data structures must remain in sync.
  819. typedef struct IDL_CLUSTER_SET_PASSWORD_STATUS {
  820. DWORD NodeId;
  821. BOOLEAN SetAttempted;
  822. DWORD ReturnStatus;
  823. } IDL_CLUSTER_SET_PASSWORD_STATUS, *PIDL_CLUSTER_SET_PASSWORD_STATUS;
  824. typedef enum IDL_CLUSTER_SET_PASSWORD_FLAGS {
  825. IDL_CLUSTER_SET_PASSWORD_IGNORE_DOWN_NODES = 1
  826. } IDL_CLUSTER_SET_PASSWORD_FLAGS;
  827. error_status_t
  828. ApiSetServiceAccountPassword(
  829. [ in, string ] LPWSTR lpszNewPassword,
  830. [ in ] IDL_CLUSTER_SET_PASSWORD_FLAGS dwFlags,
  831. [ out, size_is(ReturnStatusBufferSize), length_is(*SizeReturned) ] IDL_CLUSTER_SET_PASSWORD_STATUS ReturnStatusBufferPtr[*],
  832. [ in ] DWORD ReturnStatusBufferSize,
  833. [ out ] DWORD *SizeReturned,
  834. [ out ] DWORD *ExpectedBufferSize
  835. );
  836. }