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.

1170 lines
38 KiB

  1. #pragma warning( disable: 4049 ) /* more than 64k source lines */
  2. /* this ALWAYS GENERATED file contains the definitions for the interfaces */
  3. /* File created by MIDL compiler version 6.00.0347 */
  4. /* Compiler settings for samrpc.idl, samsrv.acf:
  5. Oicf, W1, Zp8, env=Win32 (32b run)
  6. protocol : dce , ms_ext, c_ext, oldnames, robust
  7. error checks: allocation ref bounds_check enum stub_data , no_format_optimization
  8. VC __declspec() decoration level:
  9. __declspec(uuid()), __declspec(selectany), __declspec(novtable)
  10. DECLSPEC_UUID(), MIDL_INTERFACE()
  11. */
  12. //@@MIDL_FILE_HEADING( )
  13. /* verify that the <rpcndr.h> version is high enough to compile this file*/
  14. #ifndef __REQUIRED_RPCNDR_H_VERSION__
  15. #define __REQUIRED_RPCNDR_H_VERSION__ 475
  16. #endif
  17. #include "rpc.h"
  18. #include "rpcndr.h"
  19. #ifndef __RPCNDR_H_VERSION__
  20. #error this stub requires an updated version of <rpcndr.h>
  21. #endif // __RPCNDR_H_VERSION__
  22. #ifndef __samrpc_h__
  23. #define __samrpc_h__
  24. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  25. #pragma once
  26. #endif
  27. /* Forward Declarations */
  28. /* header files for imported files */
  29. #include "samimp.h"
  30. #ifdef __cplusplus
  31. extern "C"{
  32. #endif
  33. void * __RPC_USER MIDL_user_allocate(size_t);
  34. void __RPC_USER MIDL_user_free( void * );
  35. #ifndef __samr_INTERFACE_DEFINED__
  36. #define __samr_INTERFACE_DEFINED__
  37. /* interface samr */
  38. /* [strict_context_handle][implicit_handle][unique][ms_union][version][uuid] */
  39. typedef struct _RPC_UNICODE_STRING
  40. {
  41. USHORT Length;
  42. USHORT MaximumLength;
  43. /* [length_is][size_is] */ PWCH Buffer;
  44. } RPC_UNICODE_STRING;
  45. typedef struct _RPC_UNICODE_STRING *PRPC_UNICODE_STRING;
  46. typedef struct _RPC_CYPHER_DATA
  47. {
  48. ULONG Length;
  49. ULONG MaximumLength;
  50. /* [length_is][size_is] */ PCHAR Buffer;
  51. } RPC_CYPHER_DATA;
  52. typedef struct _RPC_CYPHER_DATA *PRPC_CYPHER_DATA;
  53. typedef struct _RPC_STRING
  54. {
  55. USHORT Length;
  56. USHORT MaximumLength;
  57. /* [length_is][size_is] */ PCHAR Buffer;
  58. } RPC_STRING;
  59. typedef struct _RPC_STRING *PRPC_STRING;
  60. typedef struct _RPC_STRING RPC_ANSI_STRING;
  61. typedef struct _RPC_STRING *PRPC_ANSI_STRING;
  62. typedef struct _RPC_SID
  63. {
  64. UCHAR Revision;
  65. UCHAR SubAuthorityCount;
  66. SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
  67. /* [size_is] */ ULONG SubAuthority[ 1 ];
  68. } RPC_SID;
  69. typedef struct _RPC_SID *PRPC_SID;
  70. typedef struct _RPC_SID **PPRPC_SID;
  71. typedef /* [handle] */ LPWSTR PSAMPR_SERVER_NAME;
  72. typedef /* [context_handle] */ PVOID SAMPR_HANDLE;
  73. #define SAM_NETWORK_REVISION_1 (1)
  74. #define SAM_NETWORK_REVISION_2 (2)
  75. #define SAM_NETWORK_REVISION_3 (3)
  76. #define SAM_NETWORK_REVISION_LATEST SAM_NETWORK_REVISION_3
  77. #define SAM_CLIENT_PRE_NT5 SAM_NETWORK_REVISION_1
  78. #define SAM_CLIENT_NT5 SAM_NETWORK_REVISION_2
  79. #define SAM_CLIENT_LATEST SAM_NETWORK_REVISION_LATEST
  80. #define SAM_EXTENDED_SID_DOMAIN 0x00000001
  81. #define SAM_EXTENDED_SID_DOMAIN_COMPAT_1 0x00000002
  82. #define SAM_EXTENDED_SID_DOMAIN_COMPAT_2 0x00000004
  83. typedef struct _SAMPR_RID_ENUMERATION
  84. {
  85. ULONG RelativeId;
  86. RPC_UNICODE_STRING Name;
  87. } SAMPR_RID_ENUMERATION;
  88. typedef struct _SAMPR_RID_ENUMERATION *PSAMPR_RID_ENUMERATION;
  89. typedef struct _SAMPR_SID_ENUMERATION
  90. {
  91. PSID Sid;
  92. RPC_UNICODE_STRING Name;
  93. } SAMPR_SID_ENUMERATION;
  94. typedef struct _SAMPR_SID_ENUMERATION *PSAMPR_SID_ENUMERATION;
  95. typedef struct _SAMPR_ENUMERATION_BUFFER
  96. {
  97. ULONG EntriesRead;
  98. /* [size_is] */ PSAMPR_RID_ENUMERATION Buffer;
  99. } SAMPR_ENUMERATION_BUFFER;
  100. typedef struct _SAMPR_ENUMERATION_BUFFER *PSAMPR_ENUMERATION_BUFFER;
  101. typedef struct _SAMPR_SR_SECURITY_DESCRIPTOR
  102. {
  103. ULONG Length;
  104. /* [size_is] */ PUCHAR SecurityDescriptor;
  105. } SAMPR_SR_SECURITY_DESCRIPTOR;
  106. typedef struct _SAMPR_SR_SECURITY_DESCRIPTOR *PSAMPR_SR_SECURITY_DESCRIPTOR;
  107. typedef struct _SAMPR_GET_GROUPS_BUFFER
  108. {
  109. ULONG MembershipCount;
  110. /* [size_is] */ PGROUP_MEMBERSHIP Groups;
  111. } SAMPR_GET_GROUPS_BUFFER;
  112. typedef struct _SAMPR_GET_GROUPS_BUFFER *PSAMPR_GET_GROUPS_BUFFER;
  113. typedef struct _SAMPR_GET_MEMBERS_BUFFER
  114. {
  115. ULONG MemberCount;
  116. /* [size_is] */ PULONG Members;
  117. /* [size_is] */ PULONG Attributes;
  118. } SAMPR_GET_MEMBERS_BUFFER;
  119. typedef struct _SAMPR_GET_MEMBERS_BUFFER *PSAMPR_GET_MEMBERS_BUFFER;
  120. typedef struct _SAMPR_LOGON_HOURS
  121. {
  122. USHORT UnitsPerWeek;
  123. /* [length_is][size_is] */ PUCHAR LogonHours;
  124. } SAMPR_LOGON_HOURS;
  125. typedef struct _SAMPR_LOGON_HOURS *PSAMPR_LOGON_HOURS;
  126. typedef struct _SAMPR_ULONG_ARRAY
  127. {
  128. ULONG Count;
  129. /* [size_is] */ ULONG *Element;
  130. } SAMPR_ULONG_ARRAY;
  131. typedef struct _SAMPR_ULONG_ARRAY *PSAMPR_ULONG_ARRAY;
  132. typedef struct _SAMPR_SID_INFORMATION
  133. {
  134. PRPC_SID SidPointer;
  135. } SAMPR_SID_INFORMATION;
  136. typedef /* [allocate] */ struct _SAMPR_SID_INFORMATION *PSAMPR_SID_INFORMATION;
  137. typedef struct _SAMPR_PSID_ARRAY
  138. {
  139. ULONG Count;
  140. /* [size_is] */ PSAMPR_SID_INFORMATION Sids;
  141. } SAMPR_PSID_ARRAY;
  142. typedef struct _SAMPR_PSID_ARRAY *PSAMPR_PSID_ARRAY;
  143. typedef struct _SAMPR_UNICODE_STRING_ARRAY
  144. {
  145. ULONG Count;
  146. /* [size_is] */ RPC_UNICODE_STRING *Element;
  147. } SAMPR_UNICODE_STRING_ARRAY;
  148. typedef struct _SAMPR_UNICODE_STRING_ARRAY *PSAMPR_UNICODE_STRING_ARRAY;
  149. typedef RPC_UNICODE_STRING SAMPR_RETURNED_STRING;
  150. typedef RPC_UNICODE_STRING *PSAMPR_RETURNED_STRING;
  151. typedef STRING SAMPR_RETURNED_NORMAL_STRING;
  152. typedef STRING *PSAMPR_RETURNED_NORMAL_STRING;
  153. typedef struct _SAMPR_RETURNED_USTRING_ARRAY
  154. {
  155. ULONG Count;
  156. /* [size_is] */ PSAMPR_RETURNED_STRING Element;
  157. } SAMPR_RETURNED_USTRING_ARRAY;
  158. typedef struct _SAMPR_RETURNED_USTRING_ARRAY *PSAMPR_RETURNED_USTRING_ARRAY;
  159. typedef struct _SAMPR_REVISION_INFO_V1
  160. {
  161. ULONG Revision;
  162. ULONG SupportedFeatures;
  163. } SAMPR_REVISION_INFO_V1;
  164. typedef struct _SAMPR_REVISION_INFO_V1 *PSAMPR_REVISION_INFO_V1;
  165. typedef /* [public][public][public][switch_type] */ union __MIDL_samr_0001
  166. {
  167. /* [case()] */ SAMPR_REVISION_INFO_V1 V1;
  168. } SAMPR_REVISION_INFO;
  169. typedef /* [switch_type] */ union __MIDL_samr_0001 *PSAMPR_REVISION_INFO;
  170. #pragma pack(4)
  171. typedef struct _SAMPR_DOMAIN_GENERAL_INFORMATION
  172. {
  173. OLD_LARGE_INTEGER ForceLogoff;
  174. RPC_UNICODE_STRING OemInformation;
  175. RPC_UNICODE_STRING DomainName;
  176. RPC_UNICODE_STRING ReplicaSourceNodeName;
  177. OLD_LARGE_INTEGER DomainModifiedCount;
  178. ULONG DomainServerState;
  179. ULONG DomainServerRole;
  180. BOOLEAN UasCompatibilityRequired;
  181. ULONG UserCount;
  182. ULONG GroupCount;
  183. ULONG AliasCount;
  184. } SAMPR_DOMAIN_GENERAL_INFORMATION;
  185. typedef struct _SAMPR_DOMAIN_GENERAL_INFORMATION *PSAMPR_DOMAIN_GENERAL_INFORMATION;
  186. #pragma pack()
  187. #pragma pack(4)
  188. typedef struct _SAMPR_DOMAIN_GENERAL_INFORMATION2
  189. {
  190. SAMPR_DOMAIN_GENERAL_INFORMATION I1;
  191. LARGE_INTEGER LockoutDuration;
  192. LARGE_INTEGER LockoutObservationWindow;
  193. USHORT LockoutThreshold;
  194. } SAMPR_DOMAIN_GENERAL_INFORMATION2;
  195. typedef struct _SAMPR_DOMAIN_GENERAL_INFORMATION2 *PSAMPR_DOMAIN_GENERAL_INFORMATION2;
  196. #pragma pack()
  197. typedef struct _SAMPR_DOMAIN_OEM_INFORMATION
  198. {
  199. RPC_UNICODE_STRING OemInformation;
  200. } SAMPR_DOMAIN_OEM_INFORMATION;
  201. typedef struct _SAMPR_DOMAIN_OEM_INFORMATION *PSAMPR_DOMAIN_OEM_INFORMATION;
  202. typedef struct _SAMPR_DOMAIN_NAME_INFORMATION
  203. {
  204. RPC_UNICODE_STRING DomainName;
  205. } SAMPR_DOMAIN_NAME_INFORMATION;
  206. typedef struct _SAMPR_DOMAIN_NAME_INFORMATION *PSAMPR_DOMAIN_NAME_INFORMATION;
  207. typedef struct SAMPR_DOMAIN_REPLICATION_INFORMATION
  208. {
  209. RPC_UNICODE_STRING ReplicaSourceNodeName;
  210. } SAMPR_DOMAIN_REPLICATION_INFORMATION;
  211. typedef struct SAMPR_DOMAIN_REPLICATION_INFORMATION *PSAMPR_DOMAIN_REPLICATION_INFORMATION;
  212. typedef struct _SAMPR_DOMAIN_LOCKOUT_INFORMATION
  213. {
  214. LARGE_INTEGER LockoutDuration;
  215. LARGE_INTEGER LockoutObservationWindow;
  216. USHORT LockoutThreshold;
  217. } SAMPR_DOMAIN_LOCKOUT_INFORMATION;
  218. typedef struct _SAMPR_DOMAIN_LOCKOUT_INFORMATION *PSAMPR_DOMAIN_LOCKOUT_INFORMATION;
  219. typedef /* [switch_type] */ union _SAMPR_DOMAIN_INFO_BUFFER
  220. {
  221. /* [case()] */ DOMAIN_PASSWORD_INFORMATION Password;
  222. /* [case()] */ SAMPR_DOMAIN_GENERAL_INFORMATION General;
  223. /* [case()] */ DOMAIN_LOGOFF_INFORMATION Logoff;
  224. /* [case()] */ SAMPR_DOMAIN_OEM_INFORMATION Oem;
  225. /* [case()] */ SAMPR_DOMAIN_NAME_INFORMATION Name;
  226. /* [case()] */ DOMAIN_SERVER_ROLE_INFORMATION Role;
  227. /* [case()] */ SAMPR_DOMAIN_REPLICATION_INFORMATION Replication;
  228. /* [case()] */ DOMAIN_MODIFIED_INFORMATION Modified;
  229. /* [case()] */ DOMAIN_STATE_INFORMATION State;
  230. /* [case()] */ SAMPR_DOMAIN_GENERAL_INFORMATION2 General2;
  231. /* [case()] */ SAMPR_DOMAIN_LOCKOUT_INFORMATION Lockout;
  232. /* [case()] */ DOMAIN_MODIFIED_INFORMATION2 Modified2;
  233. } SAMPR_DOMAIN_INFO_BUFFER;
  234. typedef /* [switch_type] */ union _SAMPR_DOMAIN_INFO_BUFFER *PSAMPR_DOMAIN_INFO_BUFFER;
  235. typedef struct _SAMPR_GROUP_GENERAL_INFORMATION
  236. {
  237. RPC_UNICODE_STRING Name;
  238. ULONG Attributes;
  239. ULONG MemberCount;
  240. RPC_UNICODE_STRING AdminComment;
  241. } SAMPR_GROUP_GENERAL_INFORMATION;
  242. typedef struct _SAMPR_GROUP_GENERAL_INFORMATION *PSAMPR_GROUP_GENERAL_INFORMATION;
  243. typedef struct _SAMPR_GROUP_NAME_INFORMATION
  244. {
  245. RPC_UNICODE_STRING Name;
  246. } SAMPR_GROUP_NAME_INFORMATION;
  247. typedef struct _SAMPR_GROUP_NAME_INFORMATION *PSAMPR_GROUP_NAME_INFORMATION;
  248. typedef struct _SAMPR_GROUP_ADM_COMMENT_INFORMATION
  249. {
  250. RPC_UNICODE_STRING AdminComment;
  251. } SAMPR_GROUP_ADM_COMMENT_INFORMATION;
  252. typedef struct _SAMPR_GROUP_ADM_COMMENT_INFORMATION *PSAMPR_GROUP_ADM_COMMENT_INFORMATION;
  253. typedef /* [switch_type] */ union _SAMPR_GROUP_INFO_BUFFER
  254. {
  255. /* [case()] */ SAMPR_GROUP_GENERAL_INFORMATION General;
  256. /* [case()] */ SAMPR_GROUP_NAME_INFORMATION Name;
  257. /* [case()] */ GROUP_ATTRIBUTE_INFORMATION Attribute;
  258. /* [case()] */ SAMPR_GROUP_ADM_COMMENT_INFORMATION AdminComment;
  259. /* [case()] */ SAMPR_GROUP_GENERAL_INFORMATION DoNotUse;
  260. } SAMPR_GROUP_INFO_BUFFER;
  261. typedef /* [switch_type] */ union _SAMPR_GROUP_INFO_BUFFER *PSAMPR_GROUP_INFO_BUFFER;
  262. typedef struct _SAMPR_ALIAS_GENERAL_INFORMATION
  263. {
  264. RPC_UNICODE_STRING Name;
  265. ULONG MemberCount;
  266. RPC_UNICODE_STRING AdminComment;
  267. } SAMPR_ALIAS_GENERAL_INFORMATION;
  268. typedef struct _SAMPR_ALIAS_GENERAL_INFORMATION *PSAMPR_ALIAS_GENERAL_INFORMATION;
  269. typedef struct _SAMPR_ALIAS_NAME_INFORMATION
  270. {
  271. RPC_UNICODE_STRING Name;
  272. } SAMPR_ALIAS_NAME_INFORMATION;
  273. typedef struct _SAMPR_ALIAS_NAME_INFORMATION *PSAMPR_ALIAS_NAME_INFORMATION;
  274. typedef struct _SAMPR_ALIAS_ADM_COMMENT_INFORMATION
  275. {
  276. RPC_UNICODE_STRING AdminComment;
  277. } SAMPR_ALIAS_ADM_COMMENT_INFORMATION;
  278. typedef struct _SAMPR_ALIAS_ADM_COMMENT_INFORMATION *PSAMPR_ALIAS_ADM_COMMENT_INFORMATION;
  279. typedef /* [switch_type] */ union _SAMPR_ALIAS_INFO_BUFFER
  280. {
  281. /* [case()] */ SAMPR_ALIAS_GENERAL_INFORMATION General;
  282. /* [case()] */ SAMPR_ALIAS_NAME_INFORMATION Name;
  283. /* [case()] */ SAMPR_ALIAS_ADM_COMMENT_INFORMATION AdminComment;
  284. } SAMPR_ALIAS_INFO_BUFFER;
  285. typedef /* [switch_type] */ union _SAMPR_ALIAS_INFO_BUFFER *PSAMPR_ALIAS_INFO_BUFFER;
  286. #pragma pack(4)
  287. typedef struct _SAMPR_USER_ALL_INFORMATION
  288. {
  289. OLD_LARGE_INTEGER LastLogon;
  290. OLD_LARGE_INTEGER LastLogoff;
  291. OLD_LARGE_INTEGER PasswordLastSet;
  292. OLD_LARGE_INTEGER AccountExpires;
  293. OLD_LARGE_INTEGER PasswordCanChange;
  294. OLD_LARGE_INTEGER PasswordMustChange;
  295. RPC_UNICODE_STRING UserName;
  296. RPC_UNICODE_STRING FullName;
  297. RPC_UNICODE_STRING HomeDirectory;
  298. RPC_UNICODE_STRING HomeDirectoryDrive;
  299. RPC_UNICODE_STRING ScriptPath;
  300. RPC_UNICODE_STRING ProfilePath;
  301. RPC_UNICODE_STRING AdminComment;
  302. RPC_UNICODE_STRING WorkStations;
  303. RPC_UNICODE_STRING UserComment;
  304. RPC_UNICODE_STRING Parameters;
  305. RPC_UNICODE_STRING LmOwfPassword;
  306. RPC_UNICODE_STRING NtOwfPassword;
  307. RPC_UNICODE_STRING PrivateData;
  308. SAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor;
  309. ULONG UserId;
  310. ULONG PrimaryGroupId;
  311. ULONG UserAccountControl;
  312. ULONG WhichFields;
  313. SAMPR_LOGON_HOURS LogonHours;
  314. USHORT BadPasswordCount;
  315. USHORT LogonCount;
  316. USHORT CountryCode;
  317. USHORT CodePage;
  318. BOOLEAN LmPasswordPresent;
  319. BOOLEAN NtPasswordPresent;
  320. BOOLEAN PasswordExpired;
  321. BOOLEAN PrivateDataSensitive;
  322. } SAMPR_USER_ALL_INFORMATION;
  323. typedef struct _SAMPR_USER_ALL_INFORMATION *PSAMPR_USER_ALL_INFORMATION;
  324. #pragma pack()
  325. #pragma pack(4)
  326. typedef struct _SAMPR_USER_INTERNAL3_INFORMATION
  327. {
  328. SAMPR_USER_ALL_INFORMATION I1;
  329. LARGE_INTEGER LastBadPasswordTime;
  330. } SAMPR_USER_INTERNAL3_INFORMATION;
  331. typedef struct _SAMPR_USER_INTERNAL3_INFORMATION *PSAMPR_USER_INTERNAL3_INFORMATION;
  332. #pragma pack()
  333. typedef struct _SAMPR_USER_GENERAL_INFORMATION
  334. {
  335. RPC_UNICODE_STRING UserName;
  336. RPC_UNICODE_STRING FullName;
  337. ULONG PrimaryGroupId;
  338. RPC_UNICODE_STRING AdminComment;
  339. RPC_UNICODE_STRING UserComment;
  340. } SAMPR_USER_GENERAL_INFORMATION;
  341. typedef struct _SAMPR_USER_GENERAL_INFORMATION *PSAMPR_USER_GENERAL_INFORMATION;
  342. typedef struct _SAMPR_USER_PREFERENCES_INFORMATION
  343. {
  344. RPC_UNICODE_STRING UserComment;
  345. RPC_UNICODE_STRING Reserved1;
  346. USHORT CountryCode;
  347. USHORT CodePage;
  348. } SAMPR_USER_PREFERENCES_INFORMATION;
  349. typedef struct _SAMPR_USER_PREFERENCES_INFORMATION *PSAMPR_USER_PREFERENCES_INFORMATION;
  350. typedef struct _SAMPR_USER_PARAMETERS_INFORMATION
  351. {
  352. RPC_UNICODE_STRING Parameters;
  353. } SAMPR_USER_PARAMETERS_INFORMATION;
  354. typedef struct _SAMPR_USER_PARAMETERS_INFORMATION *PSAMPR_USER_PARAMETERS_INFORMATION;
  355. #pragma pack(4)
  356. typedef struct _SAMPR_USER_LOGON_INFORMATION
  357. {
  358. RPC_UNICODE_STRING UserName;
  359. RPC_UNICODE_STRING FullName;
  360. ULONG UserId;
  361. ULONG PrimaryGroupId;
  362. RPC_UNICODE_STRING HomeDirectory;
  363. RPC_UNICODE_STRING HomeDirectoryDrive;
  364. RPC_UNICODE_STRING ScriptPath;
  365. RPC_UNICODE_STRING ProfilePath;
  366. RPC_UNICODE_STRING WorkStations;
  367. OLD_LARGE_INTEGER LastLogon;
  368. OLD_LARGE_INTEGER LastLogoff;
  369. OLD_LARGE_INTEGER PasswordLastSet;
  370. OLD_LARGE_INTEGER PasswordCanChange;
  371. OLD_LARGE_INTEGER PasswordMustChange;
  372. SAMPR_LOGON_HOURS LogonHours;
  373. USHORT BadPasswordCount;
  374. USHORT LogonCount;
  375. ULONG UserAccountControl;
  376. } SAMPR_USER_LOGON_INFORMATION;
  377. typedef struct _SAMPR_USER_LOGON_INFORMATION *PSAMPR_USER_LOGON_INFORMATION;
  378. #pragma pack()
  379. #pragma pack(4)
  380. typedef struct _SAMPR_USER_ACCOUNT_INFORMATION
  381. {
  382. RPC_UNICODE_STRING UserName;
  383. RPC_UNICODE_STRING FullName;
  384. ULONG UserId;
  385. ULONG PrimaryGroupId;
  386. RPC_UNICODE_STRING HomeDirectory;
  387. RPC_UNICODE_STRING HomeDirectoryDrive;
  388. RPC_UNICODE_STRING ScriptPath;
  389. RPC_UNICODE_STRING ProfilePath;
  390. RPC_UNICODE_STRING AdminComment;
  391. RPC_UNICODE_STRING WorkStations;
  392. OLD_LARGE_INTEGER LastLogon;
  393. OLD_LARGE_INTEGER LastLogoff;
  394. SAMPR_LOGON_HOURS LogonHours;
  395. USHORT BadPasswordCount;
  396. USHORT LogonCount;
  397. OLD_LARGE_INTEGER PasswordLastSet;
  398. OLD_LARGE_INTEGER AccountExpires;
  399. ULONG UserAccountControl;
  400. } SAMPR_USER_ACCOUNT_INFORMATION;
  401. typedef struct _SAMPR_USER_ACCOUNT_INFORMATION *PSAMPR_USER_ACCOUNT_INFORMATION;
  402. #pragma pack()
  403. typedef struct _SAMPR_USER_A_NAME_INFORMATION
  404. {
  405. RPC_UNICODE_STRING UserName;
  406. } SAMPR_USER_A_NAME_INFORMATION;
  407. typedef struct _SAMPR_USER_A_NAME_INFORMATION *PSAMPR_USER_A_NAME_INFORMATION;
  408. typedef struct _SAMPR_USER_F_NAME_INFORMATION
  409. {
  410. RPC_UNICODE_STRING FullName;
  411. } SAMPR_USER_F_NAME_INFORMATION;
  412. typedef struct _SAMPR_USER_F_NAME_INFORMATION *PSAMPR_USER_F_NAME_INFORMATION;
  413. typedef struct _SAMPR_USER_NAME_INFORMATION
  414. {
  415. RPC_UNICODE_STRING UserName;
  416. RPC_UNICODE_STRING FullName;
  417. } SAMPR_USER_NAME_INFORMATION;
  418. typedef struct _SAMPR_USER_NAME_INFORMATION *PSAMPR_USER_NAME_INFORMATION;
  419. typedef struct _SAMPR_USER_HOME_INFORMATION
  420. {
  421. RPC_UNICODE_STRING HomeDirectory;
  422. RPC_UNICODE_STRING HomeDirectoryDrive;
  423. } SAMPR_USER_HOME_INFORMATION;
  424. typedef struct _SAMPR_USER_HOME_INFORMATION *PSAMPR_USER_HOME_INFORMATION;
  425. typedef struct _SAMPR_USER_SCRIPT_INFORMATION
  426. {
  427. RPC_UNICODE_STRING ScriptPath;
  428. } SAMPR_USER_SCRIPT_INFORMATION;
  429. typedef struct _SAMPR_USER_SCRIPT_INFORMATION *PSAMPR_USER_SCRIPT_INFORMATION;
  430. typedef struct _SAMPR_USER_PROFILE_INFORMATION
  431. {
  432. RPC_UNICODE_STRING ProfilePath;
  433. } SAMPR_USER_PROFILE_INFORMATION;
  434. typedef struct _SAMPR_USER_PROFILE_INFORMATION *PSAMPR_USER_PROFILE_INFORMATION;
  435. typedef struct _SAMPR_USER_ADMIN_COMMENT_INFORMATION
  436. {
  437. RPC_UNICODE_STRING AdminComment;
  438. } SAMPR_USER_ADMIN_COMMENT_INFORMATION;
  439. typedef struct _SAMPR_USER_ADMIN_COMMENT_INFORMATION *PSAMPR_USER_ADMIN_COMMENT_INFORMATION;
  440. typedef struct _SAMPR_USER_WORKSTATIONS_INFORMATION
  441. {
  442. RPC_UNICODE_STRING WorkStations;
  443. } SAMPR_USER_WORKSTATIONS_INFORMATION;
  444. typedef struct _SAMPR_USER_WORKSTATIONS_INFORMATION *PSAMPR_USER_WORKSTATIONS_INFORMATION;
  445. typedef struct _SAMPR_USER_LOGON_HOURS_INFORMATION
  446. {
  447. SAMPR_LOGON_HOURS LogonHours;
  448. } SAMPR_USER_LOGON_HOURS_INFORMATION;
  449. typedef struct _SAMPR_USER_LOGON_HOURS_INFORMATION *PSAMPR_USER_LOGON_HOURS_INFORMATION;
  450. typedef struct _SAMPR_USER_INTERNAL1_INFORMATION
  451. {
  452. ENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword;
  453. ENCRYPTED_LM_OWF_PASSWORD EncryptedLmOwfPassword;
  454. BOOLEAN NtPasswordPresent;
  455. BOOLEAN LmPasswordPresent;
  456. BOOLEAN PasswordExpired;
  457. } SAMPR_USER_INTERNAL1_INFORMATION;
  458. typedef struct _SAMPR_USER_INTERNAL1_INFORMATION *PSAMPR_USER_INTERNAL1_INFORMATION;
  459. typedef struct _SAMPR_USER_INTERNAL4_INFORMATION
  460. {
  461. SAMPR_USER_ALL_INFORMATION I1;
  462. SAMPR_ENCRYPTED_USER_PASSWORD UserPassword;
  463. } SAMPR_USER_INTERNAL4_INFORMATION;
  464. typedef struct _SAMPR_USER_INTERNAL4_INFORMATION *PSAMPR_USER_INTERNAL4_INFORMATION;
  465. typedef struct _SAMPR_USER_INTERNAL4_INFORMATION_NEW
  466. {
  467. SAMPR_USER_ALL_INFORMATION I1;
  468. SAMPR_ENCRYPTED_USER_PASSWORD_NEW UserPassword;
  469. } SAMPR_USER_INTERNAL4_INFORMATION_NEW;
  470. typedef struct _SAMPR_USER_INTERNAL4_INFORMATION_NEW *PSAMPR_USER_INTERNAL4_INFORMATION_NEW;
  471. typedef struct _SAMPR_USER_INTERNAL5_INFORMATION
  472. {
  473. SAMPR_ENCRYPTED_USER_PASSWORD UserPassword;
  474. BOOLEAN PasswordExpired;
  475. } SAMPR_USER_INTERNAL5_INFORMATION;
  476. typedef struct _SAMPR_USER_INTERNAL5_INFORMATION *PSAMPR_USER_INTERNAL5_INFORMATION;
  477. typedef struct _SAMPR_USER_INTERNAL5_INFORMATION_NEW
  478. {
  479. SAMPR_ENCRYPTED_USER_PASSWORD_NEW UserPassword;
  480. BOOLEAN PasswordExpired;
  481. } SAMPR_USER_INTERNAL5_INFORMATION_NEW;
  482. typedef struct _SAMPR_USER_INTERNAL5_INFORMATION_NEW *PSAMPR_USER_INTERNAL5_INFORMATION_NEW;
  483. typedef /* [switch_type] */ union _SAMPR_USER_INFO_BUFFER
  484. {
  485. /* [case()] */ SAMPR_USER_GENERAL_INFORMATION General;
  486. /* [case()] */ SAMPR_USER_PREFERENCES_INFORMATION Preferences;
  487. /* [case()] */ SAMPR_USER_LOGON_INFORMATION Logon;
  488. /* [case()] */ SAMPR_USER_LOGON_HOURS_INFORMATION LogonHours;
  489. /* [case()] */ SAMPR_USER_ACCOUNT_INFORMATION Account;
  490. /* [case()] */ SAMPR_USER_NAME_INFORMATION Name;
  491. /* [case()] */ SAMPR_USER_A_NAME_INFORMATION AccountName;
  492. /* [case()] */ SAMPR_USER_F_NAME_INFORMATION FullName;
  493. /* [case()] */ USER_PRIMARY_GROUP_INFORMATION PrimaryGroup;
  494. /* [case()] */ SAMPR_USER_HOME_INFORMATION Home;
  495. /* [case()] */ SAMPR_USER_SCRIPT_INFORMATION Script;
  496. /* [case()] */ SAMPR_USER_PROFILE_INFORMATION Profile;
  497. /* [case()] */ SAMPR_USER_ADMIN_COMMENT_INFORMATION AdminComment;
  498. /* [case()] */ SAMPR_USER_WORKSTATIONS_INFORMATION WorkStations;
  499. /* [case()] */ USER_CONTROL_INFORMATION Control;
  500. /* [case()] */ USER_EXPIRES_INFORMATION Expires;
  501. /* [case()] */ SAMPR_USER_INTERNAL1_INFORMATION Internal1;
  502. /* [case()] */ USER_INTERNAL2_INFORMATION Internal2;
  503. /* [case()] */ SAMPR_USER_PARAMETERS_INFORMATION Parameters;
  504. /* [case()] */ SAMPR_USER_ALL_INFORMATION All;
  505. /* [case()] */ SAMPR_USER_INTERNAL3_INFORMATION Internal3;
  506. /* [case()] */ SAMPR_USER_INTERNAL4_INFORMATION Internal4;
  507. /* [case()] */ SAMPR_USER_INTERNAL5_INFORMATION Internal5;
  508. /* [case()] */ SAMPR_USER_INTERNAL4_INFORMATION_NEW Internal4New;
  509. /* [case()] */ SAMPR_USER_INTERNAL5_INFORMATION_NEW Internal5New;
  510. } SAMPR_USER_INFO_BUFFER;
  511. typedef /* [switch_type] */ union _SAMPR_USER_INFO_BUFFER *PSAMPR_USER_INFO_BUFFER;
  512. typedef struct _SAMPR_DOMAIN_DISPLAY_USER
  513. {
  514. ULONG Index;
  515. ULONG Rid;
  516. ULONG AccountControl;
  517. SAMPR_RETURNED_STRING LogonName;
  518. SAMPR_RETURNED_STRING AdminComment;
  519. SAMPR_RETURNED_STRING FullName;
  520. } SAMPR_DOMAIN_DISPLAY_USER;
  521. typedef struct _SAMPR_DOMAIN_DISPLAY_USER *PSAMPR_DOMAIN_DISPLAY_USER;
  522. typedef struct _SAMPR_DOMAIN_DISPLAY_MACHINE
  523. {
  524. ULONG Index;
  525. ULONG Rid;
  526. ULONG AccountControl;
  527. SAMPR_RETURNED_STRING Machine;
  528. SAMPR_RETURNED_STRING Comment;
  529. } SAMPR_DOMAIN_DISPLAY_MACHINE;
  530. typedef struct _SAMPR_DOMAIN_DISPLAY_MACHINE *PSAMPR_DOMAIN_DISPLAY_MACHINE;
  531. typedef struct _SAMPR_DOMAIN_DISPLAY_GROUP
  532. {
  533. ULONG Index;
  534. ULONG Rid;
  535. ULONG Attributes;
  536. SAMPR_RETURNED_STRING Group;
  537. SAMPR_RETURNED_STRING Comment;
  538. } SAMPR_DOMAIN_DISPLAY_GROUP;
  539. typedef struct _SAMPR_DOMAIN_DISPLAY_GROUP *PSAMPR_DOMAIN_DISPLAY_GROUP;
  540. typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_USER
  541. {
  542. ULONG Index;
  543. SAMPR_RETURNED_NORMAL_STRING OemUser;
  544. } SAMPR_DOMAIN_DISPLAY_OEM_USER;
  545. typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_USER *PSAMPR_DOMAIN_DISPLAY_OEM_USER;
  546. typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_GROUP
  547. {
  548. ULONG Index;
  549. SAMPR_RETURNED_NORMAL_STRING OemGroup;
  550. } SAMPR_DOMAIN_DISPLAY_OEM_GROUP;
  551. typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_GROUP *PSAMPR_DOMAIN_DISPLAY_OEM_GROUP;
  552. typedef struct _SAMPR_DOMAIN_DISPLAY_USER_BUFFER
  553. {
  554. ULONG EntriesRead;
  555. /* [size_is] */ PSAMPR_DOMAIN_DISPLAY_USER Buffer;
  556. } SAMPR_DOMAIN_DISPLAY_USER_BUFFER;
  557. typedef struct _SAMPR_DOMAIN_DISPLAY_USER_BUFFER *PSAMPR_DOMAIN_DISPLAY_USER_BUFFER;
  558. typedef struct _SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER
  559. {
  560. ULONG EntriesRead;
  561. /* [size_is] */ PSAMPR_DOMAIN_DISPLAY_MACHINE Buffer;
  562. } SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER;
  563. typedef struct _SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER *PSAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER;
  564. typedef struct _SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER
  565. {
  566. ULONG EntriesRead;
  567. /* [size_is] */ PSAMPR_DOMAIN_DISPLAY_GROUP Buffer;
  568. } SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER;
  569. typedef struct _SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER *PSAMPR_DOMAIN_DISPLAY_GROUP_BUFFER;
  570. typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER
  571. {
  572. ULONG EntriesRead;
  573. /* [size_is] */ PSAMPR_DOMAIN_DISPLAY_OEM_USER Buffer;
  574. } SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER;
  575. typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER *PSAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER;
  576. typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER
  577. {
  578. ULONG EntriesRead;
  579. /* [size_is] */ PSAMPR_DOMAIN_DISPLAY_OEM_GROUP Buffer;
  580. } SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER;
  581. typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER *PSAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER;
  582. typedef /* [switch_type] */ union _SAMPR_DISPLAY_INFO_BUFFER
  583. {
  584. /* [case()] */ SAMPR_DOMAIN_DISPLAY_USER_BUFFER UserInformation;
  585. /* [case()] */ SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER MachineInformation;
  586. /* [case()] */ SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER GroupInformation;
  587. /* [case()] */ SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER OemUserInformation;
  588. /* [case()] */ SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER OemGroupInformation;
  589. } SAMPR_DISPLAY_INFO_BUFFER;
  590. typedef /* [switch_type] */ union _SAMPR_DISPLAY_INFO_BUFFER *PSAMPR_DISPLAY_INFO_BUFFER;
  591. NTSTATUS SamrConnect(
  592. /* [unique][in] */ PSAMPR_SERVER_NAME ServerName,
  593. /* [out] */ SAMPR_HANDLE *ServerHandle,
  594. /* [in] */ ACCESS_MASK DesiredAccess);
  595. NTSTATUS SamrCloseHandle(
  596. /* [out][in] */ SAMPR_HANDLE *SamHandle);
  597. NTSTATUS SamrSetSecurityObject(
  598. /* [in] */ SAMPR_HANDLE ObjectHandle,
  599. /* [in] */ SECURITY_INFORMATION SecurityInformation,
  600. /* [in] */ PSAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor);
  601. NTSTATUS SamrQuerySecurityObject(
  602. /* [in] */ SAMPR_HANDLE ObjectHandle,
  603. /* [in] */ SECURITY_INFORMATION SecurityInformation,
  604. /* [out] */ PSAMPR_SR_SECURITY_DESCRIPTOR *SecurityDescriptor);
  605. NTSTATUS SamrShutdownSamServer(
  606. /* [in] */ SAMPR_HANDLE ServerHandle);
  607. NTSTATUS SamrLookupDomainInSamServer(
  608. /* [in] */ SAMPR_HANDLE ServerHandle,
  609. /* [in] */ PRPC_UNICODE_STRING Name,
  610. /* [out] */ PRPC_SID *DomainId);
  611. NTSTATUS SamrEnumerateDomainsInSamServer(
  612. /* [in] */ SAMPR_HANDLE ServerHandle,
  613. /* [out][in] */ PSAM_ENUMERATE_HANDLE EnumerationContext,
  614. /* [out] */ PSAMPR_ENUMERATION_BUFFER *Buffer,
  615. /* [in] */ ULONG PreferedMaximumLength,
  616. /* [out] */ PULONG CountReturned);
  617. NTSTATUS SamrOpenDomain(
  618. /* [in] */ SAMPR_HANDLE ServerHandle,
  619. /* [in] */ ACCESS_MASK DesiredAccess,
  620. /* [in] */ PRPC_SID DomainId,
  621. /* [out] */ SAMPR_HANDLE *DomainHandle);
  622. NTSTATUS SamrQueryInformationDomain(
  623. /* [in] */ SAMPR_HANDLE DomainHandle,
  624. /* [in] */ DOMAIN_INFORMATION_CLASS DomainInformationClass,
  625. /* [switch_is][out] */ PSAMPR_DOMAIN_INFO_BUFFER *Buffer);
  626. NTSTATUS SamrSetInformationDomain(
  627. /* [in] */ SAMPR_HANDLE DomainHandle,
  628. /* [in] */ DOMAIN_INFORMATION_CLASS DomainInformationClass,
  629. /* [switch_is][in] */ PSAMPR_DOMAIN_INFO_BUFFER DomainInformation);
  630. NTSTATUS SamrCreateGroupInDomain(
  631. /* [in] */ SAMPR_HANDLE DomainHandle,
  632. /* [in] */ PRPC_UNICODE_STRING Name,
  633. /* [in] */ ACCESS_MASK DesiredAccess,
  634. /* [out] */ SAMPR_HANDLE *GroupHandle,
  635. /* [out] */ PULONG RelativeId);
  636. NTSTATUS SamrEnumerateGroupsInDomain(
  637. /* [in] */ SAMPR_HANDLE DomainHandle,
  638. /* [out][in] */ PSAM_ENUMERATE_HANDLE EnumerationContext,
  639. /* [out] */ PSAMPR_ENUMERATION_BUFFER *Buffer,
  640. /* [in] */ ULONG PreferedMaximumLength,
  641. /* [out] */ PULONG CountReturned);
  642. NTSTATUS SamrCreateUserInDomain(
  643. /* [in] */ SAMPR_HANDLE DomainHandle,
  644. /* [in] */ PRPC_UNICODE_STRING Name,
  645. /* [in] */ ACCESS_MASK DesiredAccess,
  646. /* [out] */ SAMPR_HANDLE *UserHandle,
  647. /* [out] */ PULONG RelativeId);
  648. NTSTATUS SamrEnumerateUsersInDomain(
  649. /* [in] */ SAMPR_HANDLE DomainHandle,
  650. /* [out][in] */ PSAM_ENUMERATE_HANDLE EnumerationContext,
  651. /* [in] */ ULONG UserAccountControl,
  652. /* [out] */ PSAMPR_ENUMERATION_BUFFER *Buffer,
  653. /* [in] */ ULONG PreferedMaximumLength,
  654. /* [out] */ PULONG CountReturned);
  655. NTSTATUS SamrCreateAliasInDomain(
  656. /* [in] */ SAMPR_HANDLE DomainHandle,
  657. /* [in] */ PRPC_UNICODE_STRING AccountName,
  658. /* [in] */ ACCESS_MASK DesiredAccess,
  659. /* [out] */ SAMPR_HANDLE *AliasHandle,
  660. /* [out] */ PULONG RelativeId);
  661. NTSTATUS SamrEnumerateAliasesInDomain(
  662. /* [in] */ SAMPR_HANDLE DomainHandle,
  663. /* [out][in] */ PSAM_ENUMERATE_HANDLE EnumerationContext,
  664. /* [out] */ PSAMPR_ENUMERATION_BUFFER *Buffer,
  665. /* [in] */ ULONG PreferedMaximumLength,
  666. /* [out] */ PULONG CountReturned);
  667. NTSTATUS SamrGetAliasMembership(
  668. /* [in] */ SAMPR_HANDLE DomainHandle,
  669. /* [in] */ PSAMPR_PSID_ARRAY SidArray,
  670. /* [out] */ PSAMPR_ULONG_ARRAY Membership);
  671. NTSTATUS SamrLookupNamesInDomain(
  672. /* [in] */ SAMPR_HANDLE DomainHandle,
  673. /* [in] */ ULONG Count,
  674. /* [length_is][size_is][in] */ RPC_UNICODE_STRING Names[ ],
  675. /* [out] */ PSAMPR_ULONG_ARRAY RelativeIds,
  676. /* [out] */ PSAMPR_ULONG_ARRAY Use);
  677. NTSTATUS SamrLookupIdsInDomain(
  678. /* [in] */ SAMPR_HANDLE DomainHandle,
  679. /* [in] */ ULONG Count,
  680. /* [length_is][size_is][in] */ PULONG RelativeIds,
  681. /* [out] */ PSAMPR_RETURNED_USTRING_ARRAY Names,
  682. /* [out] */ PSAMPR_ULONG_ARRAY Use);
  683. NTSTATUS SamrOpenGroup(
  684. /* [in] */ SAMPR_HANDLE DomainHandle,
  685. /* [in] */ ACCESS_MASK DesiredAccess,
  686. /* [in] */ ULONG GroupId,
  687. /* [out] */ SAMPR_HANDLE *GroupHandle);
  688. NTSTATUS SamrQueryInformationGroup(
  689. /* [in] */ SAMPR_HANDLE GroupHandle,
  690. /* [in] */ GROUP_INFORMATION_CLASS GroupInformationClass,
  691. /* [switch_is][out] */ PSAMPR_GROUP_INFO_BUFFER *Buffer);
  692. NTSTATUS SamrSetInformationGroup(
  693. /* [in] */ SAMPR_HANDLE GroupHandle,
  694. /* [in] */ GROUP_INFORMATION_CLASS GroupInformationClass,
  695. /* [switch_is][in] */ PSAMPR_GROUP_INFO_BUFFER Buffer);
  696. NTSTATUS SamrAddMemberToGroup(
  697. /* [in] */ SAMPR_HANDLE GroupHandle,
  698. /* [in] */ ULONG MemberId,
  699. /* [in] */ ULONG Attributes);
  700. NTSTATUS SamrDeleteGroup(
  701. /* [out][in] */ SAMPR_HANDLE *GroupHandle);
  702. NTSTATUS SamrRemoveMemberFromGroup(
  703. /* [in] */ SAMPR_HANDLE GroupHandle,
  704. /* [in] */ ULONG MemberId);
  705. NTSTATUS SamrGetMembersInGroup(
  706. /* [in] */ SAMPR_HANDLE GroupHandle,
  707. /* [out] */ PSAMPR_GET_MEMBERS_BUFFER *Members);
  708. NTSTATUS SamrSetMemberAttributesOfGroup(
  709. /* [in] */ SAMPR_HANDLE GroupHandle,
  710. /* [in] */ ULONG MemberId,
  711. /* [in] */ ULONG Attributes);
  712. NTSTATUS SamrOpenAlias(
  713. /* [in] */ SAMPR_HANDLE DomainHandle,
  714. /* [in] */ ACCESS_MASK DesiredAccess,
  715. /* [in] */ ULONG AliasId,
  716. /* [out] */ SAMPR_HANDLE *AliasHandle);
  717. NTSTATUS SamrQueryInformationAlias(
  718. /* [in] */ SAMPR_HANDLE AliasHandle,
  719. /* [in] */ ALIAS_INFORMATION_CLASS AliasInformationClass,
  720. /* [switch_is][out] */ PSAMPR_ALIAS_INFO_BUFFER *Buffer);
  721. NTSTATUS SamrSetInformationAlias(
  722. /* [in] */ SAMPR_HANDLE AliasHandle,
  723. /* [in] */ ALIAS_INFORMATION_CLASS AliasInformationClass,
  724. /* [switch_is][in] */ PSAMPR_ALIAS_INFO_BUFFER Buffer);
  725. NTSTATUS SamrDeleteAlias(
  726. /* [out][in] */ SAMPR_HANDLE *AliasHandle);
  727. NTSTATUS SamrAddMemberToAlias(
  728. /* [in] */ SAMPR_HANDLE AliasHandle,
  729. /* [in] */ PRPC_SID MemberId);
  730. NTSTATUS SamrRemoveMemberFromAlias(
  731. /* [in] */ SAMPR_HANDLE AliasHandle,
  732. /* [in] */ PRPC_SID MemberId);
  733. NTSTATUS SamrGetMembersInAlias(
  734. /* [in] */ SAMPR_HANDLE AliasHandle,
  735. /* [out] */ PSAMPR_PSID_ARRAY Members);
  736. NTSTATUS SamrOpenUser(
  737. /* [in] */ SAMPR_HANDLE DomainHandle,
  738. /* [in] */ ACCESS_MASK DesiredAccess,
  739. /* [in] */ ULONG UserId,
  740. /* [out] */ SAMPR_HANDLE *UserHandle);
  741. NTSTATUS SamrDeleteUser(
  742. /* [out][in] */ SAMPR_HANDLE *UserHandle);
  743. NTSTATUS SamrQueryInformationUser(
  744. /* [in] */ SAMPR_HANDLE UserHandle,
  745. /* [in] */ USER_INFORMATION_CLASS UserInformationClass,
  746. /* [switch_is][out] */ PSAMPR_USER_INFO_BUFFER *Buffer);
  747. NTSTATUS SamrSetInformationUser(
  748. /* [in] */ SAMPR_HANDLE UserHandle,
  749. /* [in] */ USER_INFORMATION_CLASS UserInformationClass,
  750. /* [switch_is][in] */ PSAMPR_USER_INFO_BUFFER Buffer);
  751. NTSTATUS SamrChangePasswordUser(
  752. /* [in] */ SAMPR_HANDLE UserHandle,
  753. /* [in] */ BOOLEAN LmPresent,
  754. /* [unique][in] */ PENCRYPTED_LM_OWF_PASSWORD LmOldEncryptedWithLmNew,
  755. /* [unique][in] */ PENCRYPTED_LM_OWF_PASSWORD LmNewEncryptedWithLmOld,
  756. /* [in] */ BOOLEAN NtPresent,
  757. /* [unique][in] */ PENCRYPTED_NT_OWF_PASSWORD NtOldEncryptedWithNtNew,
  758. /* [unique][in] */ PENCRYPTED_NT_OWF_PASSWORD NtNewEncryptedWithNtOld,
  759. /* [in] */ BOOLEAN NtCrossEncryptionPresent,
  760. /* [unique][in] */ PENCRYPTED_NT_OWF_PASSWORD NtNewEncryptedWithLmNew,
  761. /* [in] */ BOOLEAN LmCrossEncryptionPresent,
  762. /* [unique][in] */ PENCRYPTED_LM_OWF_PASSWORD LmNtNewEncryptedWithNtNew);
  763. NTSTATUS SamrGetGroupsForUser(
  764. /* [in] */ SAMPR_HANDLE UserHandle,
  765. /* [out] */ PSAMPR_GET_GROUPS_BUFFER *Groups);
  766. NTSTATUS SamrQueryDisplayInformation(
  767. /* [in] */ SAMPR_HANDLE DomainHandle,
  768. /* [in] */ DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
  769. /* [in] */ ULONG Index,
  770. /* [in] */ ULONG EntryCount,
  771. /* [in] */ ULONG PreferredMaximumLength,
  772. /* [out] */ PULONG TotalAvailable,
  773. /* [out] */ PULONG TotalReturned,
  774. /* [switch_is][out] */ PSAMPR_DISPLAY_INFO_BUFFER Buffer);
  775. NTSTATUS SamrGetDisplayEnumerationIndex(
  776. /* [in] */ SAMPR_HANDLE DomainHandle,
  777. /* [in] */ DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
  778. /* [in] */ PRPC_UNICODE_STRING Prefix,
  779. /* [out] */ PULONG Index);
  780. NTSTATUS SamrTestPrivateFunctionsDomain(
  781. /* [in] */ SAMPR_HANDLE DomainHandle);
  782. NTSTATUS SamrTestPrivateFunctionsUser(
  783. /* [in] */ SAMPR_HANDLE UserHandle);
  784. NTSTATUS SamrGetUserDomainPasswordInformation(
  785. /* [in] */ SAMPR_HANDLE UserHandle,
  786. /* [out] */ PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation);
  787. NTSTATUS SamrRemoveMemberFromForeignDomain(
  788. /* [in] */ SAMPR_HANDLE DomainHandle,
  789. /* [in] */ PRPC_SID MemberSid);
  790. NTSTATUS SamrQueryInformationDomain2(
  791. /* [in] */ SAMPR_HANDLE DomainHandle,
  792. /* [in] */ DOMAIN_INFORMATION_CLASS DomainInformationClass,
  793. /* [switch_is][out] */ PSAMPR_DOMAIN_INFO_BUFFER *Buffer);
  794. NTSTATUS SamrQueryInformationUser2(
  795. /* [in] */ SAMPR_HANDLE UserHandle,
  796. /* [in] */ USER_INFORMATION_CLASS UserInformationClass,
  797. /* [switch_is][out] */ PSAMPR_USER_INFO_BUFFER *Buffer);
  798. NTSTATUS SamrQueryDisplayInformation2(
  799. /* [in] */ SAMPR_HANDLE DomainHandle,
  800. /* [in] */ DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
  801. /* [in] */ ULONG Index,
  802. /* [in] */ ULONG EntryCount,
  803. /* [in] */ ULONG PreferredMaximumLength,
  804. /* [out] */ PULONG TotalAvailable,
  805. /* [out] */ PULONG TotalReturned,
  806. /* [switch_is][out] */ PSAMPR_DISPLAY_INFO_BUFFER Buffer);
  807. NTSTATUS SamrGetDisplayEnumerationIndex2(
  808. /* [in] */ SAMPR_HANDLE DomainHandle,
  809. /* [in] */ DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
  810. /* [in] */ PRPC_UNICODE_STRING Prefix,
  811. /* [out] */ PULONG Index);
  812. NTSTATUS SamrCreateUser2InDomain(
  813. /* [in] */ SAMPR_HANDLE DomainHandle,
  814. /* [in] */ PRPC_UNICODE_STRING Name,
  815. /* [in] */ ULONG AccountType,
  816. /* [in] */ ACCESS_MASK DesiredAccess,
  817. /* [out] */ SAMPR_HANDLE *UserHandle,
  818. /* [out] */ PULONG GrantedAccess,
  819. /* [out] */ PULONG RelativeId);
  820. NTSTATUS SamrQueryDisplayInformation3(
  821. /* [in] */ SAMPR_HANDLE DomainHandle,
  822. /* [in] */ DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
  823. /* [in] */ ULONG Index,
  824. /* [in] */ ULONG EntryCount,
  825. /* [in] */ ULONG PreferredMaximumLength,
  826. /* [out] */ PULONG TotalAvailable,
  827. /* [out] */ PULONG TotalReturned,
  828. /* [switch_is][out] */ PSAMPR_DISPLAY_INFO_BUFFER Buffer);
  829. NTSTATUS SamrAddMultipleMembersToAlias(
  830. /* [in] */ SAMPR_HANDLE AliasHandle,
  831. /* [in] */ PSAMPR_PSID_ARRAY MembersBuffer);
  832. NTSTATUS SamrRemoveMultipleMembersFromAlias(
  833. /* [in] */ SAMPR_HANDLE AliasHandle,
  834. /* [in] */ PSAMPR_PSID_ARRAY MembersBuffer);
  835. NTSTATUS SamrOemChangePasswordUser2(
  836. /* [in] */ handle_t BindingHandle,
  837. /* [unique][in] */ PRPC_STRING ServerName,
  838. /* [in] */ PRPC_STRING UserName,
  839. /* [unique][in] */ PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
  840. /* [unique][in] */ PENCRYPTED_LM_OWF_PASSWORD OldLmOwfPassswordEncryptedWithNewLm);
  841. NTSTATUS SamrUnicodeChangePasswordUser2(
  842. /* [in] */ handle_t BindingHandle,
  843. /* [unique][in] */ PRPC_UNICODE_STRING ServerName,
  844. /* [in] */ PRPC_UNICODE_STRING UserName,
  845. /* [unique][in] */ PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldNt,
  846. /* [unique][in] */ PENCRYPTED_NT_OWF_PASSWORD OldNtOwfPasswordEncryptedWithNewNt,
  847. /* [in] */ BOOLEAN LmPresent,
  848. /* [unique][in] */ PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
  849. /* [unique][in] */ PENCRYPTED_LM_OWF_PASSWORD OldLmOwfPassswordEncryptedWithNewLmOrNt);
  850. NTSTATUS SamrGetDomainPasswordInformation(
  851. /* [in] */ handle_t BindingHandle,
  852. /* [unique][in] */ PRPC_UNICODE_STRING ServerName,
  853. /* [out] */ PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation);
  854. NTSTATUS SamrConnect2(
  855. /* [string][unique][in] */ PSAMPR_SERVER_NAME ServerName,
  856. /* [out] */ SAMPR_HANDLE *ServerHandle,
  857. /* [in] */ ACCESS_MASK DesiredAccess);
  858. NTSTATUS SamrSetInformationUser2(
  859. /* [in] */ SAMPR_HANDLE UserHandle,
  860. /* [in] */ USER_INFORMATION_CLASS UserInformationClass,
  861. /* [switch_is][in] */ PSAMPR_USER_INFO_BUFFER Buffer);
  862. NTSTATUS SamrSetBootKeyInformation(
  863. /* [in] */ SAMPR_HANDLE DomainHandle,
  864. /* [in] */ SAMPR_BOOT_TYPE BootOptions,
  865. /* [unique][in] */ PRPC_UNICODE_STRING OldBootKey,
  866. /* [unique][in] */ PRPC_UNICODE_STRING NewBootKey);
  867. NTSTATUS SamrGetBootKeyInformation(
  868. /* [in] */ SAMPR_HANDLE DomainHandle,
  869. /* [out] */ PSAMPR_BOOT_TYPE BootOptions);
  870. NTSTATUS SamrConnect3(
  871. /* [string][unique][in] */ PSAMPR_SERVER_NAME ServerName,
  872. /* [out] */ SAMPR_HANDLE *ServerHandle,
  873. /* [in] */ ULONG ClientRevision,
  874. /* [in] */ ACCESS_MASK DesiredAccess);
  875. NTSTATUS SamrConnect4(
  876. /* [string][unique][in] */ PSAMPR_SERVER_NAME ServerName,
  877. /* [out] */ SAMPR_HANDLE *ServerHandle,
  878. /* [in] */ ULONG ClientRevision,
  879. /* [in] */ ACCESS_MASK DesiredAccess);
  880. NTSTATUS SamrUnicodeChangePasswordUser3(
  881. /* [in] */ handle_t BindingHandle,
  882. /* [unique][in] */ PRPC_UNICODE_STRING ServerName,
  883. /* [in] */ PRPC_UNICODE_STRING UserName,
  884. /* [unique][in] */ PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldNt,
  885. /* [unique][in] */ PENCRYPTED_NT_OWF_PASSWORD OldNtOwfPasswordEncryptedWithNewNt,
  886. /* [in] */ BOOLEAN LmPresent,
  887. /* [unique][in] */ PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
  888. /* [unique][in] */ PENCRYPTED_LM_OWF_PASSWORD OldLmOwfPassswordEncryptedWithNewLmOrNt,
  889. /* [unique][in] */ PSAMPR_ENCRYPTED_USER_PASSWORD AdditionalData,
  890. /* [out] */ PDOMAIN_PASSWORD_INFORMATION *EffectivePasswordPolicy,
  891. /* [out] */ PUSER_PWD_CHANGE_FAILURE_INFORMATION *PasswordChangeInfo);
  892. NTSTATUS SamrConnect5(
  893. /* [string][unique][in] */ PSAMPR_SERVER_NAME ServerName,
  894. /* [in] */ ACCESS_MASK DesiredAccess,
  895. /* [in] */ ULONG InVersion,
  896. /* [switch_is][in] */ SAMPR_REVISION_INFO *InRevisionInfo,
  897. /* [out] */ ULONG *OutVersion,
  898. /* [switch_is][out] */ SAMPR_REVISION_INFO *OutRevisionInfo,
  899. /* [out] */ SAMPR_HANDLE *ServerHandle);
  900. NTSTATUS SamrRidToSid(
  901. /* [in] */ SAMPR_HANDLE ObjectHandle,
  902. /* [in] */ ULONG Rid,
  903. /* [out] */ PRPC_SID *Sid);
  904. NTSTATUS SamrSetDSRMPassword(
  905. /* [in] */ handle_t BindingHandle,
  906. /* [unique][in] */ PRPC_UNICODE_STRING ServerName,
  907. /* [in] */ ULONG UserId,
  908. /* [unique][in] */ PENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword);
  909. extern handle_t samsrv_handle;
  910. extern RPC_IF_HANDLE samr_ClientIfHandle;
  911. extern RPC_IF_HANDLE samr_ServerIfHandle;
  912. #endif /* __samr_INTERFACE_DEFINED__ */
  913. /* Additional Prototypes for ALL interfaces */
  914. handle_t __RPC_USER PSAMPR_SERVER_NAME_bind ( PSAMPR_SERVER_NAME );
  915. void __RPC_USER PSAMPR_SERVER_NAME_unbind( PSAMPR_SERVER_NAME, handle_t );
  916. void __RPC_USER SAMPR_HANDLE_rundown( SAMPR_HANDLE );
  917. /* end of Additional Prototypes */
  918. #ifdef __cplusplus
  919. }
  920. #endif
  921. #endif