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.

1034 lines
21 KiB

  1. /*++
  2. Copyright (c) 1994-95 Microsoft Corporation
  3. Module Name:
  4. llsapi.h
  5. Abstract:
  6. License logging server's RPC API's.
  7. Author:
  8. Arthur Hanson (arth) 21-Mar-1995
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #ifndef _LLSAPI_H
  14. #define _LLSAPI_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #define LLS_FLAG_LICENSED 0x0001
  19. #define LLS_FLAG_UPDATE 0x0002
  20. #define LLS_FLAG_SUITE_USE 0x0004
  21. #define LLS_FLAG_SUITE_AUTO 0x0008
  22. #define LLS_FLAG_PRODUCT_PERSEAT 0x0010
  23. #define LLS_FLAG_PRODUCT_SWITCH 0x0020
  24. #define LLS_FLAG_DELETED 0x1000
  25. typedef PVOID LLS_HANDLE, *PLLS_HANDLE;
  26. typedef struct _LLS_LICENSE_INFO_0 {
  27. LPTSTR Product;
  28. LONG Quantity;
  29. DWORD Date;
  30. LPTSTR Admin;
  31. LPTSTR Comment;
  32. } LLS_LICENSE_INFO_0, *PLLS_LICENSE_INFO_0;
  33. typedef struct _LLS_PRODUCT_INFO_0 {
  34. LPTSTR Product;
  35. } LLS_PRODUCT_INFO_0, *PLLS_PRODUCT_INFO_0;
  36. typedef struct _LLS_PRODUCT_INFO_1 {
  37. LPTSTR Product;
  38. ULONG Purchased;
  39. ULONG InUse;
  40. ULONG ConcurrentTotal;
  41. ULONG HighMark;
  42. } LLS_PRODUCT_INFO_1, *PLLS_PRODUCT_INFO_1;
  43. typedef struct _LLS_PRODUCT_USER_INFO_0 {
  44. LPTSTR User;
  45. } LLS_PRODUCT_USER_INFO_0, *PLLS_PRODUCT_USER_INFO_0;
  46. typedef struct _LLS_PRODUCT_USER_INFO_1 {
  47. LPTSTR User;
  48. DWORD Flags;
  49. DWORD LastUsed;
  50. ULONG UsageCount;
  51. } LLS_PRODUCT_USER_INFO_1, *PLLS_PRODUCT_USER_INFO_1;
  52. typedef struct _LLS_PRODUCT_LICENSE_INFO_0 {
  53. LONG Quantity;
  54. DWORD Date;
  55. LPTSTR Admin;
  56. LPTSTR Comment;
  57. } LLS_PRODUCT_LICENSE_INFO_0, *PLLS_PRODUCT_LICENSE_INFO_0;
  58. typedef struct _LLS_USER_INFO_0 {
  59. LPTSTR Name;
  60. } LLS_USER_INFO_0, *PLLS_USER_INFO_0;
  61. typedef struct _LLS_USER_INFO_1 {
  62. LPTSTR Name;
  63. DWORD Flags;
  64. LPTSTR Group;
  65. ULONG Licensed;
  66. ULONG UnLicensed;
  67. } LLS_USER_INFO_1, *PLLS_USER_INFO_1;
  68. typedef struct _LLS_USER_INFO_2 {
  69. LPTSTR Name;
  70. DWORD Flags;
  71. LPTSTR Group;
  72. ULONG Licensed;
  73. ULONG UnLicensed;
  74. LPTSTR Products;
  75. } LLS_USER_INFO_2, *PLLS_USER_INFO_2;
  76. typedef struct _LLS_USER_PRODUCT_INFO_0 {
  77. LPTSTR Product;
  78. } LLS_USER_PRODUCT_INFO_0, *PLLS_USER_PRODUCT_INFO_0;
  79. typedef struct _LLS_USER_PRODUCT_INFO_1 {
  80. LPTSTR Product;
  81. DWORD Flags;
  82. DWORD LastUsed;
  83. ULONG UsageCount;
  84. } LLS_USER_PRODUCT_INFO_1, *PLLS_USER_PRODUCT_INFO_1;
  85. typedef struct _LLS_GROUP_INFO_0 {
  86. LPTSTR Name;
  87. } LLS_GROUP_INFO_0, *PLLS_GROUP_INFO_0;
  88. typedef struct _LLS_GROUP_INFO_1 {
  89. LPTSTR Name;
  90. LPTSTR Comment;
  91. ULONG Licenses;
  92. } LLS_GROUP_INFO_1, *PLLS_GROUP_INFO_1;
  93. #define LLS_REPLICATION_TYPE_DELTA 0
  94. #define LLS_REPLICATION_TYPE_TIME 1
  95. #define LLS_MODE_LICENSE_SERVER 0
  96. #define LLS_MODE_PDC 1
  97. #define LLS_MODE_ENTERPRISE_SERVER 2
  98. typedef struct _LLS_SERVICE_INFO_0 {
  99. DWORD Version;
  100. DWORD TimeStarted;
  101. DWORD Mode;
  102. LPTSTR ReplicateTo;
  103. LPTSTR EnterpriseServer;
  104. DWORD ReplicationType;
  105. DWORD ReplicationTime;
  106. DWORD UseEnterprise;
  107. DWORD LastReplicated;
  108. } LLS_SERVICE_INFO_0, *PLLS_SERVICE_INFO_0;
  109. typedef struct _LLS_CONNECT_INFO_0 {
  110. LPTSTR Domain;
  111. LPTSTR EnterpriseServer;
  112. } LLS_CONNECT_INFO_0, *PLLS_CONNECT_INFO_0;
  113. typedef struct _LLS_SERVER_PRODUCT_INFO_0 {
  114. LPTSTR Name;
  115. } LLS_SERVER_PRODUCT_INFO_0, *PLLS_SERVER_PRODUCT_INFO_0;
  116. typedef struct _LLS_SERVER_PRODUCT_INFO_1 {
  117. LPTSTR Name;
  118. DWORD Flags;
  119. ULONG MaxUses;
  120. ULONG MaxSetUses;
  121. ULONG HighMark;
  122. } LLS_SERVER_PRODUCT_INFO_1, *PLLS_SERVER_PRODUCT_INFO_1;
  123. typedef struct _LLS_SERVER_INFO_0 {
  124. LPTSTR Name;
  125. } LLS_SERVER_INFO_0, *PLLS_SERVER_INFO_0;
  126. #ifndef NO_LLS_APIS
  127. //
  128. // Connection control API's
  129. //
  130. NTSTATUS
  131. NTAPI
  132. LlsConnectW(
  133. IN LPWSTR Server,
  134. OUT PLLS_HANDLE Handle
  135. );
  136. NTSTATUS
  137. NTAPI
  138. LlsConnectA(
  139. IN LPSTR Server,
  140. OUT PLLS_HANDLE Handle
  141. );
  142. #ifdef UNICODE
  143. #define LlsConnect LlsConnectW
  144. #else
  145. #define LlsConnect LlsConnectA
  146. #endif
  147. NTSTATUS
  148. NTAPI
  149. LlsConnectEnterpriseW(
  150. IN LPWSTR Focus,
  151. OUT PLLS_HANDLE Handle,
  152. IN DWORD Level,
  153. OUT LPBYTE *bufptr
  154. );
  155. NTSTATUS
  156. NTAPI
  157. LlsConnectEnterpriseA(
  158. IN LPSTR Focus,
  159. OUT PLLS_HANDLE Handle,
  160. IN DWORD Level,
  161. OUT LPBYTE *bufptr
  162. );
  163. #ifdef UNICODE
  164. #define LlsConnectEnterprise LlsConnectEnterpriseW
  165. #else
  166. #define LlsConnectEnterprise LlsConnectEnterpriseA
  167. #endif
  168. NTSTATUS
  169. NTAPI
  170. LlsClose(
  171. IN LLS_HANDLE Handle
  172. );
  173. NTSTATUS
  174. NTAPI
  175. LlsFreeMemory(
  176. IN PVOID bufptr
  177. );
  178. NTSTATUS
  179. NTAPI
  180. LlsEnterpriseServerFindW(
  181. IN LPWSTR Focus,
  182. IN DWORD Level,
  183. OUT LPBYTE *bufptr
  184. );
  185. NTSTATUS
  186. NTAPI
  187. LlsEnterpriseServerFindA(
  188. IN LPSTR Focus,
  189. IN DWORD Level,
  190. OUT LPBYTE *bufptr
  191. );
  192. #ifdef UNICODE
  193. #define LlsEnterpriseServerFind LlsEnterpriseServerFindW
  194. #else
  195. #define LlsEnterpriseServerFind LlsEnterpriseServerFindA
  196. #endif
  197. //
  198. // License control API's
  199. //
  200. // Enum purchase history of licenses for all products.
  201. NTSTATUS
  202. NTAPI
  203. LlsLicenseEnumW(
  204. IN LLS_HANDLE Handle,
  205. IN DWORD Level, // Level 0 supported
  206. OUT LPBYTE* bufptr,
  207. IN DWORD prefmaxlen,
  208. OUT LPDWORD EntriesRead,
  209. OUT LPDWORD TotalEntries,
  210. IN OUT LPDWORD ResumeHandle
  211. );
  212. NTSTATUS
  213. NTAPI
  214. LlsLicenseEnumA(
  215. IN LLS_HANDLE Handle,
  216. IN DWORD Level, // Level 0 supported
  217. OUT LPBYTE* bufptr,
  218. IN DWORD prefmaxlen,
  219. OUT LPDWORD EntriesRead,
  220. OUT LPDWORD TotalEntries,
  221. IN OUT LPDWORD ResumeHandle
  222. );
  223. #ifdef UNICODE
  224. #define LlsLicenseEnum LlsLicenseEnumW
  225. #else
  226. #define LlsLicenseEnum LlsLicenseEnumA
  227. #endif
  228. // Add purchase of license for a product.
  229. NTSTATUS
  230. NTAPI
  231. LlsLicenseAddW(
  232. IN LLS_HANDLE Handle,
  233. IN DWORD Level, // Level 0 supported
  234. IN LPBYTE bufptr
  235. );
  236. NTSTATUS
  237. NTAPI
  238. LlsLicenseAddA(
  239. IN LLS_HANDLE Handle,
  240. IN DWORD Level, // Level 0 supported
  241. IN LPBYTE bufptr
  242. );
  243. #ifdef UNICODE
  244. #define LlsLicenseAdd LlsLicenseAddW
  245. #else
  246. #define LlsLicenseAdd LlsLicenseAddA
  247. #endif
  248. //
  249. // Product control API's
  250. //
  251. // Product is SQL, BackOffice, Exchange, Etc. (Even though BackOffice isn't
  252. // a product - we count it like one to keep things simplistic.
  253. //
  254. // Enum all products with purchase and InUse info.
  255. NTSTATUS
  256. NTAPI
  257. LlsProductEnumW(
  258. IN LLS_HANDLE Handle,
  259. IN DWORD Level, // Levels 0,1 supported
  260. OUT LPBYTE* bufptr,
  261. IN DWORD prefmaxlen,
  262. OUT LPDWORD EntriesRead,
  263. OUT LPDWORD TotalEntries,
  264. IN OUT LPDWORD ResumeHandle
  265. );
  266. NTSTATUS
  267. NTAPI
  268. LlsProductEnumA(
  269. IN LLS_HANDLE Handle,
  270. IN DWORD Level, // Levels 0,1 supported
  271. OUT LPBYTE* bufptr,
  272. IN DWORD prefmaxlen,
  273. OUT LPDWORD EntriesRead,
  274. OUT LPDWORD TotalEntries,
  275. IN OUT LPDWORD ResumeHandle
  276. );
  277. #ifdef UNICODE
  278. #define LlsProductEnum LlsProductEnumW
  279. #else
  280. #define LlsProductEnum LlsProductEnumA
  281. #endif
  282. // Add purchase of license for a product.
  283. NTSTATUS
  284. NTAPI
  285. LlsProductAddW(
  286. IN LLS_HANDLE Handle,
  287. IN LPWSTR ProductFamily,
  288. IN LPWSTR Product,
  289. IN LPWSTR Version
  290. );
  291. NTSTATUS
  292. NTAPI
  293. LlsProductAddA(
  294. IN LLS_HANDLE Handle,
  295. IN LPSTR ProductFamily,
  296. IN LPSTR Product,
  297. IN LPSTR Version
  298. );
  299. #ifdef UNICODE
  300. #define LlsProductAdd LlsProductAddW
  301. #else
  302. #define LlsProductAdd LlsProductAddA
  303. #endif
  304. // For a particular product enum all users.
  305. NTSTATUS
  306. NTAPI
  307. LlsProductUserEnumW(
  308. IN LLS_HANDLE Handle,
  309. IN LPWSTR Product,
  310. IN DWORD Level, // Levels 0,1 supported
  311. OUT LPBYTE* bufptr,
  312. IN DWORD prefmaxlen,
  313. OUT LPDWORD EntriesRead,
  314. OUT LPDWORD TotalEntries,
  315. IN OUT LPDWORD ResumeHandle
  316. );
  317. NTSTATUS
  318. NTAPI
  319. LlsProductUserEnumA(
  320. IN LLS_HANDLE Handle,
  321. IN LPSTR Product,
  322. IN DWORD Level, // Levels 0,1 supported
  323. OUT LPBYTE* bufptr,
  324. IN DWORD prefmaxlen,
  325. OUT LPDWORD EntriesRead,
  326. OUT LPDWORD TotalEntries,
  327. IN OUT LPDWORD ResumeHandle
  328. );
  329. #ifdef UNICODE
  330. #define LlsProductUserEnum LlsProductUserEnumW
  331. #else
  332. #define LlsProductUserEnum LlsProductUserEnumA
  333. #endif
  334. // For a particular product enum all license purchases.
  335. NTSTATUS
  336. NTAPI
  337. LlsProductLicenseEnumW(
  338. IN LLS_HANDLE Handle,
  339. IN LPWSTR Product,
  340. IN DWORD Level, // Level 0 supported
  341. OUT LPBYTE* bufptr,
  342. IN DWORD prefmaxlen,
  343. OUT LPDWORD EntriesRead,
  344. OUT LPDWORD TotalEntries,
  345. IN OUT LPDWORD ResumeHandle
  346. );
  347. NTSTATUS
  348. NTAPI
  349. LlsProductLicenseEnumA(
  350. IN LLS_HANDLE Handle,
  351. IN LPSTR Product,
  352. IN DWORD Level, // Level 0 supported
  353. OUT LPBYTE* bufptr,
  354. IN DWORD prefmaxlen,
  355. OUT LPDWORD EntriesRead,
  356. OUT LPDWORD TotalEntries,
  357. IN OUT LPDWORD ResumeHandle
  358. );
  359. #ifdef UNICODE
  360. #define LlsProductLicenseEnum LlsProductLicenseEnumW
  361. #else
  362. #define LlsProductLicenseEnum LlsProductLicenseEnumA
  363. #endif
  364. // For given product enum all servers with concurrent limits
  365. NTSTATUS
  366. NTAPI
  367. LlsProductServerEnumW(
  368. IN LLS_HANDLE Handle,
  369. IN LPWSTR Product,
  370. IN DWORD Level, // Levels 0,1 supported
  371. OUT LPBYTE* bufptr,
  372. IN DWORD prefmaxlen,
  373. OUT LPDWORD EntriesRead,
  374. OUT LPDWORD TotalEntries,
  375. IN OUT LPDWORD ResumeHandle
  376. );
  377. NTSTATUS
  378. NTAPI
  379. LlsProductServerEnumA(
  380. IN LLS_HANDLE Handle,
  381. IN LPSTR Product,
  382. IN DWORD Level, // Levels 0,1 supported
  383. OUT LPBYTE* bufptr,
  384. IN DWORD prefmaxlen,
  385. OUT LPDWORD EntriesRead,
  386. OUT LPDWORD TotalEntries,
  387. IN OUT LPDWORD ResumeHandle
  388. );
  389. #ifdef UNICODE
  390. #define LlsProductServerEnum LlsProductServerEnumW
  391. #else
  392. #define LlsProductServerEnum LlsProductServerEnumA
  393. #endif
  394. //
  395. // User control API's
  396. // A user can be a mapped user or a normal user
  397. //
  398. // Enums all users
  399. NTSTATUS
  400. NTAPI
  401. LlsUserEnumW(
  402. IN LLS_HANDLE Handle,
  403. IN DWORD Level, // Levels 0,1 supported
  404. OUT LPBYTE* bufptr,
  405. IN DWORD prefmaxlen,
  406. OUT LPDWORD EntriesRead,
  407. OUT LPDWORD TotalEntries,
  408. IN OUT LPDWORD ResumeHandle
  409. );
  410. NTSTATUS
  411. NTAPI
  412. LlsUserEnumA(
  413. IN LLS_HANDLE Handle,
  414. IN DWORD Level, // Levels 0,1 supported
  415. OUT LPBYTE* bufptr,
  416. IN DWORD prefmaxlen,
  417. OUT LPDWORD EntriesRead,
  418. OUT LPDWORD TotalEntries,
  419. IN OUT LPDWORD ResumeHandle
  420. );
  421. #ifdef UNICODE
  422. #define LlsUserEnum LlsUserEnumW
  423. #else
  424. #define LlsUserEnum LlsUserEnumA
  425. #endif
  426. // Info is Group and whether to force back-office license
  427. NTSTATUS
  428. NTAPI
  429. LlsUserInfoGetW(
  430. IN LLS_HANDLE Handle,
  431. IN LPWSTR User,
  432. IN DWORD Level, // Level 1 supported
  433. OUT LPBYTE* bufptr
  434. );
  435. NTSTATUS
  436. NTAPI
  437. LlsUserInfoGetA(
  438. IN LLS_HANDLE Handle,
  439. IN LPSTR User,
  440. IN DWORD Level, // Level 1 supported
  441. OUT LPBYTE* bufptr
  442. );
  443. #ifdef UNICODE
  444. #define LlsUserInfoGet LlsUserInfoGetW
  445. #else
  446. #define LlsUserInfoGet LlsUserInfoGetA
  447. #endif
  448. NTSTATUS
  449. NTAPI
  450. LlsUserInfoSetW(
  451. IN LLS_HANDLE Handle,
  452. IN LPWSTR User,
  453. IN DWORD Level,
  454. IN LPBYTE bufptr // Level 1 supported
  455. );
  456. NTSTATUS
  457. NTAPI
  458. LlsUserInfoSetA(
  459. IN LLS_HANDLE Handle,
  460. IN LPSTR User,
  461. IN DWORD Level,
  462. IN LPBYTE bufptr // Level 1 supported
  463. );
  464. #ifdef UNICODE
  465. #define LlsUserInfoSet LlsUserInfoSetW
  466. #else
  467. #define LlsUserInfoSet LlsUserInfoSetA
  468. #endif
  469. NTSTATUS
  470. NTAPI
  471. LlsUserDeleteW(
  472. IN LLS_HANDLE Handle,
  473. IN LPWSTR User
  474. );
  475. NTSTATUS
  476. NTAPI
  477. LlsUserDeleteA(
  478. IN LLS_HANDLE Handle,
  479. IN LPSTR User
  480. );
  481. #ifdef UNICODE
  482. #define LlsUserDelete LlsUserDeleteW
  483. #else
  484. #define LlsUserDelete LlsUserDeleteA
  485. #endif
  486. // For a given user enums all license useages
  487. NTSTATUS
  488. NTAPI
  489. LlsUserProductEnumW(
  490. IN LLS_HANDLE Handle,
  491. IN LPWSTR User,
  492. IN DWORD Level, // Levels 0,1 supported
  493. OUT LPBYTE* bufptr,
  494. IN DWORD prefmaxlen,
  495. OUT LPDWORD EntriesRead,
  496. OUT LPDWORD TotalEntries,
  497. IN OUT LPDWORD ResumeHandle
  498. );
  499. NTSTATUS
  500. NTAPI
  501. LlsUserProductEnumA(
  502. IN LLS_HANDLE Handle,
  503. IN LPSTR User,
  504. IN DWORD Level, // Levels 0,1 supported
  505. OUT LPBYTE* bufptr,
  506. IN DWORD prefmaxlen,
  507. OUT LPDWORD EntriesRead,
  508. OUT LPDWORD TotalEntries,
  509. IN OUT LPDWORD ResumeHandle
  510. );
  511. #ifdef UNICODE
  512. #define LlsUserProductEnum LlsUserProductEnumW
  513. #else
  514. #define LlsUserProductEnum LlsUserProductEnumA
  515. #endif
  516. // For a given user deletes a license useage
  517. NTSTATUS
  518. NTAPI
  519. LlsUserProductDeleteW(
  520. IN LLS_HANDLE Handle,
  521. IN LPWSTR User,
  522. IN LPWSTR Product
  523. );
  524. NTSTATUS
  525. NTAPI
  526. LlsUserProductDeleteA(
  527. IN LLS_HANDLE Handle,
  528. IN LPSTR User,
  529. IN LPSTR Product
  530. );
  531. #ifdef UNICODE
  532. #define LlsUserProductDelete LlsUserProductDeleteW
  533. #else
  534. #define LlsUserProductDelete LlsUserProductDeleteA
  535. #endif
  536. //
  537. // Group control API's
  538. //
  539. // Enums all user Groups
  540. NTSTATUS
  541. NTAPI
  542. LlsGroupEnumW(
  543. IN LLS_HANDLE Handle,
  544. IN DWORD Level, // Levels 0,1 supported
  545. OUT LPBYTE* bufptr,
  546. IN DWORD prefmaxlen,
  547. OUT LPDWORD EntriesRead,
  548. OUT LPDWORD TotalEntries,
  549. IN OUT LPDWORD ResumeHandle
  550. );
  551. NTSTATUS
  552. NTAPI
  553. LlsGroupEnumA(
  554. IN LLS_HANDLE Handle,
  555. IN DWORD Level, // Levels 0,1 supported
  556. OUT LPBYTE* bufptr,
  557. IN DWORD prefmaxlen,
  558. OUT LPDWORD EntriesRead,
  559. OUT LPDWORD TotalEntries,
  560. IN OUT LPDWORD ResumeHandle
  561. );
  562. #ifdef UNICODE
  563. #define LlsGroupEnum LlsGroupEnumW
  564. #else
  565. #define LlsGroupEnum LlsGroupEnumA
  566. #endif
  567. // For given Group gets info, info is name, comment and # licenses used
  568. NTSTATUS
  569. NTAPI
  570. LlsGroupInfoGetW(
  571. IN LLS_HANDLE Handle,
  572. IN LPWSTR Group,
  573. IN DWORD Level, // Level 1 supported
  574. OUT LPBYTE* bufptr
  575. );
  576. NTSTATUS
  577. NTAPI
  578. LlsGroupInfoGetA(
  579. IN LLS_HANDLE Handle,
  580. IN LPSTR Group,
  581. IN DWORD Level, // Level 1 supported
  582. OUT LPBYTE* bufptr
  583. );
  584. #ifdef UNICODE
  585. #define LlsGroupInfoGet LlsGroupInfoGetW
  586. #else
  587. #define LlsGroupInfoGet LlsGroupInfoGetA
  588. #endif
  589. NTSTATUS
  590. NTAPI
  591. LlsGroupInfoSetW(
  592. IN LLS_HANDLE Handle,
  593. IN LPWSTR Group,
  594. IN DWORD Level, // Level 1 supported
  595. IN LPBYTE bufptr
  596. );
  597. NTSTATUS
  598. NTAPI
  599. LlsGroupInfoSetA(
  600. IN LLS_HANDLE Handle,
  601. IN LPSTR Group,
  602. IN DWORD Level, // Level 1 supported
  603. IN LPBYTE bufptr
  604. );
  605. #ifdef UNICODE
  606. #define LlsGroupInfoSet LlsGroupInfoSetW
  607. #else
  608. #define LlsGroupInfoSet LlsGroupInfoSetA
  609. #endif
  610. // For given Group enum all users
  611. NTSTATUS
  612. NTAPI
  613. LlsGroupUserEnumW(
  614. IN LLS_HANDLE Handle,
  615. IN LPWSTR Group,
  616. IN DWORD Level, // Levels 0,1 supported
  617. OUT LPBYTE* bufptr,
  618. IN DWORD prefmaxlen,
  619. OUT LPDWORD EntriesRead,
  620. OUT LPDWORD TotalEntries,
  621. IN OUT LPDWORD ResumeHandle
  622. );
  623. NTSTATUS
  624. NTAPI
  625. LlsGroupUserEnumA(
  626. IN LLS_HANDLE Handle,
  627. IN LPSTR Group,
  628. IN DWORD Level, // Levels 0,1 supported
  629. OUT LPBYTE* bufptr,
  630. IN DWORD prefmaxlen,
  631. OUT LPDWORD EntriesRead,
  632. OUT LPDWORD TotalEntries,
  633. IN OUT LPDWORD ResumeHandle
  634. );
  635. #ifdef UNICODE
  636. #define LlsGroupUserEnum LlsGroupUserEnumW
  637. #else
  638. #define LlsGroupUserEnum LlsGroupUserEnumA
  639. #endif
  640. // Add user to given Group
  641. NTSTATUS
  642. NTAPI
  643. LlsGroupUserAddW(
  644. IN LLS_HANDLE Handle,
  645. IN LPWSTR Group,
  646. IN LPWSTR User
  647. );
  648. NTSTATUS
  649. NTAPI
  650. LlsGroupUserAddA(
  651. IN LLS_HANDLE Handle,
  652. IN LPSTR Group,
  653. IN LPSTR User
  654. );
  655. #ifdef UNICODE
  656. #define LlsGroupUserAdd LlsGroupUserAddW
  657. #else
  658. #define LlsGroupUserAdd LlsGroupUserAddA
  659. #endif
  660. // Delete user from given Group
  661. NTSTATUS
  662. NTAPI
  663. LlsGroupUserDeleteW(
  664. IN LLS_HANDLE Handle,
  665. IN LPWSTR Group,
  666. IN LPWSTR User
  667. );
  668. NTSTATUS
  669. NTAPI
  670. LlsGroupUserDeleteA(
  671. IN LLS_HANDLE Handle,
  672. IN LPSTR Group,
  673. IN LPSTR User
  674. );
  675. #ifdef UNICODE
  676. #define LlsGroupUserDelete LlsGroupUserDeleteW
  677. #else
  678. #define LlsGroupUserDelete LlsGroupUserDeleteA
  679. #endif
  680. // Add a given Group
  681. NTSTATUS
  682. NTAPI
  683. LlsGroupAddW(
  684. IN LLS_HANDLE Handle,
  685. IN DWORD Level, // Level 1 supported
  686. IN LPBYTE bufptr
  687. );
  688. NTSTATUS
  689. NTAPI
  690. LlsGroupAddA(
  691. IN LLS_HANDLE Handle,
  692. IN DWORD Level, // Level 1 supported
  693. IN LPBYTE bufptr
  694. );
  695. #ifdef UNICODE
  696. #define LlsGroupAdd LlsGroupAddW
  697. #else
  698. #define LlsGroupAdd LlsGroupAddA
  699. #endif
  700. NTSTATUS
  701. NTAPI
  702. LlsGroupDeleteW(
  703. IN LLS_HANDLE Handle,
  704. IN LPWSTR Group
  705. );
  706. NTSTATUS
  707. NTAPI
  708. LlsGroupDeleteA(
  709. IN LLS_HANDLE Handle,
  710. IN LPSTR Group
  711. );
  712. #ifdef UNICODE
  713. #define LlsGroupDelete LlsGroupDeleteW
  714. #else
  715. #define LlsGroupDelete LlsGroupDeleteA
  716. #endif
  717. //
  718. // Service control API's
  719. //
  720. NTSTATUS
  721. NTAPI
  722. LlsServiceInfoGetW(
  723. IN LLS_HANDLE Handle,
  724. IN DWORD Level,
  725. OUT LPBYTE* bufptr
  726. );
  727. NTSTATUS
  728. NTAPI
  729. LlsServiceInfoGetA(
  730. IN LLS_HANDLE Handle,
  731. IN DWORD Level,
  732. OUT LPBYTE* bufptr
  733. );
  734. #ifdef UNICODE
  735. #define LlsServiceInfoGet LlsServiceInfoGetW
  736. #else
  737. #define LlsServiceInfoGet LlsServiceInfoGetA
  738. #endif
  739. NTSTATUS
  740. NTAPI
  741. LlsServiceInfoSetW(
  742. IN LLS_HANDLE Handle,
  743. IN DWORD Level,
  744. IN LPBYTE bufptr
  745. );
  746. NTSTATUS
  747. NTAPI
  748. LlsServiceInfoSetA(
  749. IN LLS_HANDLE Handle,
  750. IN DWORD Level,
  751. IN LPBYTE bufptr
  752. );
  753. #ifdef UNICODE
  754. #define LlsServiceInfoSet LlsServiceInfoSetW
  755. #else
  756. #define LlsServiceInfoSet LlsServiceInfoSetA
  757. #endif
  758. //
  759. // Server Table Stuff (Replicated Server / Product Tree)
  760. //
  761. NTSTATUS
  762. NTAPI
  763. LlsServerEnumW(
  764. IN LLS_HANDLE Handle,
  765. IN DWORD Level, // Levels 0,1 supported
  766. OUT LPBYTE* bufptr,
  767. IN DWORD prefmaxlen,
  768. OUT LPDWORD EntriesRead,
  769. OUT LPDWORD TotalEntries,
  770. IN OUT LPDWORD ResumeHandle
  771. );
  772. NTSTATUS
  773. NTAPI
  774. LlsServerEnumA(
  775. IN LLS_HANDLE Handle,
  776. IN DWORD Level, // Levels 0,1 supported
  777. OUT LPBYTE* bufptr,
  778. IN DWORD prefmaxlen,
  779. OUT LPDWORD EntriesRead,
  780. OUT LPDWORD TotalEntries,
  781. IN OUT LPDWORD ResumeHandle
  782. );
  783. #ifdef UNICODE
  784. #define LlsServerEnum LlsServerEnumW
  785. #else
  786. #define LlsServerEnum LlsServerEnumA
  787. #endif
  788. NTSTATUS
  789. NTAPI
  790. LlsServerProductEnumW(
  791. IN LLS_HANDLE Handle,
  792. IN LPWSTR Server,
  793. IN DWORD Level, // Levels 0,1 supported
  794. OUT LPBYTE* bufptr,
  795. IN DWORD prefmaxlen,
  796. OUT LPDWORD EntriesRead,
  797. OUT LPDWORD TotalEntries,
  798. IN OUT LPDWORD ResumeHandle
  799. );
  800. NTSTATUS
  801. NTAPI
  802. LlsServerProductEnumA(
  803. IN LLS_HANDLE Handle,
  804. IN LPSTR Server,
  805. IN DWORD Level, // Levels 0,1 supported
  806. OUT LPBYTE* bufptr,
  807. IN DWORD prefmaxlen,
  808. OUT LPDWORD EntriesRead,
  809. OUT LPDWORD TotalEntries,
  810. IN OUT LPDWORD ResumeHandle
  811. );
  812. #ifdef UNICODE
  813. #define LlsServerUserEnum LlsServerUserEnumW
  814. #else
  815. #define LlsServerUserEnum LlsServerUserEnumA
  816. #endif
  817. //
  818. // Concurrent (Per-Server) mode API's (these will interact with the registry
  819. // on the remote system).
  820. //
  821. NTSTATUS
  822. NTAPI
  823. LlsLocalProductEnumW(
  824. IN LLS_HANDLE Handle,
  825. IN DWORD Level, // Levels 0,1 supported
  826. OUT LPBYTE* bufptr,
  827. IN DWORD prefmaxlen,
  828. OUT LPDWORD EntriesRead,
  829. OUT LPDWORD TotalEntries,
  830. IN OUT LPDWORD ResumeHandle
  831. );
  832. NTSTATUS
  833. NTAPI
  834. LlsLocalProductEnumA(
  835. IN LLS_HANDLE Handle,
  836. IN DWORD Level, // Levels 0,1 supported
  837. OUT LPBYTE* bufptr,
  838. IN DWORD prefmaxlen,
  839. OUT LPDWORD EntriesRead,
  840. OUT LPDWORD TotalEntries,
  841. IN OUT LPDWORD ResumeHandle
  842. );
  843. #ifdef UNICODE
  844. #define LlsLocalProductEnum LlsLocalProductEnumW
  845. #else
  846. #define LlsLocalProductEnum LlsLocalProductEnumA
  847. #endif
  848. NTSTATUS
  849. NTAPI
  850. LlsLocalProductInfoGetW(
  851. IN LLS_HANDLE Handle,
  852. IN LPWSTR Product,
  853. IN DWORD Level,
  854. IN LPBYTE bufptr
  855. );
  856. NTSTATUS
  857. NTAPI
  858. LlsLocalProductInfoGetA(
  859. IN LLS_HANDLE Handle,
  860. IN LPSTR Product,
  861. IN DWORD Level,
  862. IN LPBYTE bufptr
  863. );
  864. #ifdef UNICODE
  865. #define LlsLocalProductInfoGet LlsLocalProductInfoGetW
  866. #else
  867. #define LlsLocalProductInfoGet LlsLocalProductInfoGetA
  868. #endif
  869. NTSTATUS
  870. NTAPI
  871. LlsLocalProductInfoSetW(
  872. IN LLS_HANDLE Handle,
  873. IN LPWSTR Product,
  874. IN DWORD Level,
  875. IN LPBYTE bufptr
  876. );
  877. NTSTATUS
  878. NTAPI
  879. LlsLocalProductInfoSetA(
  880. IN LLS_HANDLE Handle,
  881. IN LPSTR Product,
  882. IN DWORD Level,
  883. IN LPBYTE bufptr
  884. );
  885. #ifdef UNICODE
  886. #define LlsLocalProductInfoSet LlsLocalProductInfoSetW
  887. #else
  888. #define LlsLocalProductInfoSet LlsLocalProductInfoSetA
  889. #endif
  890. #endif
  891. //
  892. // Registry values
  893. //
  894. #define REG_KEY_LICENSE TEXT("SYSTEM\\CurrentControlSet\\Services\\LicenseInfo")
  895. #define REG_VALUE_NAME TEXT("DisplayName")
  896. #define REG_VALUE_MODE TEXT("Mode")
  897. #define REG_VALUE_FLIP TEXT("FlipAllow")
  898. #define REG_VALUE_LIMIT TEXT("ConcurrentLimit")
  899. #ifdef __cplusplus
  900. }
  901. #endif
  902. #endif