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.

1490 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. NTSTATUS
  868. NTAPI
  869. LlsServerProductEnumW(
  870. IN LLS_HANDLE Handle,
  871. IN LPWSTR Server,
  872. IN DWORD Level, // Levels 0,1 supported
  873. OUT LPBYTE* bufptr,
  874. IN DWORD prefmaxlen,
  875. OUT LPDWORD EntriesRead,
  876. OUT LPDWORD TotalEntries,
  877. IN OUT LPDWORD ResumeHandle
  878. );
  879. NTSTATUS
  880. NTAPI
  881. LlsServerProductEnumA(
  882. IN LLS_HANDLE Handle,
  883. IN LPSTR Server,
  884. IN DWORD Level, // Levels 0,1 supported
  885. OUT LPBYTE* bufptr,
  886. IN DWORD prefmaxlen,
  887. OUT LPDWORD EntriesRead,
  888. OUT LPDWORD TotalEntries,
  889. IN OUT LPDWORD ResumeHandle
  890. );
  891. #ifdef UNICODE
  892. #define LlsServerUserEnum LlsServerUserEnumW
  893. #else
  894. #define LlsServerUserEnum LlsServerUserEnumA
  895. #endif
  896. //
  897. // Concurrent (Per-Server) mode API's (these will interact with the registry
  898. // on the remote system).
  899. //
  900. NTSTATUS
  901. NTAPI
  902. LlsLocalProductEnumW(
  903. IN LLS_HANDLE Handle,
  904. IN DWORD Level, // Levels 0,1 supported
  905. OUT LPBYTE* bufptr,
  906. IN DWORD prefmaxlen,
  907. OUT LPDWORD EntriesRead,
  908. OUT LPDWORD TotalEntries,
  909. IN OUT LPDWORD ResumeHandle
  910. );
  911. NTSTATUS
  912. NTAPI
  913. LlsLocalProductEnumA(
  914. IN LLS_HANDLE Handle,
  915. IN DWORD Level, // Levels 0,1 supported
  916. OUT LPBYTE* bufptr,
  917. IN DWORD prefmaxlen,
  918. OUT LPDWORD EntriesRead,
  919. OUT LPDWORD TotalEntries,
  920. IN OUT LPDWORD ResumeHandle
  921. );
  922. #ifdef UNICODE
  923. #define LlsLocalProductEnum LlsLocalProductEnumW
  924. #else
  925. #define LlsLocalProductEnum LlsLocalProductEnumA
  926. #endif
  927. NTSTATUS
  928. NTAPI
  929. LlsLocalProductInfoGetW(
  930. IN LLS_HANDLE Handle,
  931. IN LPWSTR Product,
  932. IN DWORD Level,
  933. OUT LPBYTE* bufptr
  934. );
  935. NTSTATUS
  936. NTAPI
  937. LlsLocalProductInfoGetA(
  938. IN LLS_HANDLE Handle,
  939. IN LPSTR Product,
  940. IN DWORD Level,
  941. OUT LPBYTE* bufptr
  942. );
  943. #ifdef UNICODE
  944. #define LlsLocalProductInfoGet LlsLocalProductInfoGetW
  945. #else
  946. #define LlsLocalProductInfoGet LlsLocalProductInfoGetA
  947. #endif
  948. NTSTATUS
  949. NTAPI
  950. LlsLocalProductInfoSetW(
  951. IN LLS_HANDLE Handle,
  952. IN LPWSTR Product,
  953. IN DWORD Level,
  954. IN LPBYTE bufptr
  955. );
  956. NTSTATUS
  957. NTAPI
  958. LlsLocalProductInfoSetA(
  959. IN LLS_HANDLE Handle,
  960. IN LPSTR Product,
  961. IN DWORD Level,
  962. IN LPBYTE bufptr
  963. );
  964. #ifdef UNICODE
  965. #define LlsLocalProductInfoSet LlsLocalProductInfoSetW
  966. #else
  967. #define LlsLocalProductInfoSet LlsLocalProductInfoSetA
  968. #endif
  969. //////////////////////////////////////////////////////////////////////////////
  970. // LLS EXTENDED API //
  971. ////////////////////////
  972. BOOL
  973. NTAPI
  974. LlsCapabilityIsSupported(
  975. LLS_HANDLE Handle,
  976. DWORD Capability );
  977. typedef BOOL (NTAPI *PLLS_CAPABILITY_IS_SUPPORTED)( LLS_HANDLE, DWORD );
  978. NTSTATUS
  979. NTAPI
  980. LlsProductSecurityGetW(
  981. IN LLS_HANDLE Handle,
  982. IN LPWSTR Product,
  983. OUT LPBOOL pSecurity
  984. );
  985. NTSTATUS
  986. NTAPI
  987. LlsProductSecurityGetA(
  988. IN LLS_HANDLE Handle,
  989. IN LPSTR Product,
  990. OUT LPBOOL pSecurity
  991. );
  992. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_SECURITY_GET_W)( LLS_HANDLE, LPWSTR, LPBOOL );
  993. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_SECURITY_GET_A)( LLS_HANDLE, LPSTR, LPBOOL );
  994. #ifdef UNICODE
  995. # define LlsProductSecurityGet LlsProductSecurityGetW
  996. #else
  997. # define LlsProductSecurityGet LlsProductSecurityGetA
  998. #endif
  999. NTSTATUS
  1000. NTAPI
  1001. LlsProductSecuritySetW(
  1002. IN LLS_HANDLE Handle,
  1003. IN LPWSTR Product
  1004. );
  1005. NTSTATUS
  1006. NTAPI
  1007. LlsProductSecuritySetA(
  1008. IN LLS_HANDLE Handle,
  1009. IN LPSTR Product
  1010. );
  1011. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_SECURITY_SET_W)( LLS_HANDLE, LPWSTR );
  1012. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_SECURITY_SET_A)( LLS_HANDLE, LPSTR );
  1013. #ifdef UNICODE
  1014. # define LlsProductSecuritySet LlsProductSecuritySetW
  1015. #else
  1016. # define LlsProductSecuritySet LlsProductSecuritySetA
  1017. #endif
  1018. NTSTATUS
  1019. NTAPI
  1020. LlsProductLicensesGetW(
  1021. IN LLS_HANDLE Handle,
  1022. IN LPWSTR DisplayName,
  1023. IN DWORD Mode,
  1024. OUT LPDWORD pQuantity );
  1025. NTSTATUS
  1026. NTAPI
  1027. LlsProductLicensesGetA(
  1028. IN LLS_HANDLE Handle,
  1029. IN LPSTR DisplayName,
  1030. IN DWORD Mode,
  1031. OUT LPDWORD pQuantity );
  1032. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_LICENSES_GET_W)( LLS_HANDLE, LPWSTR, DWORD, LPDWORD );
  1033. typedef NTSTATUS (NTAPI *PLLS_PRODUCT_LICENSES_GET_A)( LLS_HANDLE, LPSTR, DWORD, LPDWORD );
  1034. #ifdef UNICODE
  1035. # define LlsProductLicensesGet LlsProductLicensesGetW
  1036. #else
  1037. # define LlsProductLicensesGet LlsProductLicensesGetA
  1038. #endif
  1039. NTSTATUS
  1040. NTAPI
  1041. LlsCertificateClaimEnumW(
  1042. IN LLS_HANDLE Handle,
  1043. IN DWORD LicenseLevel,
  1044. IN LPBYTE pLicenseInfo,
  1045. IN DWORD TargetLevel,
  1046. OUT LPBYTE * ppTargets,
  1047. OUT LPDWORD pNumTargets );
  1048. NTSTATUS
  1049. NTAPI
  1050. LlsCertificateClaimEnumA(
  1051. IN LLS_HANDLE Handle,
  1052. IN DWORD LicenseLevel,
  1053. IN LPBYTE pLicenseInfo,
  1054. IN DWORD TargetLevel,
  1055. OUT LPBYTE * ppTargets,
  1056. OUT LPDWORD pNumTargets );
  1057. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ENUM_W)( LLS_HANDLE, DWORD, LPBYTE, DWORD, LPBYTE *, LPDWORD );
  1058. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ENUM_A)( LLS_HANDLE, DWORD, LPBYTE, DWORD, LPBYTE *, LPDWORD );
  1059. #ifdef UNICODE
  1060. # define LlsCertificateClaimEnum LlsCertificateClaimEnumW
  1061. #else
  1062. # define LlsCertificateClaimEnum LlsCertificateClaimEnumA
  1063. #endif
  1064. NTSTATUS
  1065. NTAPI
  1066. LlsCertificateClaimAddCheckW(
  1067. IN LLS_HANDLE Handle,
  1068. IN DWORD LicenseLevel,
  1069. IN LPBYTE pLicenseInfo,
  1070. OUT LPBOOL pMayInstall );
  1071. NTSTATUS
  1072. NTAPI
  1073. LlsCertificateClaimAddCheckA(
  1074. IN LLS_HANDLE Handle,
  1075. IN DWORD LicenseLevel,
  1076. IN LPBYTE pLicenseInfo,
  1077. OUT LPBOOL pMayInstall );
  1078. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ADD_CHECK_W)( LLS_HANDLE, DWORD, LPBYTE, LPBOOL );
  1079. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ADD_CHECK_A)( LLS_HANDLE, DWORD, LPBYTE, LPBOOL );
  1080. #ifdef UNICODE
  1081. # define LlsCertificateClaimAddCheck LlsCertificateClaimAddCheckW
  1082. #else
  1083. # define LlsCertificateClaimAddCheck LlsCertificateClaimAddCheckA
  1084. #endif
  1085. NTSTATUS
  1086. NTAPI
  1087. LlsCertificateClaimAddW(
  1088. IN LLS_HANDLE Handle,
  1089. IN LPWSTR ServerName,
  1090. IN DWORD LicenseLevel,
  1091. IN LPBYTE pLicenseInfo );
  1092. NTSTATUS
  1093. NTAPI
  1094. LlsCertificateClaimAddA(
  1095. IN LLS_HANDLE Handle,
  1096. IN LPSTR ServerName,
  1097. IN DWORD LicenseLevel,
  1098. IN LPBYTE pLicenseInfo );
  1099. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ADD_W)( LLS_HANDLE, LPWSTR, DWORD, LPBYTE );
  1100. typedef NTSTATUS (NTAPI *PLLS_CERTIFICATE_CLAIM_ADD_A)( LLS_HANDLE, LPSTR, DWORD, LPBYTE );
  1101. #ifdef UNICODE
  1102. # define LlsCertificateClaimAdd LlsCertificateClaimAddW
  1103. #else
  1104. # define LlsCertificateClaimAdd LlsCertificateClaimAddA
  1105. #endif
  1106. NTSTATUS
  1107. NTAPI
  1108. LlsReplicationCertDbAddW(
  1109. LLS_REPL_HANDLE ReplHandle,
  1110. DWORD Level,
  1111. LPVOID Certificates );
  1112. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_CERT_DB_ADD_W)( LLS_REPL_HANDLE, DWORD, LPVOID );
  1113. NTSTATUS
  1114. NTAPI
  1115. LlsReplicationProductSecurityAddW(
  1116. LLS_REPL_HANDLE ReplHandle,
  1117. DWORD Level,
  1118. LPVOID SecureProducts );
  1119. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_PRODUCT_SECURITY_ADD_W)( LLS_REPL_HANDLE, DWORD, LPVOID );
  1120. NTSTATUS
  1121. NTAPI
  1122. LlsReplicationUserAddExW(
  1123. LLS_REPL_HANDLE ReplHandle,
  1124. DWORD Level,
  1125. LPVOID Users );
  1126. typedef NTSTATUS (NTAPI *PLLS_REPLICATION_USER_ADD_EX_W)( LLS_REPL_HANDLE, DWORD, LPVOID );
  1127. NTSTATUS
  1128. NTAPI
  1129. LlsLocalServiceEnumW(
  1130. LLS_HANDLE Handle,
  1131. DWORD Level,
  1132. LPBYTE* bufptr,
  1133. DWORD PrefMaxLen,
  1134. LPDWORD EntriesRead,
  1135. LPDWORD TotalEntries,
  1136. LPDWORD ResumeHandle );
  1137. NTSTATUS
  1138. NTAPI
  1139. LlsLocalServiceEnumA(
  1140. LLS_HANDLE Handle,
  1141. DWORD Level,
  1142. LPBYTE* bufptr,
  1143. DWORD PrefMaxLen,
  1144. LPDWORD EntriesRead,
  1145. LPDWORD TotalEntries,
  1146. LPDWORD ResumeHandle );
  1147. #ifdef UNICODE
  1148. # define LlsLocalServiceEnum LlsLocalServiceEnumW
  1149. #else
  1150. # define LlsLocalServiceEnum LlsLocalServiceEnumA
  1151. #endif
  1152. NTSTATUS
  1153. NTAPI
  1154. LlsLocalServiceAddW(
  1155. LLS_HANDLE Handle,
  1156. DWORD Level,
  1157. LPBYTE bufptr );
  1158. NTSTATUS
  1159. NTAPI
  1160. LlsLocalServiceAddA(
  1161. LLS_HANDLE Handle,
  1162. DWORD Level,
  1163. LPBYTE bufptr );
  1164. #ifdef UNICODE
  1165. # define LlsLocalServiceAdd LlsLocalServiceAddW
  1166. #else
  1167. # define LlsLocalServiceAdd LlsLocalServiceAddA
  1168. #endif
  1169. NTSTATUS
  1170. NTAPI
  1171. LlsLocalServiceInfoSetW(
  1172. LLS_HANDLE Handle,
  1173. LPWSTR KeyName,
  1174. DWORD Level,
  1175. LPBYTE bufptr );
  1176. NTSTATUS
  1177. NTAPI
  1178. LlsLocalServiceInfoSetA(
  1179. LLS_HANDLE Handle,
  1180. LPSTR KeyName,
  1181. DWORD Level,
  1182. LPBYTE bufptr );
  1183. #ifdef UNICODE
  1184. # define LlsLocalServiceInfoSet LlsLocalServiceInfoSetW
  1185. #else
  1186. # define LlsLocalServiceInfoSet LlsLocalServiceInfoSetA
  1187. #endif
  1188. NTSTATUS
  1189. NTAPI
  1190. LlsLocalServiceInfoGetW(
  1191. LLS_HANDLE Handle,
  1192. LPWSTR KeyName,
  1193. DWORD Level,
  1194. LPBYTE * pbufptr );
  1195. NTSTATUS
  1196. NTAPI
  1197. LlsLocalServiceInfoGetA(
  1198. LLS_HANDLE Handle,
  1199. DWORD Level,
  1200. LPSTR KeyName,
  1201. LPBYTE * pbufptr );
  1202. #ifdef UNICODE
  1203. # define LlsLocalServiceInfoGet LlsLocalServiceInfoGetW
  1204. #else
  1205. # define LlsLocalServiceInfoGet LlsLocalServiceInfoGetA
  1206. #endif
  1207. NTSTATUS
  1208. NTAPI
  1209. LlsLicenseRequestW(
  1210. LLS_HANDLE Handle,
  1211. LPWSTR Product,
  1212. ULONG VersionIndex,
  1213. BOOLEAN IsAdmin,
  1214. ULONG DataType,
  1215. ULONG DataSize,
  1216. PBYTE Data,
  1217. LPDWORD pLicenseHandle );
  1218. NTSTATUS
  1219. NTAPI
  1220. LlsLicenseRequestA(
  1221. LLS_HANDLE Handle,
  1222. LPSTR Product,
  1223. ULONG VersionIndex,
  1224. BOOLEAN IsAdmin,
  1225. ULONG DataType,
  1226. ULONG DataSize,
  1227. PBYTE Data,
  1228. LPDWORD pLicenseHandle );
  1229. #ifdef UNICODE
  1230. # define LlsLicenseRequest LlsLicenseRequestW
  1231. #else
  1232. # define LlsLicenseRequest LlsLicenseRequestA
  1233. #endif
  1234. NTSTATUS
  1235. NTAPI
  1236. LlsLicenseFree(
  1237. LLS_HANDLE Handle,
  1238. DWORD LicenseHandle );
  1239. //////////////////////////////////////////////////////////////////////////////
  1240. // CCF API //
  1241. ///////////////
  1242. #define CCF_ENTER_FLAG_PER_SEAT_ONLY ( 1 )
  1243. #define CCF_ENTER_FLAG_PER_SERVER_ONLY ( 2 )
  1244. #define CCF_ENTER_FLAG_SERVER_IS_ES ( 4 )
  1245. // prototype for certificate source enter API
  1246. typedef DWORD (APIENTRY *PCCF_ENTER_API)( HWND hWndParent,
  1247. LPCSTR pszServerName,
  1248. LPCSTR pszProductName,
  1249. LPCSTR pszVendor,
  1250. DWORD dwFlags );
  1251. DWORD APIENTRY CCFCertificateEnterUI( HWND hWndParent,
  1252. LPCSTR pszServerName,
  1253. LPCSTR pszProductName,
  1254. LPCSTR pszVendor,
  1255. DWORD dwFlags,
  1256. LPCSTR pszSourceToUse );
  1257. // prototype for certificate source remove API
  1258. typedef DWORD (APIENTRY *PCCF_REMOVE_API)( HWND hWndParent,
  1259. LPCSTR pszServerName,
  1260. DWORD dwFlags,
  1261. DWORD dwLicenseLevel,
  1262. LPVOID lpvLicenseInfo );
  1263. DWORD APIENTRY CCFCertificateRemoveUI( HWND hWndParent,
  1264. LPCSTR pszServerName,
  1265. LPCSTR pszProductName,
  1266. LPCSTR pszVendor,
  1267. DWORD dwFlags,
  1268. LPCSTR pszSourceToUse );
  1269. #endif
  1270. //
  1271. // Registry values
  1272. //
  1273. #define REG_KEY_LICENSE TEXT("SYSTEM\\CurrentControlSet\\Services\\LicenseInfo")
  1274. #define REG_KEY_CONFIG TEXT("SYSTEM\\CurrentControlSet\\Services\\LicenseService\\Parameters")
  1275. #define REG_VALUE_NAME TEXT("DisplayName")
  1276. #define REG_VALUE_FAMILY TEXT("FamilyDisplayName")
  1277. #define REG_VALUE_MODE TEXT("Mode")
  1278. #define REG_VALUE_FLIP TEXT("FlipAllow")
  1279. #define REG_VALUE_LIMIT TEXT("ConcurrentLimit")
  1280. #define REG_VALUE_HIGHMARK TEXT("LocalKey")
  1281. #ifdef __cplusplus
  1282. }
  1283. #endif
  1284. #endif