Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1101 lines
29 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. ioctl.c
  5. Abstract:
  6. Implements server side of the resource and resource type
  7. IOCTL interfaces in the CLUSAPI.
  8. Author:
  9. John Vert (jvert) 10/16/1996
  10. Revision History:
  11. --*/
  12. #include "apip.h"
  13. error_status_t
  14. s_ApiNodeResourceControl(
  15. IN HRES_RPC hResource,
  16. IN HNODE_RPC hNode,
  17. IN DWORD dwControlCode,
  18. IN UCHAR *lpInBuffer,
  19. IN DWORD dwInBufferSize,
  20. OUT UCHAR *lpOutBuffer,
  21. IN DWORD nOutBufferSize,
  22. OUT DWORD *lpBytesReturned,
  23. OUT DWORD *lpcbRequired
  24. )
  25. /*++
  26. Routine Description:
  27. Provides for arbitrary communication and control between an application
  28. and a specific instance of a resource.
  29. Arguments:
  30. hResource - Supplies a handle to the resource to be controlled.
  31. hNode - Supplies a handle to the node on which the resource
  32. control should be delivered. If this is NULL, the node where
  33. the resource is online is used.
  34. dwControlCode- Supplies the control code that defines the
  35. structure and action of the resource control.
  36. Values of dwControlCode between 0 and 0x10000000 are reserved
  37. for future definition and use by Microsoft. All other values
  38. are available for use by ISVs
  39. lpInBuffer- Supplies a pointer to the input buffer to be passed
  40. to the resource.
  41. nInBufferSize- Supplies the size, in bytes, of the data pointed
  42. to by lpInBuffer..
  43. lpOutBuffer- Supplies a pointer to the output buffer to be
  44. filled in by the resource..
  45. nOutBufferSize- Supplies the size, in bytes, of the available
  46. space pointed to by lpOutBuffer.
  47. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  48. actually filled in by the resource..
  49. lpcbRequired - Returns the number of bytes required if OutBuffer
  50. is not large enough.
  51. Return Value:
  52. ERROR_SUCCESS if successful
  53. Win32 error code otherwise
  54. --*/
  55. {
  56. PFM_RESOURCE Resource;
  57. PNM_NODE Node;
  58. API_CHECK_INIT();
  59. VALIDATE_RESOURCE_EXISTS(Resource, hResource);
  60. VALIDATE_NODE(Node, hNode);
  61. return(FmResourceControl( Resource,
  62. Node,
  63. dwControlCode,
  64. lpInBuffer,
  65. dwInBufferSize,
  66. lpOutBuffer,
  67. nOutBufferSize,
  68. lpBytesReturned,
  69. lpcbRequired ));
  70. }
  71. error_status_t
  72. s_ApiResourceControl(
  73. IN HRES_RPC hResource,
  74. IN DWORD dwControlCode,
  75. IN UCHAR *lpInBuffer,
  76. IN DWORD dwInBufferSize,
  77. OUT UCHAR *lpOutBuffer,
  78. IN DWORD nOutBufferSize,
  79. OUT DWORD *lpBytesReturned,
  80. OUT DWORD *lpcbRequired
  81. )
  82. /*++
  83. Routine Description:
  84. Provides for arbitrary communication and control between an application
  85. and a specific instance of a resource.
  86. Arguments:
  87. hResource - Supplies a handle to the resource to be controlled.
  88. dwControlCode- Supplies the control code that defines the
  89. structure and action of the resource control.
  90. Values of dwControlCode between 0 and 0x10000000 are reserved
  91. for future definition and use by Microsoft. All other values
  92. are available for use by ISVs
  93. lpInBuffer- Supplies a pointer to the input buffer to be passed
  94. to the resource.
  95. nInBufferSize- Supplies the size, in bytes, of the data pointed
  96. to by lpInBuffer..
  97. lpOutBuffer- Supplies a pointer to the output buffer to be
  98. filled in by the resource..
  99. nOutBufferSize- Supplies the size, in bytes, of the available
  100. space pointed to by lpOutBuffer.
  101. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  102. actually filled in by the resource..
  103. lpcbRequired - Returns the number of bytes required if OutBuffer
  104. is not large enough.
  105. Return Value:
  106. ERROR_SUCCESS if successful
  107. Win32 error code otherwise
  108. --*/
  109. {
  110. PFM_RESOURCE Resource;
  111. API_CHECK_INIT();
  112. VALIDATE_RESOURCE_EXISTS(Resource, hResource);
  113. return(FmResourceControl( Resource,
  114. NULL,
  115. dwControlCode,
  116. lpInBuffer,
  117. dwInBufferSize,
  118. lpOutBuffer,
  119. nOutBufferSize,
  120. lpBytesReturned,
  121. lpcbRequired ));
  122. }
  123. error_status_t
  124. s_ApiNodeResourceTypeControl(
  125. IN HCLUSTER_RPC hCluster,
  126. IN LPCWSTR lpszResourceTypeName,
  127. IN HNODE_RPC hNode,
  128. IN DWORD dwControlCode,
  129. IN UCHAR *lpInBuffer,
  130. IN DWORD dwInBufferSize,
  131. OUT UCHAR *lpOutBuffer,
  132. IN DWORD nOutBufferSize,
  133. OUT DWORD *lpBytesReturned,
  134. OUT DWORD *lpcbRequired
  135. )
  136. /*++
  137. Routine Description:
  138. Provides for arbitrary communication and control between an application
  139. and a specific instance of a resource type.
  140. Arguments:
  141. hCluster - Supplies a handle to the cluster to be controlled. Not used.
  142. lpszResourceTypename - Supplies the name of the resource type to be
  143. controlled.
  144. hNode - Supplies a handle to the node on which the resource
  145. control should be delivered. If this is NULL, the node where
  146. the resource is online is used.
  147. dwControlCode- Supplies the control code that defines the
  148. structure and action of the resource type control.
  149. Values of dwControlCode between 0 and 0x10000000 are reserved
  150. for future definition and use by Microsoft. All other values
  151. are available for use by ISVs
  152. lpInBuffer- Supplies a pointer to the input buffer to be passed
  153. to the resource.
  154. nInBufferSize- Supplies the size, in bytes, of the data pointed
  155. to by lpInBuffer..
  156. lpOutBuffer- Supplies a pointer to the output buffer to be
  157. filled in by the resource..
  158. nOutBufferSize- Supplies the size, in bytes, of the available
  159. space pointed to by lpOutBuffer.
  160. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  161. actually filled in by the resource..
  162. lpcbRequired - Returns the number of bytes required if OutBuffer
  163. is not large enough.
  164. Return Value:
  165. ERROR_SUCCESS if successful
  166. Win32 error code otherwise
  167. --*/
  168. {
  169. PNM_NODE Node;
  170. API_CHECK_INIT();
  171. VALIDATE_NODE(Node, hNode);
  172. return(FmResourceTypeControl( lpszResourceTypeName,
  173. Node,
  174. dwControlCode,
  175. lpInBuffer,
  176. dwInBufferSize,
  177. lpOutBuffer,
  178. nOutBufferSize,
  179. lpBytesReturned,
  180. lpcbRequired ));
  181. }
  182. error_status_t
  183. s_ApiResourceTypeControl(
  184. IN HCLUSTER_RPC hCluster,
  185. IN LPCWSTR lpszResourceTypeName,
  186. IN DWORD dwControlCode,
  187. IN UCHAR *lpInBuffer,
  188. IN DWORD dwInBufferSize,
  189. OUT UCHAR *lpOutBuffer,
  190. IN DWORD nOutBufferSize,
  191. OUT DWORD *lpBytesReturned,
  192. OUT DWORD *lpcbRequired
  193. )
  194. /*++
  195. Routine Description:
  196. Provides for arbitrary communication and control between an application
  197. and a specific instance of a resource type.
  198. Arguments:
  199. hCluster - Supplies a handle to the cluster to be controlled. Not used.
  200. lpszResourceTypename - Supplies the name of the resource type to be
  201. controlled.
  202. hNode - Supplies a handle to the node on which the resource
  203. control should be delivered. If this is NULL, the node where
  204. the resource is online is used.
  205. dwControlCode- Supplies the control code that defines the
  206. structure and action of the resource type control.
  207. Values of dwControlCode between 0 and 0x10000000 are reserved
  208. for future definition and use by Microsoft. All other values
  209. are available for use by ISVs
  210. lpInBuffer- Supplies a pointer to the input buffer to be passed
  211. to the resource.
  212. nInBufferSize- Supplies the size, in bytes, of the data pointed
  213. to by lpInBuffer..
  214. lpOutBuffer- Supplies a pointer to the output buffer to be
  215. filled in by the resource..
  216. nOutBufferSize- Supplies the size, in bytes, of the available
  217. space pointed to by lpOutBuffer.
  218. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  219. actually filled in by the resource..
  220. lpcbRequired - Returns the number of bytes required if OutBuffer
  221. is not large enough.
  222. Return Value:
  223. ERROR_SUCCESS if successful
  224. Win32 error code otherwise
  225. --*/
  226. {
  227. API_CHECK_INIT();
  228. return(FmResourceTypeControl( lpszResourceTypeName,
  229. NULL,
  230. dwControlCode,
  231. lpInBuffer,
  232. dwInBufferSize,
  233. lpOutBuffer,
  234. nOutBufferSize,
  235. lpBytesReturned,
  236. lpcbRequired ));
  237. }
  238. error_status_t
  239. s_ApiNodeGroupControl(
  240. IN HGROUP_RPC hGroup,
  241. IN HNODE_RPC hNode,
  242. IN DWORD dwControlCode,
  243. IN UCHAR *lpInBuffer,
  244. IN DWORD dwInBufferSize,
  245. OUT UCHAR *lpOutBuffer,
  246. IN DWORD nOutBufferSize,
  247. OUT DWORD *lpBytesReturned,
  248. OUT DWORD *lpcbRequired
  249. )
  250. /*++
  251. Routine Description:
  252. Provides for arbitrary communication and control between an application
  253. and a specific instance of a group.
  254. Arguments:
  255. hGroup - Supplies a handle to the group to be controlled.
  256. hNode - Supplies a handle to the node on which the group
  257. control should be delivered. If this is NULL, the node where
  258. the application is bound performs the request.
  259. dwControlCode- Supplies the control code that defines the
  260. structure and action of the group control.
  261. Values of dwControlCode between 0 and 0x10000000 are reserved
  262. for future definition and use by Microsoft. All other values
  263. are available for use by ISVs.
  264. lpInBuffer- Supplies a pointer to the input buffer to be passed
  265. to the group.
  266. nInBufferSize- Supplies the size, in bytes, of the data pointed
  267. to by lpInBuffer.
  268. lpOutBuffer- Supplies a pointer to the output buffer to be
  269. filled in by the group.
  270. nOutBufferSize- Supplies the size, in bytes, of the available
  271. space pointed to by lpOutBuffer.
  272. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  273. actually filled in by the group.
  274. lpcbRequired - Returns the number of bytes required if OutBuffer
  275. is not large enough.
  276. Return Value:
  277. ERROR_SUCCESS if successful
  278. Win32 error code otherwise
  279. --*/
  280. {
  281. PFM_GROUP Group;
  282. PNM_NODE Node;
  283. API_CHECK_INIT();
  284. VALIDATE_GROUP_EXISTS(Group, hGroup);
  285. VALIDATE_NODE(Node, hNode);
  286. return(FmGroupControl( Group,
  287. Node,
  288. dwControlCode,
  289. lpInBuffer,
  290. dwInBufferSize,
  291. lpOutBuffer,
  292. nOutBufferSize,
  293. lpBytesReturned,
  294. lpcbRequired ));
  295. }
  296. error_status_t
  297. s_ApiGroupControl(
  298. IN HGROUP_RPC hGroup,
  299. IN DWORD dwControlCode,
  300. IN UCHAR *lpInBuffer,
  301. IN DWORD dwInBufferSize,
  302. OUT UCHAR *lpOutBuffer,
  303. IN DWORD nOutBufferSize,
  304. OUT DWORD *lpBytesReturned,
  305. OUT DWORD *lpcbRequired
  306. )
  307. /*++
  308. Routine Description:
  309. Provides for arbitrary communication and control between an application
  310. and a specific instance of a group.
  311. Arguments:
  312. hGroup - Supplies a handle to the group to be controlled.
  313. dwControlCode- Supplies the control code that defines the
  314. structure and action of the group control.
  315. Values of dwControlCode between 0 and 0x10000000 are reserved
  316. for future definition and use by Microsoft. All other values
  317. are available for use by ISVs.
  318. lpInBuffer- Supplies a pointer to the input buffer to be passed
  319. to the group.
  320. nInBufferSize- Supplies the size, in bytes, of the data pointed
  321. to by lpInBuffer.
  322. lpOutBuffer- Supplies a pointer to the output buffer to be
  323. filled in by the group.
  324. nOutBufferSize- Supplies the size, in bytes, of the available
  325. space pointed to by lpOutBuffer.
  326. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  327. actually filled in by the group.
  328. lpcbRequired - Returns the number of bytes required if OutBuffer
  329. is not large enough.
  330. Return Value:
  331. ERROR_SUCCESS if successful
  332. Win32 error code otherwise
  333. --*/
  334. {
  335. PFM_GROUP Group;
  336. API_CHECK_INIT();
  337. VALIDATE_GROUP_EXISTS(Group, hGroup);
  338. return(FmGroupControl( Group,
  339. NULL,
  340. dwControlCode,
  341. lpInBuffer,
  342. dwInBufferSize,
  343. lpOutBuffer,
  344. nOutBufferSize,
  345. lpBytesReturned,
  346. lpcbRequired ));
  347. }
  348. error_status_t
  349. s_ApiNodeNetworkControl(
  350. IN HNETWORK_RPC hNetwork,
  351. IN HNODE_RPC hNode,
  352. IN DWORD dwControlCode,
  353. IN UCHAR *lpInBuffer,
  354. IN DWORD dwInBufferSize,
  355. OUT UCHAR *lpOutBuffer,
  356. IN DWORD nOutBufferSize,
  357. OUT DWORD *lpBytesReturned,
  358. OUT DWORD *lpcbRequired
  359. )
  360. /*++
  361. Routine Description:
  362. Provides for arbitrary communication and control between an application
  363. and a specific instance of a network.
  364. Arguments:
  365. hNetwork - Supplies a handle to the network to be controlled.
  366. hNode - Supplies a handle to the node on which the network
  367. control should be delivered. If this is NULL, the node where
  368. the application is bound performs the request.
  369. dwControlCode- Supplies the control code that defines the
  370. structure and action of the network control.
  371. Values of dwControlCode between 0 and 0x10000000 are reserved
  372. for future definition and use by Microsoft. All other values
  373. are available for use by ISVs.
  374. lpInBuffer- Supplies a pointer to the input buffer to be passed
  375. to the network.
  376. nInBufferSize- Supplies the size, in bytes, of the data pointed
  377. to by lpInBuffer.
  378. lpOutBuffer- Supplies a pointer to the output buffer to be
  379. filled in by the network.
  380. nOutBufferSize- Supplies the size, in bytes, of the available
  381. space pointed to by lpOutBuffer.
  382. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  383. actually filled in by the network.
  384. lpcbRequired - Returns the number of bytes required if OutBuffer
  385. is not large enough.
  386. Return Value:
  387. ERROR_SUCCESS if successful
  388. Win32 error code otherwise
  389. --*/
  390. {
  391. PNM_NETWORK Network;
  392. PNM_NODE Node;
  393. API_CHECK_INIT();
  394. VALIDATE_NETWORK_EXISTS(Network, hNetwork);
  395. VALIDATE_NODE(Node, hNode);
  396. return(NmNetworkControl(Network,
  397. Node,
  398. dwControlCode,
  399. lpInBuffer,
  400. dwInBufferSize,
  401. lpOutBuffer,
  402. nOutBufferSize,
  403. lpBytesReturned,
  404. lpcbRequired ));
  405. }
  406. error_status_t
  407. s_ApiNetworkControl(
  408. IN HNETWORK_RPC hNetwork,
  409. IN DWORD dwControlCode,
  410. IN UCHAR *lpInBuffer,
  411. IN DWORD dwInBufferSize,
  412. OUT UCHAR *lpOutBuffer,
  413. IN DWORD nOutBufferSize,
  414. OUT DWORD *lpBytesReturned,
  415. OUT DWORD *lpcbRequired
  416. )
  417. /*++
  418. Routine Description:
  419. Provides for arbitrary communication and control between an application
  420. and a specific instance of a network.
  421. Arguments:
  422. hNetwork - Supplies a handle to the network to be controlled.
  423. dwControlCode- Supplies the control code that defines the
  424. structure and action of the network control.
  425. Values of dwControlCode between 0 and 0x10000000 are reserved
  426. for future definition and use by Microsoft. All other values
  427. are available for use by ISVs.
  428. lpInBuffer- Supplies a pointer to the input buffer to be passed
  429. to the network.
  430. nInBufferSize- Supplies the size, in bytes, of the data pointed
  431. to by lpInBuffer.
  432. lpOutBuffer- Supplies a pointer to the output buffer to be
  433. filled in by the network.
  434. nOutBufferSize- Supplies the size, in bytes, of the available
  435. space pointed to by lpOutBuffer.
  436. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  437. actually filled in by the network.
  438. lpcbRequired - Returns the number of bytes required if OutBuffer
  439. is not large enough.
  440. Return Value:
  441. ERROR_SUCCESS if successful
  442. Win32 error code otherwise
  443. --*/
  444. {
  445. PNM_NETWORK Network;
  446. API_CHECK_INIT();
  447. VALIDATE_NETWORK_EXISTS(Network, hNetwork);
  448. return(NmNetworkControl(Network,
  449. NULL,
  450. dwControlCode,
  451. lpInBuffer,
  452. dwInBufferSize,
  453. lpOutBuffer,
  454. nOutBufferSize,
  455. lpBytesReturned,
  456. lpcbRequired ));
  457. }
  458. error_status_t
  459. s_ApiNodeNetInterfaceControl(
  460. IN HNETINTERFACE_RPC hNetInterface,
  461. IN HNODE_RPC hNode,
  462. IN DWORD dwControlCode,
  463. IN UCHAR *lpInBuffer,
  464. IN DWORD dwInBufferSize,
  465. OUT UCHAR *lpOutBuffer,
  466. IN DWORD nOutBufferSize,
  467. OUT DWORD *lpBytesReturned,
  468. OUT DWORD *lpcbRequired
  469. )
  470. /*++
  471. Routine Description:
  472. Provides for arbitrary communication and control between an application
  473. and a specific instance of a network interface.
  474. Arguments:
  475. hNetInterface - Supplies a handle to the network interface to be controlled.
  476. hNode - Supplies a handle to the node on which the network
  477. control should be delivered. If this is NULL, the node where
  478. the application is bound performs the request.
  479. dwControlCode- Supplies the control code that defines the
  480. structure and action of the network control.
  481. Values of dwControlCode between 0 and 0x10000000 are reserved
  482. for future definition and use by Microsoft. All other values
  483. are available for use by ISVs.
  484. lpInBuffer- Supplies a pointer to the input buffer to be passed
  485. to the network.
  486. nInBufferSize- Supplies the size, in bytes, of the data pointed
  487. to by lpInBuffer.
  488. lpOutBuffer- Supplies a pointer to the output buffer to be
  489. filled in by the network.
  490. nOutBufferSize- Supplies the size, in bytes, of the available
  491. space pointed to by lpOutBuffer.
  492. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  493. actually filled in by the network.
  494. lpcbRequired - Returns the number of bytes required if OutBuffer
  495. is not large enough.
  496. Return Value:
  497. ERROR_SUCCESS if successful
  498. Win32 error code otherwise
  499. --*/
  500. {
  501. PNM_INTERFACE NetInterface;
  502. PNM_NODE Node;
  503. API_CHECK_INIT();
  504. VALIDATE_NETINTERFACE_EXISTS(NetInterface, hNetInterface);
  505. VALIDATE_NODE(Node, hNode);
  506. return(NmInterfaceControl(NetInterface,
  507. Node,
  508. dwControlCode,
  509. lpInBuffer,
  510. dwInBufferSize,
  511. lpOutBuffer,
  512. nOutBufferSize,
  513. lpBytesReturned,
  514. lpcbRequired ));
  515. }
  516. error_status_t
  517. s_ApiNetInterfaceControl(
  518. IN HNETINTERFACE_RPC hNetInterface,
  519. IN DWORD dwControlCode,
  520. IN UCHAR *lpInBuffer,
  521. IN DWORD dwInBufferSize,
  522. OUT UCHAR *lpOutBuffer,
  523. IN DWORD nOutBufferSize,
  524. OUT DWORD *lpBytesReturned,
  525. OUT DWORD *lpcbRequired
  526. )
  527. /*++
  528. Routine Description:
  529. Provides for arbitrary communication and control between an application
  530. and a specific instance of a network interface.
  531. Arguments:
  532. hNetInterface - Supplies a handle to the network interface to be controlled.
  533. dwControlCode- Supplies the control code that defines the
  534. structure and action of the network control.
  535. Values of dwControlCode between 0 and 0x10000000 are reserved
  536. for future definition and use by Microsoft. All other values
  537. are available for use by ISVs.
  538. lpInBuffer- Supplies a pointer to the input buffer to be passed
  539. to the network.
  540. nInBufferSize- Supplies the size, in bytes, of the data pointed
  541. to by lpInBuffer.
  542. lpOutBuffer- Supplies a pointer to the output buffer to be
  543. filled in by the network.
  544. nOutBufferSize- Supplies the size, in bytes, of the available
  545. space pointed to by lpOutBuffer.
  546. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  547. actually filled in by the network.
  548. lpcbRequired - Returns the number of bytes required if OutBuffer
  549. is not large enough.
  550. Return Value:
  551. ERROR_SUCCESS if successful
  552. Win32 error code otherwise
  553. --*/
  554. {
  555. PNM_INTERFACE NetInterface;
  556. API_CHECK_INIT();
  557. VALIDATE_NETINTERFACE_EXISTS(NetInterface, hNetInterface);
  558. return(NmInterfaceControl(NetInterface,
  559. NULL,
  560. dwControlCode,
  561. lpInBuffer,
  562. dwInBufferSize,
  563. lpOutBuffer,
  564. nOutBufferSize,
  565. lpBytesReturned,
  566. lpcbRequired ));
  567. }
  568. error_status_t
  569. s_ApiNodeNodeControl(
  570. IN HNODE_RPC hNode,
  571. IN HNODE_RPC hHostNode,
  572. IN DWORD dwControlCode,
  573. IN UCHAR *lpInBuffer,
  574. IN DWORD dwInBufferSize,
  575. OUT UCHAR *lpOutBuffer,
  576. IN DWORD nOutBufferSize,
  577. OUT DWORD *lpBytesReturned,
  578. OUT DWORD *lpcbRequired
  579. )
  580. /*++
  581. Routine Description:
  582. Provides for arbitrary communication and control between an application
  583. and a specific instance of a node.
  584. Arguments:
  585. hNode - Supplies a handle to the node to be controlled.
  586. hHostNode - Supplies a handle to the node on which the node
  587. control should be delivered. If this is NULL, the node where
  588. the application is bound performs the request.
  589. dwControlCode- Supplies the control code that defines the
  590. structure and action of the node control.
  591. Values of dwControlCode between 0 and 0x10000000 are reserved
  592. for future definition and use by Microsoft. All other values
  593. are available for use by ISVs.
  594. lpInBuffer- Supplies a pointer to the input buffer to be passed
  595. to the node.
  596. nInBufferSize- Supplies the size, in bytes, of the data pointed
  597. to by lpInBuffer.
  598. lpOutBuffer- Supplies a pointer to the output buffer to be
  599. filled in by the node.
  600. nOutBufferSize- Supplies the size, in bytes, of the available
  601. space pointed to by lpOutBuffer.
  602. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  603. actually filled in by the node.
  604. lpcbRequired - Returns the number of bytes required if OutBuffer
  605. is not large enough.
  606. Return Value:
  607. ERROR_SUCCESS if successful
  608. Win32 error code otherwise
  609. --*/
  610. {
  611. PNM_NODE Node;
  612. PNM_NODE HostNode;
  613. API_CHECK_INIT();
  614. VALIDATE_NODE(Node, hNode);
  615. VALIDATE_NODE(HostNode, hHostNode);
  616. return(NmNodeControl( Node,
  617. HostNode,
  618. dwControlCode,
  619. lpInBuffer,
  620. dwInBufferSize,
  621. lpOutBuffer,
  622. nOutBufferSize,
  623. lpBytesReturned,
  624. lpcbRequired ));
  625. }
  626. error_status_t
  627. s_ApiNodeControl(
  628. IN HNODE_RPC hNode,
  629. IN DWORD dwControlCode,
  630. IN UCHAR *lpInBuffer,
  631. IN DWORD dwInBufferSize,
  632. OUT UCHAR *lpOutBuffer,
  633. IN DWORD nOutBufferSize,
  634. OUT DWORD *lpBytesReturned,
  635. OUT DWORD *lpcbRequired
  636. )
  637. /*++
  638. Routine Description:
  639. Provides for arbitrary communication and control between an application
  640. and a specific instance of a node.
  641. Arguments:
  642. hNode - Supplies a handle to the node to be controlled.
  643. dwControlCode- Supplies the control code that defines the
  644. structure and action of the node control.
  645. Values of dwControlCode between 0 and 0x10000000 are reserved
  646. for future definition and use by Microsoft. All other values
  647. are available for use by ISVs.
  648. lpInBuffer- Supplies a pointer to the input buffer to be passed
  649. to the node.
  650. nInBufferSize- Supplies the size, in bytes, of the data pointed
  651. to by lpInBuffer.
  652. lpOutBuffer- Supplies a pointer to the output buffer to be
  653. filled in by the node.
  654. nOutBufferSize- Supplies the size, in bytes, of the available
  655. space pointed to by lpOutBuffer.
  656. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  657. actually filled in by the node.
  658. lpcbRequired - Returns the number of bytes required if OutBuffer
  659. is not large enough.
  660. Return Value:
  661. ERROR_SUCCESS if successful
  662. Win32 error code otherwise
  663. --*/
  664. {
  665. PNM_NODE Node;
  666. API_CHECK_INIT();
  667. VALIDATE_NODE(Node, hNode);
  668. return(NmNodeControl( Node,
  669. NULL,
  670. dwControlCode,
  671. lpInBuffer,
  672. dwInBufferSize,
  673. lpOutBuffer,
  674. nOutBufferSize,
  675. lpBytesReturned,
  676. lpcbRequired ));
  677. }
  678. error_status_t
  679. s_ApiNodeClusterControl(
  680. IN HCLUSTER hCluster,
  681. IN HNODE_RPC hHostNode,
  682. IN DWORD dwControlCode,
  683. IN UCHAR *lpInBuffer,
  684. IN DWORD dwInBufferSize,
  685. OUT UCHAR *lpOutBuffer,
  686. IN DWORD nOutBufferSize,
  687. OUT DWORD *lpBytesReturned,
  688. OUT DWORD *lpcbRequired
  689. )
  690. /*++
  691. Routine Description:
  692. Provides for arbitrary communication and control between an application
  693. and the cluster.
  694. Arguments:
  695. dwControlCode- Supplies the control code that defines the
  696. structure and action of the cluster control.
  697. Values of dwControlCode between 0 and 0x10000000 are reserved
  698. for future definition and use by Microsoft. All other values
  699. are available for use by ISVs.
  700. lpInBuffer- Supplies a pointer to the input buffer to be passed
  701. to the cluster.
  702. nInBufferSize- Supplies the size, in bytes, of the data pointed
  703. to by lpInBuffer.
  704. lpOutBuffer- Supplies a pointer to the output buffer to be
  705. filled in by the cluster.
  706. nOutBufferSize- Supplies the size, in bytes, of the available
  707. space pointed to by lpOutBuffer.
  708. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  709. actually filled in by the cluster.
  710. lpcbRequired - Returns the number of bytes required if OutBuffer
  711. is not large enough.
  712. Return Value:
  713. ERROR_SUCCESS if successful
  714. Win32 error code otherwise
  715. --*/
  716. {
  717. PNM_NODE HostNode;
  718. API_CHECK_INIT();
  719. VALIDATE_NODE(HostNode, hHostNode);
  720. return(CsClusterControl(
  721. HostNode,
  722. dwControlCode,
  723. lpInBuffer,
  724. dwInBufferSize,
  725. lpOutBuffer,
  726. nOutBufferSize,
  727. lpBytesReturned,
  728. lpcbRequired ));
  729. }
  730. error_status_t
  731. s_ApiClusterControl(
  732. IN HCLUSTER hCluster,
  733. IN DWORD dwControlCode,
  734. IN UCHAR *lpInBuffer,
  735. IN DWORD dwInBufferSize,
  736. OUT UCHAR *lpOutBuffer,
  737. IN DWORD nOutBufferSize,
  738. OUT DWORD *lpBytesReturned,
  739. OUT DWORD *lpcbRequired
  740. )
  741. /*++
  742. Routine Description:
  743. Provides for arbitrary communication and control between an application
  744. and the cluster.
  745. Arguments:
  746. dwControlCode- Supplies the control code that defines the
  747. structure and action of the cluster control.
  748. Values of dwControlCode between 0 and 0x10000000 are reserved
  749. for future definition and use by Microsoft. All other values
  750. are available for use by ISVs.
  751. lpInBuffer- Supplies a pointer to the input buffer to be passed
  752. to the cluster.
  753. nInBufferSize- Supplies the size, in bytes, of the data pointed
  754. to by lpInBuffer.
  755. lpOutBuffer- Supplies a pointer to the output buffer to be
  756. filled in by the cluster.
  757. nOutBufferSize- Supplies the size, in bytes, of the available
  758. space pointed to by lpOutBuffer.
  759. lpBytesReturned - Returns the number of bytes of lpOutBuffer
  760. actually filled in by the cluster.
  761. lpcbRequired - Returns the number of bytes required if OutBuffer
  762. is not large enough.
  763. Return Value:
  764. ERROR_SUCCESS if successful
  765. Win32 error code otherwise
  766. --*/
  767. {
  768. API_CHECK_INIT();
  769. return(CsClusterControl(
  770. NULL,
  771. dwControlCode,
  772. lpInBuffer,
  773. dwInBufferSize,
  774. lpOutBuffer,
  775. nOutBufferSize,
  776. lpBytesReturned,
  777. lpcbRequired ));
  778. }
  779.