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.

1176 lines
39 KiB

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