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.

1561 lines
35 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. Jeff Parham (jeffparh) 04-Dec-1995
  13. o Added type definitions, macros, and prototypes for extended RPC APIs
  14. and license certificate APIs (available only post-3.51).
  15. o Corrected prototypes for LlsServerEnumW(), LlsServerEnumA(),
  16. LlsLocalProductInfoGetW(), and LlsLocalProductInfoGetA().
  17. --*/
  18. #ifndef _LLSAPI_H
  19. #define _LLSAPI_H
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #define LLS_FLAG_LICENSED 0x0001
  24. #define LLS_FLAG_UPDATE 0x0002
  25. #define LLS_FLAG_SUITE_USE 0x0004
  26. #define LLS_FLAG_SUITE_AUTO 0x0008
  27. #define LLS_FLAG_PRODUCT_PERSEAT 0x0010
  28. #define LLS_FLAG_PRODUCT_SWITCH 0x0020
  29. #define LLS_FLAG_DELETED 0x1000
  30. typedef PVOID LLS_HANDLE, *PLLS_HANDLE;
  31. typedef PVOID LLS_REPL_HANDLE, *PLLS_REPL_HANDLE;
  32. #define LLS_INVALID_LICENSE_HANDLE ( 0xFFFFFFFF )
  33. #define LLS_NUM_SECRETS ( 4 )
  34. typedef struct _LLS_LICENSE_INFO_0 {
  35. LPTSTR Product;
  36. LONG Quantity;
  37. DWORD Date;
  38. LPTSTR Admin;
  39. LPTSTR Comment;
  40. } LLS_LICENSE_INFO_0, *PLLS_LICENSE_INFO_0;
  41. typedef struct _LLS_LICENSE_INFO_1 {
  42. LPTSTR Product;
  43. LPTSTR Vendor;
  44. LONG Quantity;
  45. DWORD MaxQuantity;
  46. DWORD Date;
  47. LPTSTR Admin;
  48. LPTSTR Comment;
  49. DWORD AllowedModes;
  50. DWORD CertificateID;
  51. LPTSTR Source;
  52. DWORD ExpirationDate;
  53. DWORD Secrets[ LLS_NUM_SECRETS ];
  54. } LLS_LICENSE_INFO_1, *PLLS_LICENSE_INFO_1;
  55. typedef struct _LLS_PRODUCT_INFO_0 {
  56. LPTSTR Product;
  57. } LLS_PRODUCT_INFO_0, *PLLS_PRODUCT_INFO_0;
  58. typedef struct _LLS_PRODUCT_INFO_1 {
  59. LPTSTR Product;
  60. ULONG Purchased;
  61. ULONG InUse;
  62. ULONG ConcurrentTotal;
  63. ULONG HighMark;
  64. } LLS_PRODUCT_INFO_1, *PLLS_PRODUCT_INFO_1;
  65. typedef struct _LLS_PRODUCT_USER_INFO_0 {
  66. LPTSTR User;
  67. } LLS_PRODUCT_USER_INFO_0, *PLLS_PRODUCT_USER_INFO_0;
  68. typedef struct _LLS_PRODUCT_USER_INFO_1 {
  69. LPTSTR User;
  70. DWORD Flags;
  71. DWORD LastUsed;
  72. ULONG UsageCount;
  73. } LLS_PRODUCT_USER_INFO_1, *PLLS_PRODUCT_USER_INFO_1;
  74. typedef struct _LLS_PRODUCT_LICENSE_INFO_0 {
  75. LONG Quantity;
  76. DWORD Date;
  77. LPTSTR Admin;
  78. LPTSTR Comment;
  79. } LLS_PRODUCT_LICENSE_INFO_0, *PLLS_PRODUCT_LICENSE_INFO_0;
  80. typedef struct _LLS_PRODUCT_LICENSE_INFO_1 {
  81. LONG Quantity;
  82. DWORD MaxQuantity;
  83. DWORD Date;
  84. LPTSTR Admin;
  85. LPTSTR Comment;
  86. DWORD AllowedModes;
  87. DWORD CertificateID;
  88. LPTSTR Source;
  89. DWORD ExpirationDate;
  90. DWORD Secrets[ LLS_NUM_SECRETS ];
  91. } LLS_PRODUCT_LICENSE_INFO_1, *PLLS_PRODUCT_LICENSE_INFO_1;
  92. typedef struct _LLS_USER_INFO_0 {
  93. LPTSTR Name;
  94. } LLS_USER_INFO_0, *PLLS_USER_INFO_0;
  95. typedef struct _LLS_USER_INFO_1 {
  96. LPTSTR Name;
  97. DWORD Flags;
  98. LPTSTR Group;
  99. ULONG Licensed;
  100. ULONG UnLicensed;
  101. } LLS_USER_INFO_1, *PLLS_USER_INFO_1;
  102. typedef struct _LLS_USER_INFO_2 {
  103. LPTSTR Name;
  104. DWORD Flags;
  105. LPTSTR Group;
  106. ULONG Licensed;
  107. ULONG UnLicensed;
  108. LPTSTR Products;
  109. } LLS_USER_INFO_2, *PLLS_USER_INFO_2;
  110. typedef struct _LLS_USER_PRODUCT_INFO_0 {
  111. LPTSTR Product;
  112. } LLS_USER_PRODUCT_INFO_0, *PLLS_USER_PRODUCT_INFO_0;
  113. typedef struct _LLS_USER_PRODUCT_INFO_1 {
  114. LPTSTR Product;
  115. DWORD Flags;
  116. DWORD LastUsed;
  117. ULONG UsageCount;
  118. } LLS_USER_PRODUCT_INFO_1, *PLLS_USER_PRODUCT_INFO_1;
  119. typedef struct _LLS_GROUP_INFO_0 {
  120. LPTSTR Name;
  121. } LLS_GROUP_INFO_0, *PLLS_GROUP_INFO_0;
  122. typedef struct _LLS_GROUP_INFO_1 {
  123. LPTSTR Name;
  124. LPTSTR Comment;
  125. ULONG Licenses;
  126. } LLS_GROUP_INFO_1, *PLLS_GROUP_INFO_1;
  127. #define LLS_REPLICATION_TYPE_DELTA 0
  128. #define LLS_REPLICATION_TYPE_TIME 1
  129. #define LLS_MODE_LICENSE_SERVER 0
  130. #define LLS_MODE_PDC 1
  131. #define LLS_MODE_ENTERPRISE_SERVER 2
  132. typedef struct _LLS_SERVICE_INFO_0 {
  133. DWORD Version;
  134. DWORD TimeStarted;
  135. DWORD Mode;
  136. LPTSTR ReplicateTo;
  137. LPTSTR EnterpriseServer;
  138. DWORD ReplicationType;
  139. DWORD ReplicationTime;
  140. DWORD UseEnterprise;
  141. DWORD LastReplicated;
  142. } LLS_SERVICE_INFO_0, *PLLS_SERVICE_INFO_0;
  143. typedef struct _LLS_CONNECT_INFO_0 {
  144. LPTSTR Domain;
  145. LPTSTR EnterpriseServer;
  146. } LLS_CONNECT_INFO_0, *PLLS_CONNECT_INFO_0;
  147. typedef struct _LLS_SERVER_PRODUCT_INFO_0 {
  148. LPTSTR Name;
  149. } LLS_SERVER_PRODUCT_INFO_0, *PLLS_SERVER_PRODUCT_INFO_0;
  150. typedef struct _LLS_SERVER_PRODUCT_INFO_1 {
  151. LPTSTR Name;
  152. DWORD Flags;
  153. ULONG MaxUses;
  154. ULONG MaxSetUses;
  155. ULONG HighMark;
  156. } LLS_SERVER_PRODUCT_INFO_1, *PLLS_SERVER_PRODUCT_INFO_1;
  157. typedef struct _LLS_SERVER_INFO_0 {
  158. LPTSTR Name;
  159. } LLS_SERVER_INFO_0, *PLLS_SERVER_INFO_0;
  160. typedef struct _LLS_CERTIFICATE_CLAIM_INFO_0
  161. {
  162. TCHAR ServerName[ 1 + MAX_COMPUTERNAME_LENGTH ];
  163. LONG Quantity;
  164. } LLS_CERTIFICATE_CLAIM_INFO_0, *PLLS_CERTIFICATE_CLAIM_INFO_0;
  165. typedef struct _LLS_LOCAL_SERVICE_INFO_0
  166. {
  167. LPTSTR KeyName;
  168. LPTSTR DisplayName;
  169. LPTSTR FamilyDisplayName;
  170. DWORD Mode;
  171. DWORD FlipAllow;
  172. DWORD ConcurrentLimit;
  173. DWORD HighMark;
  174. } LLS_LOCAL_SERVICE_INFO_0, *PLLS_LOCAL_SERVICE_INFO_0;
  175. #define LLS_LICENSE_MODE_PER_SEAT ( 0 )
  176. #define LLS_LICENSE_MODE_PER_SERVER ( 1 )
  177. #define LLS_LICENSE_MODE_ALLOW_PER_SEAT ( 1 )
  178. #define LLS_LICENSE_MODE_ALLOW_PER_SERVER ( 2 )
  179. #define LLS_LICENSE_FLIP_ALLOW_PER_SEAT ( 1 )
  180. #define LLS_LICENSE_FLIP_ALLOW_PER_SERVER ( 2 )
  181. // capability flags; query with LlsCapabilityIsSupported
  182. #define LLS_CAPABILITY_SECURE_CERTIFICATES ( 0 )
  183. #define LLS_CAPABILITY_REPLICATE_CERT_DB ( 1 )
  184. #define LLS_CAPABILITY_REPLICATE_PRODUCT_SECURITY ( 2 )
  185. #define LLS_CAPABILITY_REPLICATE_USERS_EX ( 3 )
  186. #define LLS_CAPABILITY_SERVICE_INFO_GETW ( 4 )
  187. #define LLS_CAPABILITY_LOCAL_SERVICE_API ( 5 )
  188. #define LLS_CAPABILITY_MAX ( 32 )
  189. //***************************************************
  190. //* Nt LS API data constants
  191. //* (for use with LlsLicenseRequest() API)
  192. //***************************************************
  193. #define NT_LS_USER_NAME ((ULONG) 0) // username only
  194. #define NT_LS_USER_SID ((ULONG) 1) // SID only
  195. #ifndef NO_LLS_APIS
  196. //
  197. // Connection control API's
  198. //
  199. NTSTATUS
  200. NTAPI
  201. LlsConnectW(
  202. IN LPWSTR Server,
  203. OUT PLLS_HANDLE Handle
  204. );
  205. NTSTATUS
  206. NTAPI
  207. LlsConnectA(
  208. IN LPSTR Server,
  209. OUT PLLS_HANDLE Handle
  210. );
  211. #ifdef UNICODE
  212. # define LlsConnect LlsConnectW
  213. #else
  214. # define LlsConnect LlsConnectA
  215. #endif
  216. typedef NTSTATUS (NTAPI *PLLS_CONNECT_W)( LPWSTR, PLLS_HANDLE );
  217. typedef NTSTATUS (NTAPI *PLLS_CONNECT_A)( LPSTR, PLLS_HANDLE );
  218. NTSTATUS
  219. NTAPI
  220. LlsConnectEnterpriseW(
  221. IN LPWSTR Focus,
  222. OUT PLLS_HANDLE Handle,
  223. IN DWORD Level,
  224. OUT LPBYTE *bufptr
  225. );
  226. NTSTATUS
  227. NTAPI
  228. LlsConnectEnterpriseA(
  229. IN LPSTR Focus,
  230. OUT PLLS_HANDLE Handle,
  231. IN DWORD Level,
  232. OUT LPBYTE *bufptr
  233. );
  234. #ifdef UNICODE
  235. #define LlsConnectEnterprise LlsConnectEnterpriseW
  236. #else
  237. #define LlsConnectEnterprise LlsConnectEnterpriseA
  238. #endif
  239. typedef NTSTATUS (NTAPI *PLLS_CONNECT_ENTERPRISE_W)( LPWSTR, PLLS_HANDLE, DWORD, LPBYTE * );
  240. typedef NTSTATUS (NTAPI *PLLS_CONNECT_ENTERPRISE_A)( LPSTR, PLLS_HANDLE, DWORD, LPBYTE * );
  241. NTSTATUS
  242. NTAPI
  243. LlsClose(
  244. IN LLS_HANDLE Handle
  245. );
  246. typedef NTSTATUS (NTAPI *PLLS_CLOSE)( LLS_HANDLE );
  247. NTSTATUS
  248. NTAPI
  249. LlsFreeMemory(
  250. IN PVOID bufptr
  251. );
  252. typedef NTSTATUS (NTAPI *PLLS_FREE_MEMORY)( PVOID );
  253. NTSTATUS
  254. NTAPI
  255. LlsEnterpriseServerFindW(
  256. IN LPWSTR Focus,
  257. IN DWORD Level,
  258. OUT LPBYTE *bufptr
  259. );
  260. NTSTATUS
  261. NTAPI
  262. LlsEnterpriseServerFindA(
  263. IN LPSTR Focus,
  264. IN DWORD Level,
  265. OUT LPBYTE *bufptr
  266. );
  267. #ifdef UNICODE
  268. #define LlsEnterpriseServerFind LlsEnterpriseServerFindW
  269. #else
  270. #define LlsEnterpriseServerFind LlsEnterpriseServerFindA
  271. #endif
  272. //
  273. // License control API's
  274. //
  275. // Enum purchase history of licenses for all products.
  276. NTSTATUS
  277. NTAPI
  278. LlsLicenseEnumW(
  279. IN LLS_HANDLE Handle,
  280. IN DWORD Level, // Level 0 supported
  281. OUT LPBYTE* bufptr,
  282. IN DWORD prefmaxlen,
  283. OUT LPDWORD EntriesRead,
  284. OUT LPDWORD TotalEntries,
  285. IN OUT LPDWORD ResumeHandle
  286. );
  287. NTSTATUS
  288. NTAPI
  289. LlsLicenseEnumA(
  290. IN LLS_HANDLE Handle,
  291. IN DWORD Level, // Level 0 supported
  292. OUT LPBYTE* bufptr,
  293. IN DWORD prefmaxlen,
  294. OUT LPDWORD EntriesRead,
  295. OUT LPDWORD TotalEntries,
  296. IN OUT LPDWORD ResumeHandle
  297. );
  298. #ifdef UNICODE
  299. #define LlsLicenseEnum LlsLicenseEnumW
  300. #else
  301. #define LlsLicenseEnum LlsLicenseEnumA
  302. #endif
  303. // Add purchase of license for a product.
  304. NTSTATUS
  305. NTAPI
  306. LlsLicenseAddW(
  307. IN LLS_HANDLE Handle,
  308. IN DWORD Level, // Level 0 supported
  309. IN LPBYTE bufptr
  310. );
  311. NTSTATUS
  312. NTAPI
  313. LlsLicenseAddA(
  314. IN LLS_HANDLE Handle,
  315. IN DWORD Level, // Level 0 supported
  316. IN LPBYTE bufptr
  317. );
  318. #ifdef UNICODE
  319. #define LlsLicenseAdd LlsLicenseAddW
  320. #else
  321. #define LlsLicenseAdd LlsLicenseAddA
  322. #endif
  323. typedef NTSTATUS (NTAPI *PLLS_LICENSE_ADD_W)( LLS_HANDLE, DWORD, LPBYTE );
  324. typedef NTSTATUS (NTAPI *PLLS_LICENSE_ADD_A)( LLS_HANDLE, DWORD, LPBYTE );
  325. //
  326. // Product control API's
  327. //
  328. // Product is SQL, BackOffice, Exchange, Etc. (Even though BackOffice isn't
  329. // a product - we count it like one to keep things simplistic.
  330. //
  331. // Enum all products with purchase and InUse info.
  332. NTSTATUS
  333. NTAPI
  334. LlsProductEnumW(
  335. IN LLS_HANDLE Handle,
  336. IN DWORD Level, // Levels 0,1 supported
  337. OUT LPBYTE* bufptr,
  338. IN DWORD prefmaxlen,
  339. OUT LPDWORD EntriesRead,
  340. OUT LPDWORD TotalEntries,
  341. IN OUT LPDWORD ResumeHandle
  342. );
  343. NTSTATUS
  344. NTAPI
  345. LlsProductEnumA(
  346. IN LLS_HANDLE Handle,
  347. IN DWORD Level, // Levels 0,1 supported
  348. OUT LPBYTE* bufptr,
  349. IN DWORD prefmaxlen,
  350. OUT LPDWORD EntriesRead,
  351. OUT LPDWORD TotalEntries,
  352. IN OUT LPDWORD ResumeHandle
  353. );
  354. #ifdef UNICODE
  355. #define LlsProductEnum LlsProductEnumW
  356. #else
  357. #define LlsProductEnum LlsProductEnumA
  358. #endif
  359. // Add purchase of license for a product.
  360. NTSTATUS
  361. NTAPI
  362. LlsProductAddW(
  363. IN LLS_HANDLE Handle,
  364. IN LPWSTR ProductFamily,
  365. IN LPWSTR Product,
  366. IN LPWSTR Version
  367. );
  368. NTSTATUS
  369. NTAPI
  370. LlsProductAddA(
  371. IN LLS_HANDLE Handle,
  372. IN LPSTR ProductFamily,
  373. IN LPSTR Product,
  374. IN LPSTR Version
  375. );
  376. #ifdef UNICODE
  377. #define LlsProductAdd LlsProductAddW
  378. #else
  379. #define LlsProductAdd LlsProductAddA
  380. #endif
  381. // For a particular product enum all users.
  382. NTSTATUS
  383. NTAPI
  384. LlsProductUserEnumW(
  385. IN LLS_HANDLE Handle,
  386. IN LPWSTR Product,
  387. IN DWORD Level, // Levels 0,1 supported
  388. OUT LPBYTE* bufptr,
  389. IN DWORD prefmaxlen,
  390. OUT LPDWORD EntriesRead,
  391. OUT LPDWORD TotalEntries,
  392. IN OUT LPDWORD ResumeHandle
  393. );
  394. NTSTATUS
  395. NTAPI
  396. LlsProductUserEnumA(
  397. IN LLS_HANDLE Handle,
  398. IN LPSTR Product,
  399. IN DWORD Level, // Levels 0,1 supported
  400. OUT LPBYTE* bufptr,
  401. IN DWORD prefmaxlen,
  402. OUT LPDWORD EntriesRead,
  403. OUT LPDWORD TotalEntries,
  404. IN OUT LPDWORD ResumeHandle
  405. );
  406. #ifdef UNICODE
  407. #define LlsProductUserEnum LlsProductUserEnumW
  408. #else
  409. #define LlsProductUserEnum LlsProductUserEnumA
  410. #endif
  411. // For a particular product enum all license purchases.
  412. NTSTATUS
  413. NTAPI
  414. LlsProductLicenseEnumW(
  415. IN LLS_HANDLE Handle,
  416. IN LPWSTR Product,
  417. IN DWORD Level, // Level 0 supported
  418. OUT LPBYTE* bufptr,
  419. IN DWORD prefmaxlen,
  420. OUT LPDWORD EntriesRead,
  421. OUT LPDWORD TotalEntries,
  422. IN OUT LPDWORD ResumeHandle
  423. );
  424. NTSTATUS
  425. NTAPI
  426. LlsProductLicenseEnumA(
  427. IN LLS_HANDLE Handle,
  428. IN LPSTR Product,
  429. IN DWORD Level, // Level 0 supported
  430. OUT LPBYTE* bufptr,
  431. IN DWORD prefmaxlen,
  432. OUT LPDWORD EntriesRead,
  433. OUT LPDWORD TotalEntries,
  434. IN OUT LPDWORD ResumeHandle
  435. );
  436. #ifdef UNICODE
  437. #define LlsProductLicenseEnum LlsProductLicenseEnumW
  438. #else
  439. #define LlsProductLicenseEnum LlsProductLicenseEnumA
  440. #endif
  441. // For given product enum all servers with concurrent limits
  442. NTSTATUS
  443. NTAPI
  444. LlsProductServerEnumW(
  445. IN LLS_HANDLE Handle,
  446. IN LPWSTR Product,
  447. IN DWORD Level, // Levels 0,1 supported
  448. OUT LPBYTE* bufptr,
  449. IN DWORD prefmaxlen,
  450. OUT LPDWORD EntriesRead,
  451. OUT LPDWORD TotalEntries,
  452. IN OUT LPDWORD ResumeHandle
  453. );
  454. NTSTATUS
  455. NTAPI
  456. LlsProductServerEnumA(
  457. IN LLS_HANDLE Handle,
  458. IN LPSTR Product,
  459. IN DWORD Level, // Levels 0,1 supported
  460. OUT LPBYTE* bufptr,
  461. IN DWORD prefmaxlen,
  462. OUT LPDWORD EntriesRead,
  463. OUT LPDWORD TotalEntries,
  464. IN OUT LPDWORD ResumeHandle
  465. );
  466. #ifdef UNICODE
  467. #define LlsProductServerEnum LlsProductServerEnumW
  468. #else
  469. #define LlsProductServerEnum LlsProductServerEnumA
  470. #endif
  471. //
  472. // User control API's
  473. // A user can be a mapped user or a normal user
  474. //
  475. // Enums all users
  476. NTSTATUS
  477. NTAPI
  478. LlsUserEnumW(
  479. IN LLS_HANDLE Handle,
  480. IN DWORD Level, // Levels 0,1 supported
  481. OUT LPBYTE* bufptr,
  482. IN DWORD prefmaxlen,
  483. OUT LPDWORD EntriesRead,
  484. OUT LPDWORD TotalEntries,
  485. IN OUT LPDWORD ResumeHandle
  486. );
  487. NTSTATUS
  488. NTAPI
  489. LlsUserEnumA(
  490. IN LLS_HANDLE Handle,
  491. IN DWORD Level, // Levels 0,1 supported
  492. OUT LPBYTE* bufptr,
  493. IN DWORD prefmaxlen,
  494. OUT LPDWORD EntriesRead,
  495. OUT LPDWORD TotalEntries,
  496. IN OUT LPDWORD ResumeHandle
  497. );
  498. #ifdef UNICODE
  499. #define LlsUserEnum LlsUserEnumW
  500. #else
  501. #define LlsUserEnum LlsUserEnumA
  502. #endif
  503. // Info is Group and whether to force back-office license
  504. NTSTATUS
  505. NTAPI
  506. LlsUserInfoGetW(
  507. IN LLS_HANDLE Handle,
  508. IN LPWSTR User,
  509. IN DWORD Level, // Level 1 supported
  510. OUT LPBYTE* bufptr
  511. );
  512. NTSTATUS
  513. NTAPI
  514. LlsUserInfoGetA(
  515. IN LLS_HANDLE Handle,
  516. IN LPSTR User,
  517. IN DWORD Level, // Level 1 supported
  518. OUT LPBYTE* bufptr
  519. );
  520. #ifdef UNICODE
  521. #define LlsUserInfoGet LlsUserInfoGetW
  522. #else
  523. #define LlsUserInfoGet LlsUserInfoGetA
  524. #endif
  525. NTSTATUS
  526. NTAPI
  527. LlsUserInfoSetW(
  528. IN LLS_HANDLE Handle,
  529. IN LPWSTR User,
  530. IN DWORD Level,
  531. IN LPBYTE bufptr // Level 1 supported
  532. );
  533. NTSTATUS
  534. NTAPI
  535. LlsUserInfoSetA(
  536. IN LLS_HANDLE Handle,
  537. IN LPSTR User,
  538. IN DWORD Level,
  539. IN LPBYTE bufptr // Level 1 supported
  540. );
  541. #ifdef UNICODE
  542. #define LlsUserInfoSet LlsUserInfoSetW
  543. #else
  544. #define LlsUserInfoSet LlsUserInfoSetA
  545. #endif
  546. NTSTATUS
  547. NTAPI
  548. LlsUserDeleteW(
  549. IN LLS_HANDLE Handle,
  550. IN LPWSTR User
  551. );
  552. NTSTATUS
  553. NTAPI
  554. LlsUserDeleteA(
  555. IN LLS_HANDLE Handle,
  556. IN LPSTR User
  557. );
  558. #ifdef UNICODE
  559. #define LlsUserDelete LlsUserDeleteW
  560. #else
  561. #define LlsUserDelete LlsUserDeleteA
  562. #endif
  563. // For a given user enums all license useages
  564. NTSTATUS
  565. NTAPI
  566. LlsUserProductEnumW(
  567. IN LLS_HANDLE Handle,
  568. IN LPWSTR User,
  569. IN DWORD Level, // Levels 0,1 supported
  570. OUT LPBYTE* bufptr,
  571. IN DWORD prefmaxlen,
  572. OUT LPDWORD EntriesRead,
  573. OUT LPDWORD TotalEntries,
  574. IN OUT LPDWORD ResumeHandle
  575. );
  576. NTSTATUS
  577. NTAPI
  578. LlsUserProductEnumA(
  579. IN LLS_HANDLE Handle,
  580. IN LPSTR User,
  581. IN DWORD Level, // Levels 0,1 supported
  582. OUT LPBYTE* bufptr,
  583. IN DWORD prefmaxlen,
  584. OUT LPDWORD EntriesRead,
  585. OUT LPDWORD TotalEntries,
  586. IN OUT LPDWORD ResumeHandle
  587. );
  588. #ifdef UNICODE
  589. #define LlsUserProductEnum LlsUserProductEnumW
  590. #else
  591. #define LlsUserProductEnum LlsUserProductEnumA
  592. #endif
  593. // For a given user deletes a license useage
  594. NTSTATUS
  595. NTAPI
  596. LlsUserProductDeleteW(
  597. IN LLS_HANDLE Handle,
  598. IN LPWSTR User,
  599. IN LPWSTR Product
  600. );
  601. NTSTATUS
  602. NTAPI
  603. LlsUserProductDeleteA(
  604. IN LLS_HANDLE Handle,
  605. IN LPSTR User,
  606. IN LPSTR Product
  607. );
  608. #ifdef UNICODE
  609. #define LlsUserProductDelete LlsUserProductDeleteW
  610. #else
  611. #define LlsUserProductDelete LlsUserProductDeleteA
  612. #endif
  613. //
  614. // Group control API's
  615. //
  616. // Enums all user Groups
  617. NTSTATUS
  618. NTAPI
  619. LlsGroupEnumW(
  620. IN LLS_HANDLE Handle,
  621. IN DWORD Level, // Levels 0,1 supported
  622. OUT LPBYTE* bufptr,
  623. IN DWORD prefmaxlen,
  624. OUT LPDWORD EntriesRead,
  625. OUT LPDWORD TotalEntries,
  626. IN OUT LPDWORD ResumeHandle
  627. );
  628. NTSTATUS
  629. NTAPI
  630. LlsGroupEnumA(
  631. IN LLS_HANDLE Handle,
  632. IN DWORD Level, // Levels 0,1 supported
  633. OUT LPBYTE* bufptr,
  634. IN DWORD prefmaxlen,
  635. OUT LPDWORD EntriesRead,
  636. OUT LPDWORD TotalEntries,
  637. IN OUT LPDWORD ResumeHandle
  638. );
  639. #ifdef UNICODE
  640. #define LlsGroupEnum LlsGroupEnumW
  641. #else
  642. #define LlsGroupEnum LlsGroupEnumA
  643. #endif
  644. // For given Group gets info, info is name, comment and # licenses used
  645. NTSTATUS
  646. NTAPI
  647. LlsGroupInfoGetW(
  648. IN LLS_HANDLE Handle,
  649. IN LPWSTR Group,
  650. IN DWORD Level, // Level 1 supported
  651. OUT LPBYTE* bufptr
  652. );
  653. NTSTATUS
  654. NTAPI
  655. LlsGroupInfoGetA(
  656. IN LLS_HANDLE Handle,
  657. IN LPSTR Group,
  658. IN DWORD Level, // Level 1 supported
  659. OUT LPBYTE* bufptr
  660. );
  661. #ifdef UNICODE
  662. #define LlsGroupInfoGet LlsGroupInfoGetW
  663. #else
  664. #define LlsGroupInfoGet LlsGroupInfoGetA
  665. #endif
  666. NTSTATUS
  667. NTAPI
  668. LlsGroupInfoSetW(
  669. IN LLS_HANDLE Handle,
  670. IN LPWSTR Group,
  671. IN DWORD Level, // Level 1 supported
  672. IN LPBYTE bufptr
  673. );
  674. NTSTATUS
  675. NTAPI
  676. LlsGroupInfoSetA(
  677. IN LLS_HANDLE Handle,
  678. IN LPSTR Group,
  679. IN DWORD Level, // Level 1 supported
  680. IN LPBYTE bufptr
  681. );
  682. #ifdef UNICODE
  683. #define LlsGroupInfoSet LlsGroupInfoSetW
  684. #else
  685. #define LlsGroupInfoSet LlsGroupInfoSetA
  686. #endif
  687. // For given Group enum all users
  688. NTSTATUS
  689. NTAPI
  690. LlsGroupUserEnumW(
  691. IN LLS_HANDLE Handle,
  692. IN LPWSTR Group,
  693. IN DWORD Level, // Levels 0,1 supported
  694. OUT LPBYTE* bufptr,
  695. IN DWORD prefmaxlen,
  696. OUT LPDWORD EntriesRead,
  697. OUT LPDWORD TotalEntries,
  698. IN OUT LPDWORD ResumeHandle
  699. );
  700. NTSTATUS
  701. NTAPI
  702. LlsGroupUserEnumA(
  703. IN LLS_HANDLE Handle,
  704. IN LPSTR Group,
  705. IN DWORD Level, // Levels 0,1 supported
  706. OUT LPBYTE* bufptr,
  707. IN DWORD prefmaxlen,
  708. OUT LPDWORD EntriesRead,
  709. OUT LPDWORD TotalEntries,
  710. IN OUT LPDWORD ResumeHandle
  711. );
  712. #ifdef UNICODE
  713. #define LlsGroupUserEnum LlsGroupUserEnumW
  714. #else
  715. #define LlsGroupUserEnum LlsGroupUserEnumA
  716. #endif
  717. // Add user to given Group
  718. NTSTATUS
  719. NTAPI
  720. LlsGroupUserAddW(
  721. IN LLS_HANDLE Handle,
  722. IN LPWSTR Group,
  723. IN LPWSTR User
  724. );
  725. NTSTATUS
  726. NTAPI
  727. LlsGroupUserAddA(
  728. IN LLS_HANDLE Handle,
  729. IN LPSTR Group,
  730. IN LPSTR User
  731. );
  732. #ifdef UNICODE
  733. #define LlsGroupUserAdd LlsGroupUserAddW
  734. #else
  735. #define LlsGroupUserAdd LlsGroupUserAddA
  736. #endif
  737. // Delete user from given Group
  738. NTSTATUS
  739. NTAPI
  740. LlsGroupUserDeleteW(
  741. IN LLS_HANDLE Handle,
  742. IN LPWSTR Group,
  743. IN LPWSTR User
  744. );
  745. NTSTATUS
  746. NTAPI
  747. LlsGroupUserDeleteA(
  748. IN LLS_HANDLE Handle,
  749. IN LPSTR Group,
  750. IN LPSTR User
  751. );
  752. #ifdef UNICODE
  753. #define LlsGroupUserDelete LlsGroupUserDeleteW
  754. #else
  755. #define LlsGroupUserDelete LlsGroupUserDeleteA
  756. #endif
  757. // Add a given Group
  758. NTSTATUS
  759. NTAPI
  760. LlsGroupAddW(
  761. IN LLS_HANDLE Handle,
  762. IN DWORD Level, // Level 1 supported
  763. IN LPBYTE bufptr
  764. );
  765. NTSTATUS
  766. NTAPI
  767. LlsGroupAddA(
  768. IN LLS_HANDLE Handle,
  769. IN DWORD Level, // Level 1 supported
  770. IN LPBYTE bufptr
  771. );
  772. #ifdef UNICODE
  773. #define LlsGroupAdd LlsGroupAddW
  774. #else
  775. #define LlsGroupAdd LlsGroupAddA
  776. #endif
  777. NTSTATUS
  778. NTAPI
  779. LlsGroupDeleteW(
  780. IN LLS_HANDLE Handle,
  781. IN LPWSTR Group
  782. );
  783. NTSTATUS
  784. NTAPI
  785. LlsGroupDeleteA(
  786. IN LLS_HANDLE Handle,
  787. IN LPSTR Group
  788. );
  789. #ifdef UNICODE
  790. #define LlsGroupDelete LlsGroupDeleteW
  791. #else
  792. #define LlsGroupDelete LlsGroupDeleteA
  793. #endif
  794. //
  795. // Service control API's
  796. //
  797. NTSTATUS
  798. NTAPI
  799. LlsServiceInfoGetW(
  800. IN LLS_HANDLE Handle,
  801. IN DWORD Level,
  802. OUT LPBYTE* bufptr
  803. );
  804. NTSTATUS
  805. NTAPI
  806. LlsServiceInfoGetA(
  807. IN LLS_HANDLE Handle,
  808. IN DWORD Level,
  809. OUT LPBYTE* bufptr
  810. );
  811. #ifdef UNICODE
  812. #define LlsServiceInfoGet LlsServiceInfoGetW
  813. #else
  814. #define LlsServiceInfoGet LlsServiceInfoGetA
  815. #endif
  816. NTSTATUS
  817. NTAPI
  818. LlsServiceInfoSetW(
  819. IN LLS_HANDLE Handle,
  820. IN DWORD Level,
  821. IN LPBYTE bufptr
  822. );
  823. NTSTATUS
  824. NTAPI
  825. LlsServiceInfoSetA(
  826. IN LLS_HANDLE Handle,
  827. IN DWORD Level,
  828. IN LPBYTE bufptr
  829. );
  830. #ifdef UNICODE
  831. #define LlsServiceInfoSet LlsServiceInfoSetW
  832. #else
  833. #define LlsServiceInfoSet LlsServiceInfoSetA
  834. #endif
  835. //
  836. // Server Table Stuff (Replicated Server / Product Tree)
  837. //
  838. NTSTATUS
  839. NTAPI
  840. LlsServerEnumW(
  841. IN LLS_HANDLE Handle,
  842. IN LPWSTR Server,
  843. IN DWORD Level, // Levels 0,1 supported
  844. OUT LPBYTE* bufptr,
  845. IN DWORD prefmaxlen,
  846. OUT LPDWORD EntriesRead,
  847. OUT LPDWORD TotalEntries,
  848. IN OUT LPDWORD ResumeHandle
  849. );
  850. NTSTATUS
  851. NTAPI
  852. LlsServerEnumA(
  853. IN LLS_HANDLE Handle,
  854. IN LPSTR Server,
  855. IN DWORD Level, // Levels 0,1 supported
  856. OUT LPBYTE* bufptr,
  857. IN DWORD prefmaxlen,
  858. OUT LPDWORD EntriesRead,
  859. OUT LPDWORD TotalEntries,
  860. IN OUT LPDWORD ResumeHandle
  861. );
  862. #ifdef UNICODE
  863. #define LlsServerEnum LlsServerEnumW
  864. #else
  865. #define LlsServerEnum LlsServerEnumA
  866. #endif
  867. #ifdef OBSOLETE
  868. NTSTATUS
  869. NTAPI
  870. LlsServerProductEnumW(
  871. IN LLS_HANDLE Handle,
  872. IN LPWSTR Server,
  873. IN DWORD Level, // Levels 0,1 supported
  874. OUT LPBYTE* bufptr,
  875. IN DWORD prefmaxlen,
  876. OUT LPDWORD EntriesRead,
  877. OUT LPDWORD TotalEntries,
  878. IN OUT LPDWORD ResumeHandle
  879. );
  880. NTSTATUS
  881. NTAPI
  882. LlsServerProductEnumA(
  883. IN LLS_HANDLE Handle,
  884. IN LPSTR Server,
  885. IN DWORD Level, // Levels 0,1 supported
  886. OUT LPBYTE* bufptr,
  887. IN DWORD prefmaxlen,
  888. OUT LPDWORD EntriesRead,
  889. OUT LPDWORD TotalEntries,
  890. IN OUT LPDWORD ResumeHandle
  891. );
  892. #endif // OBSOLETE
  893. #ifdef UNICODE
  894. #define LlsServerUserEnum LlsServerUserEnumW
  895. #else
  896. #define LlsServerUserEnum LlsServerUserEnumA
  897. #endif
  898. #ifdef OBSOLETE
  899. //
  900. // Concurrent (Per-Server) mode API's (these will interact with the registry
  901. // on the remote system).
  902. //
  903. NTSTATUS
  904. NTAPI
  905. LlsLocalProductEnumW(
  906. IN LLS_HANDLE Handle,
  907. IN DWORD Level, // Levels 0,1 supported
  908. OUT LPBYTE* bufptr,
  909. IN DWORD prefmaxlen,
  910. OUT LPDWORD EntriesRead,
  911. OUT LPDWORD TotalEntries,
  912. IN OUT LPDWORD ResumeHandle
  913. );
  914. NTSTATUS
  915. NTAPI
  916. LlsLocalProductEnumA(
  917. IN LLS_HANDLE Handle,
  918. IN DWORD Level, // Levels 0,1 supported
  919. OUT LPBYTE* bufptr,
  920. IN DWORD prefmaxlen,
  921. OUT LPDWORD EntriesRead,
  922. OUT LPDWORD TotalEntries,
  923. IN OUT LPDWORD ResumeHandle
  924. );
  925. #ifdef UNICODE
  926. #define LlsLocalProductEnum LlsLocalProductEnumW
  927. #else
  928. #define LlsLocalProductEnum LlsLocalProductEnumA
  929. #endif
  930. NTSTATUS
  931. NTAPI
  932. LlsLocalProductInfoGetW(
  933. IN LLS_HANDLE Handle,
  934. IN LPWSTR Product,
  935. IN DWORD Level,
  936. OUT LPBYTE* bufptr
  937. );
  938. NTSTATUS
  939. NTAPI
  940. LlsLocalProductInfoGetA(
  941. IN LLS_HANDLE Handle,
  942. IN LPSTR Product,
  943. IN DWORD Level,
  944. OUT LPBYTE* bufptr
  945. );
  946. #ifdef UNICODE
  947. #define LlsLocalProductInfoGet LlsLocalProductInfoGetW
  948. #else
  949. #define LlsLocalProductInfoGet LlsLocalProductInfoGetA
  950. #endif
  951. NTSTATUS
  952. NTAPI
  953. LlsLocalProductInfoSetW(
  954. IN LLS_HANDLE Handle,
  955. IN LPWSTR Product,
  956. IN DWORD Level,
  957. IN LPBYTE bufptr
  958. );
  959. NTSTATUS
  960. NTAPI
  961. LlsLocalProductInfoSetA(
  962. IN LLS_HANDLE Handle,
  963. IN LPSTR Product,
  964. IN DWORD Level,
  965. IN LPBYTE bufptr
  966. );
  967. #ifdef UNICODE
  968. #define LlsLocalProductInfoSet LlsLocalProductInfoSetW
  969. #else
  970. #define LlsLocalProductInfoSet LlsLocalProductInfoSetA
  971. #endif
  972. #endif // OBSOLETE
  973. //////////////////////////////////////////////////////////////////////////////
  974. // LLS EXTENDED API //
  975. ////////////////////////
  976. BOOL
  977. NTAPI
  978. LlsCapabilityIsSupported(
  979. LLS_HANDLE Handle,
  980. DWORD Capability );
  981. typedef BOOL (NTAPI *PLLS_CAPABILITY_IS_SUPPORTED)( LLS_HANDLE, DWORD );
  982. NTSTATUS
  983. NTAPI
  984. LlsProductSecurityGetW(
  985. IN LLS_HANDLE Handle,
  986. IN LPWSTR Product,
  987. OUT LPBOOL pSecurity
  988. );
  989. NTSTATUS
  990. NTAPI
  991. LlsProductSecurityGetA(
  992. IN LLS_HANDLE Handle,
  993. IN LPSTR Product,
  994. OUT LPBOOL pSecurity
  995. );
  996. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_SECURITY_GET_W)( LLS_HANDLE, LPWSTR, LPBOOL );
  997. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_SECURITY_GET_A)( LLS_HANDLE, LPSTR, LPBOOL );
  998. #ifdef UNICODE
  999. # define LlsProductSecurityGet LlsProductSecurityGetW
  1000. #else
  1001. # define LlsProductSecurityGet LlsProductSecurityGetA
  1002. #endif
  1003. NTSTATUS
  1004. NTAPI
  1005. LlsProductSecuritySetW(
  1006. IN LLS_HANDLE Handle,
  1007. IN LPWSTR Product
  1008. );
  1009. NTSTATUS
  1010. NTAPI
  1011. LlsProductSecuritySetA(
  1012. IN LLS_HANDLE Handle,
  1013. IN LPSTR Product
  1014. );
  1015. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_SECURITY_SET_W)( LLS_HANDLE, LPWSTR );
  1016. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_SECURITY_SET_A)( LLS_HANDLE, LPSTR );
  1017. #ifdef UNICODE
  1018. # define LlsProductSecuritySet LlsProductSecuritySetW
  1019. #else
  1020. # define LlsProductSecuritySet LlsProductSecuritySetA
  1021. #endif
  1022. NTSTATUS
  1023. NTAPI
  1024. LlsProductLicensesGetW(
  1025. IN LLS_HANDLE Handle,
  1026. IN LPWSTR DisplayName,
  1027. IN DWORD Mode,
  1028. OUT LPDWORD pQuantity );
  1029. NTSTATUS
  1030. NTAPI
  1031. LlsProductLicensesGetA(
  1032. IN LLS_HANDLE Handle,
  1033. IN LPSTR DisplayName,
  1034. IN DWORD Mode,
  1035. OUT LPDWORD pQuantity );
  1036. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_LICENSES_GET_W)( LLS_HANDLE, LPWSTR, DWORD, LPDWORD );
  1037. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_LICENSES_GET_A)( LLS_HANDLE, LPSTR, DWORD, LPDWORD );
  1038. #ifdef UNICODE
  1039. # define LlsProductLicensesGet LlsProductLicensesGetW
  1040. #else
  1041. # define LlsProductLicensesGet LlsProductLicensesGetA
  1042. #endif
  1043. #ifdef OBSOLETE
  1044. NTSTATUS
  1045. NTAPI
  1046. LlsCertificateClaimEnumW(
  1047. IN LLS_HANDLE Handle,
  1048. IN DWORD LicenseLevel,
  1049. IN LPBYTE pLicenseInfo,
  1050. IN DWORD TargetLevel,
  1051. OUT LPBYTE * ppTargets,
  1052. OUT LPDWORD pNumTargets );
  1053. NTSTATUS
  1054. NTAPI
  1055. LlsCertificateClaimEnumA(
  1056. IN LLS_HANDLE Handle,
  1057. IN DWORD LicenseLevel,
  1058. IN LPBYTE pLicenseInfo,
  1059. IN DWORD TargetLevel,
  1060. OUT LPBYTE * ppTargets,
  1061. OUT LPDWORD pNumTargets );
  1062. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ENUM_W)( LLS_HANDLE, DWORD, LPBYTE, DWORD, LPBYTE *, LPDWORD );
  1063. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ENUM_A)( LLS_HANDLE, DWORD, LPBYTE, DWORD, LPBYTE *, LPDWORD );
  1064. #ifdef UNICODE
  1065. # define LlsCertificateClaimEnum LlsCertificateClaimEnumW
  1066. #else
  1067. # define LlsCertificateClaimEnum LlsCertificateClaimEnumA
  1068. #endif
  1069. #endif // OBSOLETE
  1070. NTSTATUS
  1071. NTAPI
  1072. LlsCertificateClaimAddCheckW(
  1073. IN LLS_HANDLE Handle,
  1074. IN DWORD LicenseLevel,
  1075. IN LPBYTE pLicenseInfo,
  1076. OUT LPBOOL pMayInstall );
  1077. NTSTATUS
  1078. NTAPI
  1079. LlsCertificateClaimAddCheckA(
  1080. IN LLS_HANDLE Handle,
  1081. IN DWORD LicenseLevel,
  1082. IN LPBYTE pLicenseInfo,
  1083. OUT LPBOOL pMayInstall );
  1084. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ADD_CHECK_W)( LLS_HANDLE, DWORD, LPBYTE, LPBOOL );
  1085. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ADD_CHECK_A)( LLS_HANDLE, DWORD, LPBYTE, LPBOOL );
  1086. #ifdef UNICODE
  1087. # define LlsCertificateClaimAddCheck LlsCertificateClaimAddCheckW
  1088. #else
  1089. # define LlsCertificateClaimAddCheck LlsCertificateClaimAddCheckA
  1090. #endif
  1091. NTSTATUS
  1092. NTAPI
  1093. LlsCertificateClaimAddW(
  1094. IN LLS_HANDLE Handle,
  1095. IN LPWSTR ServerName,
  1096. IN DWORD LicenseLevel,
  1097. IN LPBYTE pLicenseInfo );
  1098. NTSTATUS
  1099. NTAPI
  1100. LlsCertificateClaimAddA(
  1101. IN LLS_HANDLE Handle,
  1102. IN LPSTR ServerName,
  1103. IN DWORD LicenseLevel,
  1104. IN LPBYTE pLicenseInfo );
  1105. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ADD_W)( LLS_HANDLE, LPWSTR, DWORD, LPBYTE );
  1106. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ADD_A)( LLS_HANDLE, LPSTR, DWORD, LPBYTE );
  1107. #ifdef UNICODE
  1108. # define LlsCertificateClaimAdd LlsCertificateClaimAddW
  1109. #else
  1110. # define LlsCertificateClaimAdd LlsCertificateClaimAddA
  1111. #endif
  1112. typedef NTSTATUS (NTAPI *PLLS_REPL_CONNECT_W)( LPWSTR, LLS_REPL_HANDLE * );
  1113. typedef NTSTATUS (NTAPI *PLLS_REPL_CONNECT_A)( LPSTR, LLS_REPL_HANDLE * );
  1114. typedef NTSTATUS (NTAPI *PLLS_REPL_CLOSE)( PLLS_REPL_HANDLE );
  1115. typedef NTSTATUS (NTAPI *PLLS_FREE_MEMORY)( PVOID );
  1116. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_REQUEST_W)( LLS_REPL_HANDLE, DWORD, LPVOID );
  1117. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_SERVER_ADD_W)( LLS_REPL_HANDLE, ULONG, LPVOID );
  1118. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_SERVER_SERVICE_ADD_W)( LLS_REPL_HANDLE, ULONG, LPVOID );
  1119. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_SERVICE_ADD_W)( LLS_REPL_HANDLE, ULONG, LPVOID );
  1120. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_USER_ADD_W)( LLS_REPL_HANDLE, ULONG, LPVOID );
  1121. NTSTATUS
  1122. NTAPI
  1123. LlsReplicationCertDbAddW(
  1124. LLS_REPL_HANDLE ReplHandle,
  1125. DWORD Level,
  1126. LPVOID Certificates );
  1127. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_CERT_DB_ADD_W)( LLS_REPL_HANDLE, DWORD, LPVOID );
  1128. NTSTATUS
  1129. NTAPI
  1130. LlsReplicationProductSecurityAddW(
  1131. LLS_REPL_HANDLE ReplHandle,
  1132. DWORD Level,
  1133. LPVOID SecureProducts );
  1134. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_PRODUCT_SECURITY_ADD_W)( LLS_REPL_HANDLE, DWORD, LPVOID );
  1135. NTSTATUS
  1136. NTAPI
  1137. LlsReplicationUserAddExW(
  1138. LLS_REPL_HANDLE ReplHandle,
  1139. DWORD Level,
  1140. LPVOID Users );
  1141. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_USER_ADD_EX_W)( LLS_REPL_HANDLE, DWORD, LPVOID );
  1142. NTSTATUS
  1143. NTAPI
  1144. LlsLocalServiceEnumW(
  1145. LLS_HANDLE Handle,
  1146. DWORD Level,
  1147. LPBYTE* bufptr,
  1148. DWORD PrefMaxLen,
  1149. LPDWORD EntriesRead,
  1150. LPDWORD TotalEntries,
  1151. LPDWORD ResumeHandle );
  1152. NTSTATUS
  1153. NTAPI
  1154. LlsLocalServiceEnumA(
  1155. LLS_HANDLE Handle,
  1156. DWORD Level,
  1157. LPBYTE* bufptr,
  1158. DWORD PrefMaxLen,
  1159. LPDWORD EntriesRead,
  1160. LPDWORD TotalEntries,
  1161. LPDWORD ResumeHandle );
  1162. #ifdef UNICODE
  1163. # define LlsLocalServiceEnum LlsLocalServiceEnumW
  1164. #else
  1165. # define LlsLocalServiceEnum LlsLocalServiceEnumA
  1166. #endif
  1167. #ifdef OBSOLETE
  1168. NTSTATUS
  1169. NTAPI
  1170. LlsLocalServiceAddW(
  1171. LLS_HANDLE Handle,
  1172. DWORD Level,
  1173. LPBYTE bufptr );
  1174. NTSTATUS
  1175. NTAPI
  1176. LlsLocalServiceAddA(
  1177. LLS_HANDLE Handle,
  1178. DWORD Level,
  1179. LPBYTE bufptr );
  1180. #ifdef UNICODE
  1181. # define LlsLocalServiceAdd LlsLocalServiceAddW
  1182. #else
  1183. # define LlsLocalServiceAdd LlsLocalServiceAddA
  1184. #endif
  1185. #endif // OBSOLETE
  1186. NTSTATUS
  1187. NTAPI
  1188. LlsLocalServiceInfoSetW(
  1189. LLS_HANDLE Handle,
  1190. LPWSTR KeyName,
  1191. DWORD Level,
  1192. LPBYTE bufptr );
  1193. NTSTATUS
  1194. NTAPI
  1195. LlsLocalServiceInfoSetA(
  1196. LLS_HANDLE Handle,
  1197. LPSTR KeyName,
  1198. DWORD Level,
  1199. LPBYTE bufptr );
  1200. #ifdef UNICODE
  1201. # define LlsLocalServiceInfoSet LlsLocalServiceInfoSetW
  1202. #else
  1203. # define LlsLocalServiceInfoSet LlsLocalServiceInfoSetA
  1204. #endif
  1205. NTSTATUS
  1206. NTAPI
  1207. LlsLocalServiceInfoGetW(
  1208. LLS_HANDLE Handle,
  1209. LPWSTR KeyName,
  1210. DWORD Level,
  1211. LPBYTE * pbufptr );
  1212. NTSTATUS
  1213. NTAPI
  1214. LlsLocalServiceInfoGetA(
  1215. LLS_HANDLE Handle,
  1216. DWORD Level,
  1217. LPSTR KeyName,
  1218. LPBYTE * pbufptr );
  1219. #ifdef UNICODE
  1220. # define LlsLocalServiceInfoGet LlsLocalServiceInfoGetW
  1221. #else
  1222. # define LlsLocalServiceInfoGet LlsLocalServiceInfoGetA
  1223. #endif
  1224. NTSTATUS
  1225. NTAPI
  1226. LlsLicenseRequestW(
  1227. LLS_HANDLE Handle,
  1228. LPWSTR Product,
  1229. ULONG VersionIndex,
  1230. BOOLEAN IsAdmin,
  1231. ULONG DataType,
  1232. ULONG DataSize,
  1233. PBYTE Data,
  1234. LPDWORD pLicenseHandle );
  1235. NTSTATUS
  1236. NTAPI
  1237. LlsLicenseRequestA(
  1238. LLS_HANDLE Handle,
  1239. LPSTR Product,
  1240. ULONG VersionIndex,
  1241. BOOLEAN IsAdmin,
  1242. ULONG DataType,
  1243. ULONG DataSize,
  1244. PBYTE Data,
  1245. LPDWORD pLicenseHandle );
  1246. #ifdef UNICODE
  1247. # define LlsLicenseRequest LlsLicenseRequestW
  1248. #else
  1249. # define LlsLicenseRequest LlsLicenseRequestA
  1250. #endif
  1251. NTSTATUS
  1252. NTAPI
  1253. LlsLicenseFree(
  1254. LLS_HANDLE Handle,
  1255. DWORD LicenseHandle );
  1256. NTSTATUS
  1257. NTAPI
  1258. LlsLicenseRequest2W(
  1259. LLS_HANDLE Handle,
  1260. LPWSTR Product,
  1261. ULONG VersionIndex,
  1262. BOOLEAN IsAdmin,
  1263. ULONG DataType,
  1264. ULONG DataSize,
  1265. PBYTE Data,
  1266. PHANDLE pLicenseHandle );
  1267. NTSTATUS
  1268. NTAPI
  1269. LlsLicenseRequest2A(
  1270. LLS_HANDLE Handle,
  1271. LPSTR Product,
  1272. ULONG VersionIndex,
  1273. BOOLEAN IsAdmin,
  1274. ULONG DataType,
  1275. ULONG DataSize,
  1276. PBYTE Data,
  1277. PHANDLE pLicenseHandle );
  1278. #ifdef UNICODE
  1279. # define LlsLicenseRequest2 LlsLicenseRequest2W
  1280. #else
  1281. # define LlsLicenseRequest2 LlsLicenseRequest2A
  1282. #endif
  1283. NTSTATUS
  1284. NTAPI
  1285. LlsLicenseFree2(
  1286. LLS_HANDLE Handle,
  1287. HANDLE LicenseHandle );
  1288. //////////////////////////////////////////////////////////////////////////////
  1289. // CCF API //
  1290. ///////////////
  1291. #define CCF_ENTER_FLAG_PER_SEAT_ONLY ( 1 )
  1292. #define CCF_ENTER_FLAG_PER_SERVER_ONLY ( 2 )
  1293. #define CCF_ENTER_FLAG_SERVER_IS_ES ( 4 )
  1294. // prototype for certificate source enter API
  1295. typedef DWORD (APIENTRY *PCCF_ENTER_API)( HWND hWndParent,
  1296. LPCSTR pszServerName,
  1297. LPCSTR pszProductName,
  1298. LPCSTR pszVendor,
  1299. DWORD dwFlags );
  1300. DWORD APIENTRY CCFCertificateEnterUI( HWND hWndParent,
  1301. LPCSTR pszServerName,
  1302. LPCSTR pszProductName,
  1303. LPCSTR pszVendor,
  1304. DWORD dwFlags,
  1305. LPCSTR pszSourceToUse );
  1306. // prototype for certificate source remove API
  1307. typedef DWORD (APIENTRY *PCCF_REMOVE_API)( HWND hWndParent,
  1308. LPCSTR pszServerName,
  1309. DWORD dwFlags,
  1310. DWORD dwLicenseLevel,
  1311. LPVOID lpvLicenseInfo );
  1312. DWORD APIENTRY CCFCertificateRemoveUI( HWND hWndParent,
  1313. LPCSTR pszServerName,
  1314. LPCSTR pszProductName,
  1315. LPCSTR pszVendor,
  1316. DWORD dwFlags,
  1317. LPCSTR pszSourceToUse );
  1318. #endif
  1319. //
  1320. // Registry values
  1321. //
  1322. #define REG_KEY_LICENSE TEXT("SYSTEM\\CurrentControlSet\\Services\\LicenseInfo")
  1323. #define REG_KEY_CONFIG TEXT("SYSTEM\\CurrentControlSet\\Services\\LicenseService\\Parameters")
  1324. #define REG_VALUE_NAME TEXT("DisplayName")
  1325. #define REG_VALUE_FAMILY TEXT("FamilyDisplayName")
  1326. #define REG_VALUE_MODE TEXT("Mode")
  1327. #define REG_VALUE_FLIP TEXT("FlipAllow")
  1328. #define REG_VALUE_LIMIT TEXT("ConcurrentLimit")
  1329. #define REG_VALUE_HIGHMARK TEXT("LocalKey")
  1330. #ifdef __cplusplus
  1331. }
  1332. #endif
  1333. #endif