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.

1119 lines
33 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. SRVSVC.IDL
  5. Abstract:
  6. Contains the Netr (Net Remote) RPC interface specification for the
  7. API associated with the Server Service. This includes API from the
  8. following catagories:
  9. NetCharDev
  10. NetCharDevQ
  11. NetConnection
  12. NetFile
  13. NetRemoteTOD
  14. NetServer
  15. NetServerTransport
  16. NetSession
  17. NetShare
  18. NetStatisticsGet (server half)
  19. Also contains the RPC specific data structures for these API.
  20. Author:
  21. Dan Lafferty (danl) 06-Feb-1991
  22. Environment:
  23. User Mode - Win32 - MIDL
  24. Revision History:
  25. 07-May-1991 danl
  26. Updated with RPC unionSs and latest structures.
  27. 06-Feb-1991 danl
  28. created
  29. 08-Aug-1992 johnsona
  30. added share info level 502.
  31. --*/
  32. //
  33. // Interface Attributes
  34. //
  35. [
  36. uuid(4B324FC8-1670-01D3-1278-5A47BF6EE188),
  37. version(3.0),
  38. #ifdef __midl
  39. ms_union,
  40. #endif // __midl
  41. pointer_default(unique)
  42. ]
  43. interface srvsvc
  44. {
  45. import "import.idl";
  46. #include <lmcons.h>
  47. //
  48. // BUGBUG - take this definition out when midl understands LPWSTR etc
  49. //
  50. #ifdef UNICODE
  51. #define LPTSTR wchar_t*
  52. #define TCHAR wchar_t
  53. #else
  54. #define TCHAR char
  55. #endif
  56. typedef [handle] LPTSTR SRVSVC_HANDLE;
  57. //
  58. // CharDev API
  59. //
  60. //
  61. // Structures - NetrCharDev
  62. //
  63. typedef struct _CHARDEV_INFO_0_CONTAINER {
  64. DWORD EntriesRead;
  65. [size_is(EntriesRead)] LPCHARDEV_INFO_0 Buffer;
  66. } CHARDEV_INFO_0_CONTAINER, *PCHARDEV_INFO_0_CONTAINER, *LPCHARDEV_INFO_0_CONTAINER;
  67. typedef struct _CHARDEV_INFO_1_CONTAINER {
  68. DWORD EntriesRead;
  69. [size_is(EntriesRead)] LPCHARDEV_INFO_1 Buffer;
  70. } CHARDEV_INFO_1_CONTAINER, *PCHARDEV_INFO_1_CONTAINER, *LPCHARDEV_INFO_1_CONTAINER;
  71. typedef struct _CHARDEV_ENUM_STRUCT {
  72. DWORD Level;
  73. [switch_is(Level)] union _CHARDEV_ENUM_UNION{
  74. [case(0)]
  75. CHARDEV_INFO_0_CONTAINER *Level0;
  76. [case(1)]
  77. CHARDEV_INFO_1_CONTAINER *Level1;
  78. [default]
  79. ;
  80. } CharDevInfo;
  81. }CHARDEV_ENUM_STRUCT, *PCHARDEV_ENUM_STRUCT, *LPCHARDEV_ENUM_STRUCT;
  82. typedef [switch_type(unsigned long)] union _CHARDEV_INFO { // for Get & Set Info
  83. [case(0)]
  84. LPCHARDEV_INFO_0 CharDevInfo0;
  85. [case(1)]
  86. LPCHARDEV_INFO_1 CharDevInfo1;
  87. [default]
  88. ;
  89. } CHARDEV_INFO, *PCHARDEV_INFO, *LPCHARDEV_INFO;
  90. //
  91. // Function Prototypes - NetrCharDev
  92. //
  93. NET_API_STATUS
  94. NetrCharDevEnum (
  95. [in,string,unique] SRVSVC_HANDLE ServerName,
  96. [in,out] LPCHARDEV_ENUM_STRUCT InfoStruct,
  97. [in] DWORD PreferedMaximumLength,
  98. [out] LPDWORD TotalEntries,
  99. [in,out,unique] LPDWORD ResumeHandle
  100. );
  101. NET_API_STATUS
  102. NetrCharDevGetInfo (
  103. [in,string,unique] SRVSVC_HANDLE ServerName,
  104. [in,string] LPTSTR DevName,
  105. [in] DWORD Level,
  106. [out, switch_is(Level)] LPCHARDEV_INFO InfoStruct
  107. );
  108. NET_API_STATUS
  109. NetrCharDevControl (
  110. [in,string,unique] SRVSVC_HANDLE ServerName,
  111. [in,string] LPTSTR DevName,
  112. [in] DWORD Opcode
  113. );
  114. //
  115. // CharDevQ API
  116. //
  117. //
  118. // Structures - NetrCharDevQ
  119. //
  120. typedef struct _CHARDEVQ_INFO_0_CONTAINER {
  121. DWORD EntriesRead;
  122. [size_is(EntriesRead)] LPCHARDEVQ_INFO_0 Buffer;
  123. } CHARDEVQ_INFO_0_CONTAINER, *PCHARDEVQ_INFO_0_CONTAINER, *LPCHARDEVQ_INFO_0_CONTAINER;
  124. typedef struct _CHARDEVQ_INFO_1_CONTAINER {
  125. DWORD EntriesRead;
  126. [size_is(EntriesRead)] LPCHARDEVQ_INFO_1 Buffer;
  127. } CHARDEVQ_INFO_1_CONTAINER, *PCHARDEVQ_INFO_1_CONTAINER, *LPCHARDEVQ_INFO_1_CONTAINER;
  128. typedef struct _CHARDEVQ_ENUM_STRUCT {
  129. DWORD Level;
  130. [switch_is(Level)] union _CHARDEVQ_ENUM_UNION{
  131. [case(0)]
  132. CHARDEVQ_INFO_0_CONTAINER *Level0;
  133. [case(1)]
  134. CHARDEVQ_INFO_1_CONTAINER *Level1;
  135. [default]
  136. ;
  137. } CharDevQInfo;
  138. }CHARDEVQ_ENUM_STRUCT, *PCHARDEVQ_ENUM_STRUCT, *LPCHARDEVQ_ENUM_STRUCT;
  139. typedef [switch_type(unsigned long)] union _CHARDEVQ_INFO { // for Get & Set Info
  140. [case(0)]
  141. LPCHARDEVQ_INFO_0 CharDevQInfo0;
  142. [case(1)]
  143. LPCHARDEVQ_INFO_1 CharDevQInfo1;
  144. [case(1002)]
  145. LPCHARDEVQ_INFO_1002 CharDevQInfo11002;
  146. [case(1003)]
  147. LPCHARDEVQ_INFO_1003 CharDevQInfo1003;
  148. [default]
  149. ;
  150. } CHARDEVQ_INFO, *PCHARDEVQ_INFO, *LPCHARDEVQ_INFO;
  151. //
  152. // Function Prototypes - NetrCharDevQ
  153. //
  154. NET_API_STATUS
  155. NetrCharDevQEnum (
  156. [in,string,unique] SRVSVC_HANDLE ServerName,
  157. [in,string,unique] LPTSTR UserName,
  158. [in,out] LPCHARDEVQ_ENUM_STRUCT InfoStruct,
  159. [in] DWORD PreferedMaximumLength,
  160. [out] LPDWORD TotalEntries,
  161. [in,out,unique] LPDWORD ResumeHandle
  162. );
  163. NET_API_STATUS
  164. NetrCharDevQGetInfo (
  165. [in,string,unique] SRVSVC_HANDLE ServerName,
  166. [in,string] LPTSTR QueueName,
  167. [in,string] LPTSTR UserName,
  168. [in] DWORD Level,
  169. [out, switch_is(Level)] LPCHARDEVQ_INFO InfoStruct
  170. );
  171. NET_API_STATUS
  172. NetrCharDevQSetInfo (
  173. [in,string,unique] SRVSVC_HANDLE ServerName,
  174. [in,string] LPTSTR QueueName,
  175. [in] DWORD Level,
  176. [in, switch_is(Level)] LPCHARDEVQ_INFO CharDevQInfo,
  177. [in,out,unique] LPDWORD ParmErr
  178. );
  179. NET_API_STATUS
  180. NetrCharDevQPurge (
  181. [in,string,unique] SRVSVC_HANDLE ServerName,
  182. [in,string] LPTSTR QueueName
  183. );
  184. NET_API_STATUS
  185. NetrCharDevQPurgeSelf (
  186. [in,string,unique] SRVSVC_HANDLE ServerName,
  187. [in,string] LPTSTR QueueName,
  188. [in,string] LPTSTR ComputerName
  189. );
  190. //
  191. // Connection API
  192. //
  193. //
  194. // Structures - NetrConnection
  195. //
  196. typedef struct _CONNECT_INFO_0_CONTAINER {
  197. DWORD EntriesRead;
  198. [size_is(EntriesRead)] LPCONNECTION_INFO_0 Buffer;
  199. } CONNECT_INFO_0_CONTAINER, *PCONNECT_INFO_0_CONTAINER, *LPCONNECT_INFO_0_CONTAINER;
  200. typedef struct _CONNECT_INFO_1_CONTAINER {
  201. DWORD EntriesRead;
  202. [size_is(EntriesRead)] LPCONNECTION_INFO_1 Buffer;
  203. } CONNECT_INFO_1_CONTAINER, *PCONNECT_INFO_1_CONTAINER, *LPCONNECT_INFO_1_CONTAINER;
  204. typedef struct _CONNECT_ENUM_STRUCT {
  205. DWORD Level;
  206. [switch_is(Level)] union _CONNECT_ENUM_UNION{
  207. [case(0)]
  208. CONNECT_INFO_0_CONTAINER *Level0;
  209. [case(1)]
  210. CONNECT_INFO_1_CONTAINER *Level1;
  211. [default]
  212. ;
  213. } ConnectInfo;
  214. }CONNECT_ENUM_STRUCT, *PCONNECT_ENUM_STRUCT, *LPCONNECT_ENUM_STRUCT;
  215. //
  216. // Function Prototypes - NetrConnection
  217. //
  218. NET_API_STATUS
  219. NetrConnectionEnum (
  220. [in,string,unique] SRVSVC_HANDLE ServerName,
  221. [in,string,unique] LPTSTR Qualifier,
  222. [in,out] LPCONNECT_ENUM_STRUCT InfoStruct,
  223. [in] DWORD PreferedMaximumLength,
  224. [out] LPDWORD TotalEntries,
  225. [in,out,unique] LPDWORD ResumeHandle
  226. );
  227. //
  228. // File API
  229. //
  230. //
  231. // Structures - NetrFile
  232. //
  233. typedef struct _FILE_INFO_2_CONTAINER {
  234. DWORD EntriesRead;
  235. [size_is(EntriesRead)] LPFILE_INFO_2 Buffer;
  236. } FILE_INFO_2_CONTAINER, *PFILE_INFO_2_CONTAINER, *LPFILE_INFO_2_CONTAINER;
  237. typedef struct _FILE_INFO_3_CONTAINER {
  238. DWORD EntriesRead;
  239. [size_is(EntriesRead)] LPFILE_INFO_3 Buffer;
  240. } FILE_INFO_3_CONTAINER, *PFILE_INFO_3_CONTAINER, *LPFILE_INFO_3_CONTAINER;
  241. typedef struct _FILE_ENUM_STRUCT {
  242. DWORD Level;
  243. [switch_is(Level)] union _FILE_ENUM_UNION {
  244. [case(2)]
  245. FILE_INFO_2_CONTAINER *Level2;
  246. [case(3)]
  247. FILE_INFO_3_CONTAINER *Level3;
  248. [default]
  249. ;
  250. } FileInfo;
  251. }FILE_ENUM_STRUCT, *PFILE_ENUM_STRUCT, *LPFILE_ENUM_STRUCT;
  252. typedef [switch_type(unsigned long)] union _FILE_INFO { // for Get & Set Info
  253. [case(2)]
  254. LPFILE_INFO_2 FileInfo2;
  255. [case(3)]
  256. LPFILE_INFO_3 FileInfo3;
  257. [default]
  258. ;
  259. } FILE_INFO, *PFILE_INFO, *LPFILE_INFO;
  260. //
  261. // Function Prototypes - NetrFile
  262. //
  263. NET_API_STATUS
  264. NetrFileEnum (
  265. [in,string,unique] SRVSVC_HANDLE ServerName,
  266. [in,string,unique] LPTSTR BasePath,
  267. [in,string,unique] LPTSTR UserName,
  268. [in,out] PFILE_ENUM_STRUCT InfoStruct,
  269. [in] DWORD PreferedMaximumLength,
  270. [out] LPDWORD TotalEntries,
  271. [in,out,unique] LPDWORD ResumeHandle
  272. );
  273. NET_API_STATUS
  274. NetrFileGetInfo (
  275. [in,string,unique] SRVSVC_HANDLE ServerName,
  276. [in] DWORD FileId,
  277. [in] DWORD Level,
  278. [out, switch_is(Level)] LPFILE_INFO InfoStruct
  279. );
  280. NET_API_STATUS
  281. NetrFileClose (
  282. [in,string,unique] SRVSVC_HANDLE ServerName,
  283. [in] DWORD FileId
  284. );
  285. //
  286. // Session API
  287. //
  288. //
  289. // Structures - NetrSession
  290. //
  291. typedef struct _SESSION_INFO_0_CONTAINER {
  292. DWORD EntriesRead;
  293. [size_is(EntriesRead)] LPSESSION_INFO_0 Buffer;
  294. } SESSION_INFO_0_CONTAINER, *PSESSION_INFO_0_CONTAINER, *LPSESSION_INFO_0_CONTAINER;
  295. typedef struct _SESSION_INFO_1_CONTAINER {
  296. DWORD EntriesRead;
  297. [size_is(EntriesRead)] LPSESSION_INFO_1 Buffer;
  298. } SESSION_INFO_1_CONTAINER, *PSESSION_INFO_1_CONTAINER, *LPSESSION_INFO_1_CONTAINER;
  299. typedef struct _SESSION_INFO_2_CONTAINER {
  300. DWORD EntriesRead;
  301. [size_is(EntriesRead)] LPSESSION_INFO_2 Buffer;
  302. } SESSION_INFO_2_CONTAINER, *PSESSION_INFO_2_CONTAINER, *LPSESSION_INFO_2_CONTAINER;
  303. typedef struct _SESSION_INFO_10_CONTAINER {
  304. DWORD EntriesRead;
  305. [size_is(EntriesRead)] LPSESSION_INFO_10 Buffer;
  306. } SESSION_INFO_10_CONTAINER, *PSESSION_INFO_10_CONTAINER, *LPSESSION_INFO_10_CONTAINER;
  307. typedef struct _SESSION_INFO_502_CONTAINER {
  308. DWORD EntriesRead;
  309. [size_is(EntriesRead)] LPSESSION_INFO_502 Buffer;
  310. } SESSION_INFO_502_CONTAINER, *PSESSION_INFO_502_CONTAINER, *LPSESSION_INFO_502_CONTAINER;
  311. typedef struct _SESSION_ENUM_STRUCT {
  312. DWORD Level;
  313. [switch_is(Level)] union _SESSION_ENUM_UNION {
  314. [case(0)]
  315. SESSION_INFO_0_CONTAINER *Level0;
  316. [case(1)]
  317. SESSION_INFO_1_CONTAINER *Level1;
  318. [case(2)]
  319. SESSION_INFO_2_CONTAINER *Level2;
  320. [case(10)]
  321. SESSION_INFO_10_CONTAINER *Level10;
  322. [case(502)]
  323. SESSION_INFO_502_CONTAINER *Level502;
  324. [default]
  325. ;
  326. } SessionInfo;
  327. }SESSION_ENUM_STRUCT, *PSESSION_ENUM_STRUCT, *LPSESSION_ENUM_STRUCT;
  328. //
  329. // Function Prototypes - NetrSession
  330. //
  331. NET_API_STATUS
  332. NetrSessionEnum (
  333. [in,string,unique] SRVSVC_HANDLE ServerName,
  334. [in,string,unique] LPTSTR ClientName,
  335. [in,string,unique] LPTSTR UserName,
  336. [in,out] PSESSION_ENUM_STRUCT InfoStruct,
  337. [in] DWORD PreferedMaximumLength,
  338. [out] LPDWORD TotalEntries,
  339. [in,out,unique] LPDWORD ResumeHandle
  340. );
  341. NET_API_STATUS
  342. NetrSessionDel (
  343. [in,string,unique] SRVSVC_HANDLE ServerName,
  344. [in,string,unique] LPTSTR ClientName,
  345. [in,string,unique] LPTSTR UserName
  346. );
  347. //
  348. // Share API
  349. //
  350. //
  351. // Structures - NetrShare
  352. //
  353. //
  354. // Internal 502 and 1501 structures used for passing and/or returning
  355. // self-relative security descriptors.
  356. //
  357. typedef struct _SHARE_INFO_502_I {
  358. [string] LPTSTR shi502_netname;
  359. DWORD shi502_type;
  360. [string] LPTSTR shi502_remark;
  361. DWORD shi502_permissions;
  362. DWORD shi502_max_uses;
  363. DWORD shi502_current_uses;
  364. [string] LPTSTR shi502_path;
  365. [string] LPTSTR shi502_passwd;
  366. DWORD shi502_reserved;
  367. [size_is(shi502_reserved)] PUCHAR shi502_security_descriptor;
  368. } SHARE_INFO_502_I, *PSHARE_INFO_502_I, *LPSHARE_INFO_502_I;
  369. typedef struct _SHARE_INFO_1501_I {
  370. DWORD shi1501_reserved;
  371. [size_is(shi1501_reserved)] PUCHAR shi1501_security_descriptor;
  372. } SHARE_INFO_1501_I, *PSHARE_INFO_1501_I, *LPSHARE_INFO_1501_I;
  373. //
  374. // Structures for NetShareEnum
  375. //
  376. typedef struct _SHARE_INFO_0_CONTAINER {
  377. DWORD EntriesRead;
  378. [size_is(EntriesRead)] LPSHARE_INFO_0 Buffer;
  379. } SHARE_INFO_0_CONTAINER;
  380. typedef struct _SHARE_INFO_1_CONTAINER {
  381. DWORD EntriesRead;
  382. [size_is(EntriesRead)] LPSHARE_INFO_1 Buffer;
  383. } SHARE_INFO_1_CONTAINER;
  384. typedef struct _SHARE_INFO_2_CONTAINER {
  385. DWORD EntriesRead;
  386. [size_is(EntriesRead)] LPSHARE_INFO_2 Buffer;
  387. } SHARE_INFO_2_CONTAINER, *PSHARE_INFO_2_CONTAINER, *LPSHARE_INFO_2_CONTAINER;
  388. typedef struct _SHARE_INFO_501_CONTAINER {
  389. DWORD EntriesRead;
  390. [size_is(EntriesRead)] LPSHARE_INFO_501 Buffer;
  391. } SHARE_INFO_501_CONTAINER, *PSHARE_INFO_501_CONTAINER, *LPSHARE_INFO_501_CONTAINER;
  392. typedef struct _SHARE_INFO_502_CONTAINER {
  393. DWORD EntriesRead;
  394. [size_is(EntriesRead)] LPSHARE_INFO_502_I Buffer;
  395. } SHARE_INFO_502_CONTAINER, *PSHARE_INFO_502_CONTAINER, *LPSHARE_INFO_502_CONTAINER;
  396. typedef struct _SHARE_ENUM_STRUCT {
  397. DWORD Level;
  398. [switch_is(Level)] union _SHARE_ENUM_UNION {
  399. [case(0)]
  400. SHARE_INFO_0_CONTAINER *Level0;
  401. [case(1)]
  402. SHARE_INFO_1_CONTAINER *Level1;
  403. [case(2)]
  404. SHARE_INFO_2_CONTAINER *Level2;
  405. [case(502)]
  406. SHARE_INFO_502_CONTAINER *Level502;
  407. [default]
  408. ;
  409. [case(501)]
  410. SHARE_INFO_501_CONTAINER *Level501;
  411. } ShareInfo;
  412. }SHARE_ENUM_STRUCT, *PSHARE_ENUM_STRUCT, *LPSHARE_ENUM_STRUCT;
  413. typedef [switch_type(unsigned long)] union _SHARE_INFO { // for Get & Set Info
  414. [case(0)]
  415. LPSHARE_INFO_0 ShareInfo0;
  416. [case(1)]
  417. LPSHARE_INFO_1 ShareInfo1;
  418. [case(2)]
  419. LPSHARE_INFO_2 ShareInfo2;
  420. [case(502)]
  421. LPSHARE_INFO_502_I ShareInfo502;
  422. [case(1004)]
  423. LPSHARE_INFO_1004 ShareInfo1004;
  424. [case(1006)]
  425. LPSHARE_INFO_1006 ShareInfo1006;
  426. [case(1501)]
  427. LPSHARE_INFO_1501_I ShareInfo1501;
  428. [default]
  429. ;
  430. [case(1005)]
  431. LPSHARE_INFO_1005 ShareInfo1005;
  432. [case(501)]
  433. LPSHARE_INFO_501 ShareInfo501;
  434. } SHARE_INFO, *PSHARE_INFO, *LPSHARE_INFO;
  435. //
  436. // Function Prototypes - NetrShare
  437. //
  438. NET_API_STATUS
  439. NetrShareAdd (
  440. [in,string,unique] SRVSVC_HANDLE ServerName,
  441. [in] DWORD Level,
  442. [in, switch_is(Level)] LPSHARE_INFO InfoStruct,
  443. [in,out,unique] LPDWORD ParmErr
  444. );
  445. NET_API_STATUS
  446. NetrShareEnum (
  447. [in,string,unique] SRVSVC_HANDLE ServerName,
  448. [in,out] LPSHARE_ENUM_STRUCT InfoStruct,
  449. [in] DWORD PreferedMaximumLength,
  450. [out] LPDWORD TotalEntries,
  451. [in,out,unique] LPDWORD ResumeHandle
  452. );
  453. NET_API_STATUS
  454. NetrShareGetInfo (
  455. [in,string,unique] SRVSVC_HANDLE ServerName,
  456. [in,string] LPTSTR NetName,
  457. [in] DWORD Level,
  458. [out, switch_is(Level)] LPSHARE_INFO InfoStruct
  459. );
  460. NET_API_STATUS
  461. NetrShareSetInfo (
  462. [in,string,unique] SRVSVC_HANDLE ServerName,
  463. [in,string] LPTSTR NetName,
  464. [in] DWORD Level,
  465. [in, switch_is(Level)] LPSHARE_INFO ShareInfo,
  466. [in,out,unique] LPDWORD ParmErr
  467. );
  468. NET_API_STATUS
  469. NetrShareDel (
  470. [in,string,unique] SRVSVC_HANDLE ServerName,
  471. [in,string] LPTSTR NetName,
  472. [in] DWORD Reserved
  473. );
  474. NET_API_STATUS
  475. NetrShareDelSticky (
  476. [in,string,unique] SRVSVC_HANDLE ServerName,
  477. [in,string] LPTSTR NetName,
  478. [in] DWORD Reserved
  479. );
  480. NET_API_STATUS
  481. NetrShareCheck (
  482. [in,string,unique] SRVSVC_HANDLE ServerName,
  483. [in,string] LPTSTR Device,
  484. [out] LPDWORD Type
  485. );
  486. //
  487. // Server API
  488. //
  489. //
  490. // Structures - NetrServer
  491. //
  492. typedef [switch_type(unsigned long)] union _SERVER_INFO { // For Get & Set Info
  493. [case(100)]
  494. LPSERVER_INFO_100 ServerInfo100;
  495. [case(101)]
  496. LPSERVER_INFO_101 ServerInfo101;
  497. [case(102)]
  498. LPSERVER_INFO_102 ServerInfo102;
  499. [case(402)]
  500. LPSERVER_INFO_402 ServerInfo402;
  501. [case(403)]
  502. LPSERVER_INFO_403 ServerInfo403;
  503. [case(502)]
  504. LPSERVER_INFO_502 ServerInfo502;
  505. [case(503)]
  506. LPSERVER_INFO_503 ServerInfo503;
  507. [case(599)]
  508. LPSERVER_INFO_599 ServerInfo599;
  509. [case(1005)]
  510. LPSERVER_INFO_1005 ServerInfo1005;
  511. [case(1107)]
  512. LPSERVER_INFO_1107 ServerInfo1107;
  513. [case(1010)]
  514. LPSERVER_INFO_1010 ServerInfo1010;
  515. [case(1016)]
  516. LPSERVER_INFO_1016 ServerInfo1016;
  517. [case(1017)]
  518. LPSERVER_INFO_1017 ServerInfo1017;
  519. [case(1018)]
  520. LPSERVER_INFO_1018 ServerInfo1018;
  521. [case(1501)]
  522. LPSERVER_INFO_1501 ServerInfo1501;
  523. [case(1502)]
  524. LPSERVER_INFO_1502 ServerInfo1502;
  525. [case(1503)]
  526. LPSERVER_INFO_1503 ServerInfo1503;
  527. [case(1506)]
  528. LPSERVER_INFO_1506 ServerInfo1506;
  529. [case(1509)]
  530. LPSERVER_INFO_1509 ServerInfo1509;
  531. [case(1510)]
  532. LPSERVER_INFO_1510 ServerInfo1510;
  533. [case(1511)]
  534. LPSERVER_INFO_1511 ServerInfo1511;
  535. [case(1512)]
  536. LPSERVER_INFO_1512 ServerInfo1512;
  537. [case(1513)]
  538. LPSERVER_INFO_1513 ServerInfo1513;
  539. [case(1514)]
  540. LPSERVER_INFO_1514 ServerInfo1514;
  541. [case(1515)]
  542. LPSERVER_INFO_1515 ServerInfo1515;
  543. [case(1516)]
  544. LPSERVER_INFO_1516 ServerInfo1516;
  545. [case(1518)]
  546. LPSERVER_INFO_1518 ServerInfo1518;
  547. [case(1520)]
  548. LPSERVER_INFO_1520 ServerInfo1520;
  549. [case(1521)]
  550. LPSERVER_INFO_1521 ServerInfo1521;
  551. [case(1522)]
  552. LPSERVER_INFO_1522 ServerInfo1522;
  553. [case(1523)]
  554. LPSERVER_INFO_1523 ServerInfo1523;
  555. [case(1524)]
  556. LPSERVER_INFO_1524 ServerInfo1524;
  557. [case(1525)]
  558. LPSERVER_INFO_1525 ServerInfo1525;
  559. [case(1528)]
  560. LPSERVER_INFO_1528 ServerInfo1528;
  561. [case(1529)]
  562. LPSERVER_INFO_1529 ServerInfo1529;
  563. [case(1530)]
  564. LPSERVER_INFO_1530 ServerInfo1530;
  565. [case(1533)]
  566. LPSERVER_INFO_1533 ServerInfo1533;
  567. [case(1534)]
  568. LPSERVER_INFO_1534 ServerInfo1534;
  569. [case(1535)]
  570. LPSERVER_INFO_1535 ServerInfo1535;
  571. [case(1536)]
  572. LPSERVER_INFO_1536 ServerInfo1536;
  573. [case(1537)]
  574. LPSERVER_INFO_1537 ServerInfo1537;
  575. [case(1538)]
  576. LPSERVER_INFO_1538 ServerInfo1538;
  577. [case(1539)]
  578. LPSERVER_INFO_1539 ServerInfo1539;
  579. [case(1540)]
  580. LPSERVER_INFO_1540 ServerInfo1540;
  581. [case(1541)]
  582. LPSERVER_INFO_1541 ServerInfo1541;
  583. [case(1542)]
  584. LPSERVER_INFO_1542 ServerInfo1542;
  585. [case(1543)]
  586. LPSERVER_INFO_1543 ServerInfo1543;
  587. [case(1544)]
  588. LPSERVER_INFO_1544 ServerInfo1544;
  589. [case(1545)]
  590. LPSERVER_INFO_1545 ServerInfo1545;
  591. [case(1546)]
  592. LPSERVER_INFO_1546 ServerInfo1546;
  593. [case(1547)]
  594. LPSERVER_INFO_1547 ServerInfo1547;
  595. [case(1548)]
  596. LPSERVER_INFO_1548 ServerInfo1548;
  597. [case(1549)]
  598. LPSERVER_INFO_1549 ServerInfo1549;
  599. [case(1550)]
  600. LPSERVER_INFO_1550 ServerInfo1550;
  601. [case(1552)]
  602. LPSERVER_INFO_1552 ServerInfo1552;
  603. [case(1553)]
  604. LPSERVER_INFO_1553 ServerInfo1553;
  605. [case(1554)]
  606. LPSERVER_INFO_1554 ServerInfo1554;
  607. [case(1555)]
  608. LPSERVER_INFO_1555 ServerInfo1555;
  609. [case(1556)]
  610. LPSERVER_INFO_1556 ServerInfo1556;
  611. [default]
  612. ;
  613. } SERVER_INFO, *PSERVER_INFO, *LPSERVER_INFO;
  614. //
  615. // DiskEnum
  616. //
  617. // NOTE: The buffer pointer is supposed to point to an array of strings.
  618. // each string is fixed size with two characters followed by a NUL.
  619. // A:\0B:\0c:\0\0
  620. typedef struct _DISK_INFO {
  621. [string] TCHAR Disk[3];
  622. } DISK_INFO, *PDISK_INFO, *LPDISK_INFO;
  623. typedef struct _DISK_ENUM_CONTAINER {
  624. DWORD EntriesRead;
  625. [size_is(EntriesRead), length_is(EntriesRead)] LPDISK_INFO Buffer;
  626. } DISK_ENUM_CONTAINER;
  627. //
  628. // Function Prototypes - NetrServer
  629. //
  630. NET_API_STATUS
  631. NetrServerGetInfo (
  632. [in,string,unique] SRVSVC_HANDLE ServerName,
  633. [in] DWORD Level,
  634. [out, switch_is(Level)] LPSERVER_INFO InfoStruct
  635. );
  636. NET_API_STATUS
  637. NetrServerSetInfo (
  638. [in,string,unique] SRVSVC_HANDLE ServerName,
  639. [in] DWORD Level,
  640. [in, switch_is(Level)] LPSERVER_INFO ServerInfo,
  641. [in,out,unique] LPDWORD ParmErr
  642. );
  643. NET_API_STATUS
  644. NetrServerDiskEnum (
  645. [in,string,unique] SRVSVC_HANDLE ServerName,
  646. [in] DWORD Level,
  647. [in,out] DISK_ENUM_CONTAINER *DiskInfoStruct,
  648. [in] DWORD PreferredMaximumLength,
  649. [out] LPDWORD TotalEntries,
  650. [in,out,unique] LPDWORD ResumeHandle
  651. );
  652. //
  653. // Function Prototype - NetrServerStatisticsGet
  654. //
  655. NET_API_STATUS
  656. NetrServerStatisticsGet (
  657. [in,string,unique] SRVSVC_HANDLE ServerName,
  658. [in,string,unique] LPTSTR Service,
  659. [in] DWORD Level,
  660. [in] DWORD Options,
  661. [out] LPSTAT_SERVER_0 *InfoStruct
  662. );
  663. //
  664. // Server Transport API
  665. //
  666. //
  667. // Structures - NetrServerTransport
  668. //
  669. typedef struct _SERVER_XPORT_INFO_0_CONTAINER {
  670. DWORD EntriesRead;
  671. [size_is(EntriesRead)] LPSERVER_TRANSPORT_INFO_0 Buffer;
  672. } SERVER_XPORT_INFO_0_CONTAINER, *PSERVER_XPORT_INFO_0_CONTAINER;
  673. typedef struct _SERVER_XPORT_INFO_1_CONTAINER {
  674. DWORD EntriesRead;
  675. [size_is(EntriesRead)] LPSERVER_TRANSPORT_INFO_1 Buffer;
  676. } SERVER_XPORT_INFO_1_CONTAINER, *PSERVER_XPORT_INFO_1_CONTAINER;
  677. typedef struct _SERVER_XPORT_INFO_2_CONTAINER {
  678. DWORD EntriesRead;
  679. [size_is(EntriesRead)] LPSERVER_TRANSPORT_INFO_2 Buffer;
  680. } SERVER_XPORT_INFO_2_CONTAINER, *PSERVER_XPORT_INFO_2_CONTAINER;
  681. typedef struct _SERVER_XPORT_INFO_3_CONTAINER {
  682. DWORD EntriesRead;
  683. [size_is(EntriesRead)] LPSERVER_TRANSPORT_INFO_3 Buffer;
  684. } SERVER_XPORT_INFO_3_CONTAINER, *PSERVER_XPORT_INFO_3_CONTAINER;
  685. typedef [switch_type(unsigned long)] union _TRANSPORT_INFO { // for Add and Del
  686. [case(0)]
  687. SERVER_TRANSPORT_INFO_0 Transport0;
  688. [case(1)]
  689. SERVER_TRANSPORT_INFO_1 Transport1;
  690. [case(2)]
  691. SERVER_TRANSPORT_INFO_2 Transport2;
  692. [case(3)]
  693. SERVER_TRANSPORT_INFO_3 Transport3;
  694. [default]
  695. ;
  696. } TRANSPORT_INFO, *PTRANSPORT_INFO, *LPTRANSPORT_INFO;
  697. typedef struct _SERVER_XPORT_ENUM_STRUCT {
  698. DWORD Level;
  699. [switch_is(Level)] union _SERVER_XPORT_ENUM_UNION {
  700. [case(0)]
  701. PSERVER_XPORT_INFO_0_CONTAINER Level0;
  702. [case(1)]
  703. PSERVER_XPORT_INFO_1_CONTAINER Level1;
  704. [case(2)]
  705. PSERVER_XPORT_INFO_2_CONTAINER Level2;
  706. [case(3)]
  707. PSERVER_XPORT_INFO_3_CONTAINER Level3;
  708. [default]
  709. ;
  710. } XportInfo;
  711. } SERVER_XPORT_ENUM_STRUCT, *PSERVER_XPORT_ENUM_STRUCT, *LPSERVER_XPORT_ENUM_STRUCT;
  712. //
  713. // Function Prototypes - NetrServerTransport
  714. //
  715. NET_API_STATUS
  716. NetrServerTransportAdd (
  717. [in,string,unique] SRVSVC_HANDLE ServerName,
  718. [in] DWORD Level,
  719. [in] LPSERVER_TRANSPORT_INFO_0 Buffer
  720. );
  721. NET_API_STATUS
  722. NetrServerTransportEnum (
  723. [in,string,unique] SRVSVC_HANDLE ServerName,
  724. [in,out] LPSERVER_XPORT_ENUM_STRUCT InfoStruct,
  725. [in] DWORD PreferedMaximumLength,
  726. [out] LPDWORD TotalEntries,
  727. [in,out,unique] LPDWORD ResumeHandle
  728. );
  729. NET_API_STATUS
  730. NetrServerTransportDel (
  731. [in,string,unique] SRVSVC_HANDLE ServerName,
  732. [in] DWORD Level,
  733. [in] LPSERVER_TRANSPORT_INFO_0 Buffer
  734. );
  735. //
  736. // Function Prototype - NetrRemoteTOD
  737. //
  738. NET_API_STATUS
  739. NetrRemoteTOD (
  740. [in,string,unique] SRVSVC_HANDLE ServerName,
  741. [out] LPTIME_OF_DAY_INFO *BufferPtr
  742. );
  743. //
  744. // Function Prototype - I_NetrServerSetServiceBits (internal API)
  745. //
  746. NET_API_STATUS
  747. I_NetrServerSetServiceBits (
  748. [in,string,unique] SRVSVC_HANDLE ServerName,
  749. [in,string,unique] LPTSTR TransportName,
  750. [in] DWORD ServiceBits,
  751. [in] DWORD UpdateImmediately
  752. );
  753. //
  754. // Function Prototypes - Canonicalization functions
  755. //
  756. NET_API_STATUS
  757. NetprPathType(
  758. [in,string,unique] SRVSVC_HANDLE ServerName,
  759. [in,string] LPTSTR PathName,
  760. [out] LPDWORD PathType,
  761. [in] DWORD Flags
  762. );
  763. NET_API_STATUS
  764. NetprPathCanonicalize(
  765. [in,string,unique] SRVSVC_HANDLE ServerName,
  766. [in,string] LPTSTR PathName,
  767. [out,size_is(OutbufLen)] LPBYTE Outbuf,
  768. [in,range(0, 64000)] DWORD OutbufLen,
  769. [in,string] LPTSTR Prefix,
  770. [in,out] LPDWORD PathType,
  771. [in] DWORD Flags
  772. );
  773. LONG
  774. NetprPathCompare(
  775. [in,string,unique] SRVSVC_HANDLE ServerName,
  776. [in,string] LPTSTR PathName1,
  777. [in,string] LPTSTR PathName2,
  778. [in] DWORD PathType,
  779. [in] DWORD Flags
  780. );
  781. NET_API_STATUS
  782. NetprNameValidate(
  783. [in,string,unique] SRVSVC_HANDLE ServerName,
  784. [in,string] LPTSTR Name,
  785. [in] DWORD NameType,
  786. [in] DWORD Flags
  787. );
  788. NET_API_STATUS
  789. NetprNameCanonicalize(
  790. [in,string,unique] SRVSVC_HANDLE ServerName,
  791. [in,string] LPTSTR Name,
  792. [out,size_is(OutbufLen)] LPTSTR Outbuf,
  793. [in,range(0, 64000)] DWORD OutbufLen,
  794. [in] DWORD NameType,
  795. [in] DWORD Flags
  796. );
  797. LONG
  798. NetprNameCompare(
  799. [in,string,unique] SRVSVC_HANDLE ServerName,
  800. [in,string] LPTSTR Name1,
  801. [in,string] LPTSTR Name2,
  802. [in] DWORD NameType,
  803. [in] DWORD Flags
  804. );
  805. NET_API_STATUS
  806. NetrShareEnumSticky (
  807. [in,string,unique] SRVSVC_HANDLE ServerName,
  808. [in,out] LPSHARE_ENUM_STRUCT InfoStruct,
  809. [in] DWORD PreferedMaximumLength,
  810. [out] LPDWORD TotalEntries,
  811. [in,out,unique] LPDWORD ResumeHandle
  812. );
  813. //
  814. // Two-phase share deletion used to delete IPC$
  815. //
  816. typedef [context_handle] void *SHARE_DEL_HANDLE;
  817. typedef SHARE_DEL_HANDLE *PSHARE_DEL_HANDLE;
  818. NET_API_STATUS
  819. NetrShareDelStart (
  820. [in,string,unique] SRVSVC_HANDLE ServerName,
  821. [in,string] LPTSTR NetName,
  822. [in] DWORD Reserved,
  823. [out] PSHARE_DEL_HANDLE ContextHandle
  824. );
  825. NET_API_STATUS
  826. NetrShareDelCommit (
  827. [in, out] PSHARE_DEL_HANDLE ContextHandle
  828. );
  829. //
  830. // AdminTools types and functions
  831. //
  832. typedef struct _ADT_SECURITY_DESCRIPTOR {
  833. DWORD Length;
  834. [size_is(Length)] LPBYTE Buffer;
  835. } ADT_SECURITY_DESCRIPTOR, *PADT_SECURITY_DESCRIPTOR;
  836. DWORD
  837. NetrpGetFileSecurity (
  838. [in,string,unique] SRVSVC_HANDLE ServerName,
  839. [in,string,unique] LPWSTR ShareName,
  840. [in,string] LPWSTR lpFileName,
  841. [in] SECURITY_INFORMATION RequestedInformation,
  842. [out] PADT_SECURITY_DESCRIPTOR *SecurityDescriptor
  843. );
  844. DWORD
  845. NetrpSetFileSecurity (
  846. [in,string,unique] SRVSVC_HANDLE ServerName,
  847. [in,string,unique] LPWSTR ShareName,
  848. [in,string] LPWSTR lpFileName,
  849. [in] SECURITY_INFORMATION SecurityInformation,
  850. [in] PADT_SECURITY_DESCRIPTOR SecurityDescriptor
  851. );
  852. NET_API_STATUS
  853. NetrServerTransportAddEx (
  854. [in,string,unique] SRVSVC_HANDLE ServerName,
  855. [in] DWORD Level,
  856. [in, switch_is(Level)] LPTRANSPORT_INFO Buffer
  857. );
  858. NET_API_STATUS
  859. I_NetrServerSetServiceBitsEx (
  860. [in,string,unique] SRVSVC_HANDLE ServerName,
  861. [in,string,unique] LPWSTR EmulatedServerName,
  862. [in,string,unique] LPTSTR TransportName,
  863. [in] DWORD ServiceBitsOfInterest,
  864. [in] DWORD ServiceBits,
  865. [in] DWORD UpdateImmediately
  866. );
  867. //
  868. // Definitions for DFS operations
  869. //
  870. NET_API_STATUS NET_API_FUNCTION
  871. NetrDfsGetVersion(
  872. [in,string,unique] SRVSVC_HANDLE ServerName,
  873. [out] LPDWORD Version
  874. );
  875. NET_API_STATUS NET_API_FUNCTION
  876. NetrDfsCreateLocalPartition (
  877. [in,string,unique] SRVSVC_HANDLE ServerName,
  878. [in,string] LPWSTR ShareName,
  879. [in] LPGUID EntryUid, // unique id for this partition
  880. [in,string] LPWSTR EntryPrefix, // path prefix for this partition
  881. [in,string] LPWSTR ShortName, // 8.3 format of EntryPrefix
  882. [in] LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,
  883. [in] BOOL Force
  884. );
  885. NET_API_STATUS NET_API_FUNCTION
  886. NetrDfsDeleteLocalPartition (
  887. [in,string,unique] SRVSVC_HANDLE ServerName,
  888. [in] LPGUID Uid,
  889. [in,string] LPWSTR Prefix
  890. );
  891. NET_API_STATUS NET_API_FUNCTION
  892. NetrDfsSetLocalVolumeState (
  893. [in,string,unique] SRVSVC_HANDLE ServerName,
  894. [in] LPGUID Uid,
  895. [in,string] LPWSTR Prefix,
  896. [in] ULONG State
  897. );
  898. NET_API_STATUS NET_API_FUNCTION
  899. NetrDfsSetServerInfo (
  900. [in,string,unique] SRVSVC_HANDLE ServerName,
  901. [in] LPGUID Uid,
  902. [in,string] LPWSTR Prefix
  903. );
  904. NET_API_STATUS NET_API_FUNCTION
  905. NetrDfsCreateExitPoint (
  906. [in,string,unique] SRVSVC_HANDLE ServerName,
  907. [in] LPGUID Uid,
  908. [in,string] LPWSTR Prefix,
  909. [in] ULONG Type,
  910. [in, range(0,32) ] DWORD ShortPrefixLen,
  911. [out,size_is(ShortPrefixLen)] LPWSTR ShortPrefix
  912. );
  913. NET_API_STATUS NET_API_FUNCTION
  914. NetrDfsDeleteExitPoint (
  915. [in,string,unique] SRVSVC_HANDLE ServerName,
  916. [in] LPGUID Uid,
  917. [in,string] LPWSTR Prefix,
  918. [in] ULONG Type
  919. );
  920. NET_API_STATUS NET_API_FUNCTION
  921. NetrDfsModifyPrefix (
  922. [in,string,unique] SRVSVC_HANDLE ServerName,
  923. [in] LPGUID Uid,
  924. [in,string] LPWSTR Prefix
  925. );
  926. NET_API_STATUS NET_API_FUNCTION
  927. NetrDfsFixLocalVolume (
  928. [in,string,unique] SRVSVC_HANDLE ServerName,
  929. [in,string] LPWSTR VolumeName,
  930. [in] ULONG EntryType,
  931. [in] ULONG ServiceType,
  932. [in,string] LPWSTR StgId,
  933. [in] LPGUID EntryUid, // unique id for this partition
  934. [in,string] LPWSTR EntryPrefix, // path prefix for this partition
  935. [in] LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,
  936. [in] ULONG CreateDisposition
  937. );
  938. NET_API_STATUS NET_API_FUNCTION
  939. NetrDfsManagerReportSiteInfo (
  940. [in,string,unique] SRVSVC_HANDLE ServerName,
  941. [in,out,unique] LPDFS_SITELIST_INFO *ppSiteInfo
  942. );
  943. NET_API_STATUS
  944. NetrServerTransportDelEx (
  945. [in,string,unique] SRVSVC_HANDLE ServerName,
  946. [in] DWORD Level,
  947. [in, switch_is(Level)] LPTRANSPORT_INFO Buffer
  948. );
  949. }