[ros-diffs] [ekohl] 56644: [IDL] Add ACF and IDL file for the SAM RPC interface.

ekohl at svn.reactos.org ekohl at svn.reactos.org
Sun May 20 16:32:26 UTC 2012


Author: ekohl
Date: Sun May 20 16:32:24 2012
New Revision: 56644

URL: http://svn.reactos.org/svn/reactos?rev=56644&view=rev
Log:
[IDL]
Add ACF and IDL file for the SAM RPC interface.

Added:
    trunk/reactos/include/reactos/idl/sam.acf   (with props)
    trunk/reactos/include/reactos/idl/sam.idl   (with props)

Added: trunk/reactos/include/reactos/idl/sam.acf
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/sam.acf?rev=56644&view=auto
==============================================================================
--- trunk/reactos/include/reactos/idl/sam.acf (added)
+++ trunk/reactos/include/reactos/idl/sam.acf [iso-8859-1] Sun May 20 16:32:24 2012
@@ -1,0 +1,6 @@
+[
+   explicit_handle
+]
+interface samr
+{
+}

Propchange: trunk/reactos/include/reactos/idl/sam.acf
------------------------------------------------------------------------------
    svn:eol-style = native

Added: trunk/reactos/include/reactos/idl/sam.idl
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/sam.idl?rev=56644&view=auto
==============================================================================
--- trunk/reactos/include/reactos/idl/sam.idl (added)
+++ trunk/reactos/include/reactos/idl/sam.idl [iso-8859-1] Sun May 20 16:32:24 2012
@@ -1,0 +1,1361 @@
+/*
+ * Security Account Manager interface definition
+ */
+
+#include <ms-dtyp.idl>
+
+cpp_quote("#ifndef _NTDEF_")
+typedef long NTSTATUS;
+cpp_quote("#endif")
+
+typedef struct _RPC_STRING
+{
+    unsigned short Length;
+    unsigned short MaximumLength;
+    [size_is(MaximumLength), length_is(Length)] char *Buffer;
+} RPC_STRING, *PRPC_STRING;
+
+typedef struct _OLD_LARGE_INTEGER
+{
+    unsigned long LowPart;
+    long HighPart;
+} OLD_LARGE_INTEGER, *POLD_LARGE_INTEGER;
+
+typedef [handle] wchar_t *PSAMPR_SERVER_NAME;
+
+typedef [context_handle] void *SAMPR_HANDLE;
+
+typedef struct _ENCRYPTED_LM_OWF_PASSWORD
+{
+    char data[16];
+} ENCRYPTED_LM_OWF_PASSWORD, *PENCRYPTED_LM_OWF_PASSWORD, ENCRYPTED_NT_OWF_PASSWORD, *PENCRYPTED_NT_OWF_PASSWORD;
+
+typedef struct _SAMPR_ULONG_ARRAY
+{
+    unsigned long Count;
+    [size_is(Count)] unsigned long *Element;
+} SAMPR_ULONG_ARRAY, *PSAMPR_ULONG_ARRAY;
+
+typedef struct _SAMPR_SID_INFORMATION
+{
+    PRPC_SID SidPointer;
+} SAMPR_SID_INFORMATION, *PSAMPR_SID_INFORMATION;
+
+typedef struct _SAMPR_PSID_ARRAY
+{
+    [range(0, 1024)] unsigned long Count;
+    [size_is(Count)] PSAMPR_SID_INFORMATION Sids;
+} SAMPR_PSID_ARRAY, *PSAMPR_PSID_ARRAY;
+
+typedef struct _SAMPR_PSID_ARRAY_OUT
+{
+    unsigned long Count;
+    [size_is(Count)] PSAMPR_SID_INFORMATION Sids;
+} SAMPR_PSID_ARRAY_OUT, *PSAMPR_PSID_ARRAY_OUT;
+
+typedef struct _SAMPR_RETURNED_USTRING_ARRAY
+{
+    unsigned long Count;
+    [size_is(Count)] PRPC_UNICODE_STRING Element;
+} SAMPR_RETURNED_USTRING_ARRAY, *PSAMPR_RETURNED_USTRING_ARRAY;
+
+cpp_quote("#ifndef _WINNT_H")
+typedef enum _SID_NAME_USE
+{
+    SidTypeUser = 1,
+    SidTypeGroup,
+    SidTypeDomain,
+    SidTypeAlias,
+    SidTypeWellKnownGroup,
+    SidTypeDeletedAccount,
+    SidTypeInvalid,
+    SidTypeUnknown,
+} SID_NAME_USE, *PSID_NAME_USE;
+cpp_quote("#endif")
+
+typedef struct RPC_SHORT_BLOB
+{
+    unsigned short Length;
+    unsigned short MaximumLength;
+    [size_is(MaximumLength/2), length_is(Length/2)]
+    unsigned short* Buffer;
+} RPC_SHORT_BLOB, *PRPC_SHORT_BLOB;
+
+typedef struct _SAMPR_RID_ENUMERATION
+{
+    unsigned long RelativeId;
+    RPC_UNICODE_STRING Name;
+} SAMPR_RID_ENUMERATION, *PSAMPR_RID_ENUMERATION;
+
+typedef struct _SAMPR_ENUMERATION_BUFFER
+{
+    unsigned long EntriesRead;
+    [size_is(EntriesRead)] PSAMPR_RID_ENUMERATION Buffer;
+} SAMPR_ENUMERATION_BUFFER, *PSAMPR_ENUMERATION_BUFFER;
+
+typedef struct _SAMPR_SR_SECURITY_DESCRIPTOR
+{
+    [range(0, 256 * 1024)] unsigned long Length;
+    [size_is(Length)] unsigned char* SecurityDescriptor;
+} SAMPR_SR_SECURITY_DESCRIPTOR, *PSAMPR_SR_SECURITY_DESCRIPTOR;
+
+typedef struct _GROUP_MEMBERSHIP
+{
+    unsigned long RelativeId;
+    unsigned long Attributes;
+} GROUP_MEMBERSHIP, *PGROUP_MEMBERSHIP;
+
+typedef struct _SAMPR_GET_GROUPS_BUFFER
+{
+    unsigned long MembershipCount;
+    [size_is(MembershipCount)] PGROUP_MEMBERSHIP Groups;
+} SAMPR_GET_GROUPS_BUFFER, *PSAMPR_GET_GROUPS_BUFFER;
+
+typedef struct _SAMPR_GET_MEMBERS_BUFFER
+{
+    unsigned long MemberCount;
+    [size_is(MemberCount)] unsigned long* Members;
+    [size_is(MemberCount)] unsigned long* Attributes;
+} SAMPR_GET_MEMBERS_BUFFER, *PSAMPR_GET_MEMBERS_BUFFER;
+
+typedef struct _SAMPR_REVISION_INFO_V1
+{
+    unsigned long Revision;
+    unsigned long SupportedFeatures;
+} SAMPR_REVISION_INFO_V1, *PSAMPR_REVISION_INFO_V1;
+
+typedef [switch_type(unsigned long)] union
+{
+    [case(1)] SAMPR_REVISION_INFO_V1 V1;
+}SAMPR_REVISION_INFO, *PSAMPR_REVISION_INFO;
+
+typedef struct _USER_DOMAIN_PASSWORD_INFORMATION
+{
+    unsigned short MinPasswordLength;
+    unsigned long PasswordProperties;
+} USER_DOMAIN_PASSWORD_INFORMATION, *PUSER_DOMAIN_PASSWORD_INFORMATION;
+
+typedef enum _DOMAIN_SERVER_ENABLE_STATE
+{
+    DomainServerEnabled = 1,
+    DomainServerDisabled
+} DOMAIN_SERVER_ENABLE_STATE, *PDOMAIN_SERVER_ENABLE_STATE;
+
+typedef struct _DOMAIN_STATE_INFORMATION
+{
+    DOMAIN_SERVER_ENABLE_STATE DomainServerState;
+} DOMAIN_STATE_INFORMATION, *PDOMAIN_STATE_INFORMATION;
+
+typedef enum _DOMAIN_SERVER_ROLE
+{
+    DomainServerRoleBackup = 2,
+    DomainServerRolePrimary = 3
+} DOMAIN_SERVER_ROLE, *PDOMAIN_SERVER_ROLE;
+
+typedef struct _DOMAIN_PASSWORD_INFORMATION
+{
+    unsigned short MinPasswordLength;
+    unsigned short PasswordHistoryLength;
+    unsigned long PasswordProperties;
+    OLD_LARGE_INTEGER MaxPasswordAge;
+    OLD_LARGE_INTEGER MinPasswordAge;
+} DOMAIN_PASSWORD_INFORMATION, *PDOMAIN_PASSWORD_INFORMATION;
+
+typedef struct _DOMAIN_LOGOFF_INFORMATION
+{
+    OLD_LARGE_INTEGER ForceLogoff;
+} DOMAIN_LOGOFF_INFORMATION, *PDOMAIN_LOGOFF_INFORMATION;
+
+typedef struct _DOMAIN_SERVER_ROLE_INFORMATION
+{
+    DOMAIN_SERVER_ROLE DomainServerRole;
+} DOMAIN_SERVER_ROLE_INFORMATION, *PDOMAIN_SERVER_ROLE_INFORMATION;
+
+typedef struct _DOMAIN_MODIFIED_INFORMATION
+{
+    OLD_LARGE_INTEGER DomainModifiedCount;
+    OLD_LARGE_INTEGER CreationTime;
+} DOMAIN_MODIFIED_INFORMATION, *PDOMAIN_MODIFIED_INFORMATION;
+
+typedef struct _DOMAIN_MODIFIED_INFORMATION2
+{
+    OLD_LARGE_INTEGER DomainModifiedCount;
+    OLD_LARGE_INTEGER CreationTime;
+    OLD_LARGE_INTEGER ModifiedCountAtLastPromotion;
+} DOMAIN_MODIFIED_INFORMATION2, *PDOMAIN_MODIFIED_INFORMATION2;
+
+cpp_quote("#include <pshpack4.h>")
+typedef struct _SAMPR_DOMAIN_GENERAL_INFORMATION
+{
+    OLD_LARGE_INTEGER ForceLogoff;
+    RPC_UNICODE_STRING OemInformation;
+    RPC_UNICODE_STRING DomainName;
+    RPC_UNICODE_STRING ReplicaSourceNodeName;
+    OLD_LARGE_INTEGER DomainModifiedCount;
+    unsigned long DomainServerState;
+    unsigned long DomainServerRole;
+    unsigned char UasCompatibilityRequired;
+    unsigned long UserCount;
+    unsigned long GroupCount;
+    unsigned long AliasCount;
+} SAMPR_DOMAIN_GENERAL_INFORMATION, *PSAMPR_DOMAIN_GENERAL_INFORMATION;
+
+typedef struct _SAMPR_DOMAIN_GENERAL_INFORMATION2
+{
+    SAMPR_DOMAIN_GENERAL_INFORMATION I1;
+    LARGE_INTEGER LockoutDuration;
+    LARGE_INTEGER LockoutObservationWindow;
+    unsigned short LockoutThreshold;
+} SAMPR_DOMAIN_GENERAL_INFORMATION2, *PSAMPR_DOMAIN_GENERAL_INFORMATION2;
+cpp_quote("#include <poppack.h>")
+
+typedef struct _SAMPR_DOMAIN_OEM_INFORMATION
+{
+    RPC_UNICODE_STRING OemInformation;
+} SAMPR_DOMAIN_OEM_INFORMATION, *PSAMPR_DOMAIN_OEM_INFORMATION;
+
+typedef struct _SAMPR_DOMAIN_NAME_INFORMATION
+{
+    RPC_UNICODE_STRING DomainName;
+} SAMPR_DOMAIN_NAME_INFORMATION, *PSAMPR_DOMAIN_NAME_INFORMATION;
+
+typedef struct SAMPR_DOMAIN_REPLICATION_INFORMATION
+{
+    RPC_UNICODE_STRING ReplicaSourceNodeName;
+} SAMPR_DOMAIN_REPLICATION_INFORMATION, *PSAMPR_DOMAIN_REPLICATION_INFORMATION;
+
+typedef struct _SAMPR_DOMAIN_LOCKOUT_INFORMATION
+{
+    LARGE_INTEGER LockoutDuration;
+    LARGE_INTEGER LockoutObservationWindow;
+    unsigned short LockoutThreshold;
+} SAMPR_DOMAIN_LOCKOUT_INFORMATION, *PSAMPR_DOMAIN_LOCKOUT_INFORMATION;
+
+typedef enum _DOMAIN_INFORMATION_CLASS
+{
+    DomainPasswordInformation = 1,
+    DomainGeneralInformation = 2,
+    DomainLogoffInformation = 3,
+    DomainOemInformation = 4,
+    DomainNameInformation = 5,
+    DomainReplicationInformation = 6,
+    DomainServerRoleInformation = 7,
+    DomainModifiedInformation = 8,
+    DomainStateInformation = 9,
+    DomainGeneralInformation2 = 11,
+    DomainLockoutInformation = 12,
+    DomainModifiedInformation2 = 13
+} DOMAIN_INFORMATION_CLASS;
+
+typedef [switch_type(DOMAIN_INFORMATION_CLASS)] union _SAMPR_DOMAIN_INFO_BUFFER
+{
+    [case(DomainPasswordInformation)] DOMAIN_PASSWORD_INFORMATION Password;
+    [case(DomainGeneralInformation)] SAMPR_DOMAIN_GENERAL_INFORMATION General;
+    [case(DomainLogoffInformation)] DOMAIN_LOGOFF_INFORMATION Logoff;
+    [case(DomainOemInformation)] SAMPR_DOMAIN_OEM_INFORMATION Oem;
+    [case(DomainNameInformation)] SAMPR_DOMAIN_NAME_INFORMATION Name;
+    [case(DomainServerRoleInformation)] DOMAIN_SERVER_ROLE_INFORMATION Role;
+    [case(DomainReplicationInformation)] SAMPR_DOMAIN_REPLICATION_INFORMATION Replication;
+    [case(DomainModifiedInformation)] DOMAIN_MODIFIED_INFORMATION Modified;
+    [case(DomainStateInformation)] DOMAIN_STATE_INFORMATION State;
+    [case(DomainGeneralInformation2)] SAMPR_DOMAIN_GENERAL_INFORMATION2 General2;
+    [case(DomainLockoutInformation)] SAMPR_DOMAIN_LOCKOUT_INFORMATION Lockout;
+    [case(DomainModifiedInformation2)] DOMAIN_MODIFIED_INFORMATION2 Modified2;
+} SAMPR_DOMAIN_INFO_BUFFER, *PSAMPR_DOMAIN_INFO_BUFFER;
+
+typedef enum _DOMAIN_DISPLAY_INFORMATION
+{
+    DomainDisplayUser = 1,
+    DomainDisplayMachine,
+    DomainDisplayGroup,
+    DomainDisplayOemUser,
+    DomainDisplayOemGroup
+} DOMAIN_DISPLAY_INFORMATION, *PDOMAIN_DISPLAY_INFORMATION;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_USER
+{
+    unsigned long Index;
+    unsigned long Rid;
+    unsigned long AccountControl;
+    RPC_UNICODE_STRING AccountName;
+    RPC_UNICODE_STRING AdminComment;
+    RPC_UNICODE_STRING FullName;
+} SAMPR_DOMAIN_DISPLAY_USER, *PSAMPR_DOMAIN_DISPLAY_USER;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_MACHINE
+{
+    unsigned long Index;
+    unsigned long Rid;
+    unsigned long AccountControl;
+    RPC_UNICODE_STRING AccountName;
+    RPC_UNICODE_STRING AdminComment;
+} SAMPR_DOMAIN_DISPLAY_MACHINE, *PSAMPR_DOMAIN_DISPLAY_MACHINE;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_GROUP
+{
+    unsigned long Index;
+    unsigned long Rid;
+    unsigned long Attributes;
+    RPC_UNICODE_STRING AccountName;
+    RPC_UNICODE_STRING AdminComment;
+} SAMPR_DOMAIN_DISPLAY_GROUP, *PSAMPR_DOMAIN_DISPLAY_GROUP;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_USER
+{
+    unsigned long Index;
+    RPC_STRING OemAccountName;
+} SAMPR_DOMAIN_DISPLAY_OEM_USER, *PSAMPR_DOMAIN_DISPLAY_OEM_USER;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_GROUP
+{
+    unsigned long Index;
+    RPC_STRING OemAccountName;
+} SAMPR_DOMAIN_DISPLAY_OEM_GROUP, *PSAMPR_DOMAIN_DISPLAY_OEM_GROUP;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_USER_BUFFER
+{
+    unsigned long EntriesRead;
+    [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_USER Buffer;
+} SAMPR_DOMAIN_DISPLAY_USER_BUFFER, *PSAMPR_DOMAIN_DISPLAY_USER_BUFFER;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER
+{
+    unsigned long EntriesRead;
+    [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_MACHINE Buffer;
+} SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER, *PSAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER
+{
+    unsigned long EntriesRead;
+    [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_GROUP Buffer;
+} SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER, *PSAMPR_DOMAIN_DISPLAY_GROUP_BUFFER;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER
+{
+    unsigned long EntriesRead;
+   [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_OEM_USER Buffer;
+} SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER, *PSAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER;
+
+typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER
+{
+    unsigned long EntriesRead;
+    [size_is(EntriesRead)] PSAMPR_DOMAIN_DISPLAY_OEM_GROUP Buffer;
+} SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER, *PSAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER;
+
+typedef [switch_type(DOMAIN_DISPLAY_INFORMATION)] union _SAMPR_DISPLAY_INFO_BUFFER
+{
+    [case(DomainDisplayUser)] SAMPR_DOMAIN_DISPLAY_USER_BUFFER UserInformation;
+    [case(DomainDisplayMachine)] SAMPR_DOMAIN_DISPLAY_MACHINE_BUFFER MachineInformation;
+    [case(DomainDisplayGroup)] SAMPR_DOMAIN_DISPLAY_GROUP_BUFFER GroupInformation;
+    [case(DomainDisplayOemUser)] SAMPR_DOMAIN_DISPLAY_OEM_USER_BUFFER OemUserInformation;
+    [case(DomainDisplayOemGroup)] SAMPR_DOMAIN_DISPLAY_OEM_GROUP_BUFFER OemGroupInformation;
+} SAMPR_DISPLAY_INFO_BUFFER, *PSAMPR_DISPLAY_INFO_BUFFER;
+
+typedef struct _GROUP_ATTRIBUTE_INFORMATION
+{
+    unsigned long Attributes;
+} GROUP_ATTRIBUTE_INFORMATION, *PGROUP_ATTRIBUTE_INFORMATION;
+
+typedef struct _SAMPR_GROUP_GENERAL_INFORMATION
+{
+    RPC_UNICODE_STRING Name;
+    unsigned long Attributes;
+    unsigned long MemberCount;
+    RPC_UNICODE_STRING AdminComment;
+} SAMPR_GROUP_GENERAL_INFORMATION, *PSAMPR_GROUP_GENERAL_INFORMATION;
+
+typedef struct _SAMPR_GROUP_NAME_INFORMATION
+{
+    RPC_UNICODE_STRING Name;
+} SAMPR_GROUP_NAME_INFORMATION, *PSAMPR_GROUP_NAME_INFORMATION;
+
+typedef struct _SAMPR_GROUP_ADM_COMMENT_INFORMATION
+{
+    RPC_UNICODE_STRING AdminComment;
+} SAMPR_GROUP_ADM_COMMENT_INFORMATION, *PSAMPR_GROUP_ADM_COMMENT_INFORMATION;
+
+typedef enum _GROUP_INFORMATION_CLASS
+{
+    GroupGeneralInformation = 1,
+    GroupNameInformation,
+    GroupAttributeInformation,
+    GroupAdminCommentInformation,
+    GroupReplicationInformation
+} GROUP_INFORMATION_CLASS;
+
+typedef [switch_type(GROUP_INFORMATION_CLASS)] union _SAMPR_GROUP_INFO_BUFFER
+{
+    [case(GroupGeneralInformation)] SAMPR_GROUP_GENERAL_INFORMATION General;
+    [case(GroupNameInformation)] SAMPR_GROUP_NAME_INFORMATION Name;
+    [case(GroupAttributeInformation)] GROUP_ATTRIBUTE_INFORMATION Attribute;
+    [case(GroupAdminCommentInformation)] SAMPR_GROUP_ADM_COMMENT_INFORMATION AdminComment;
+    [case(GroupReplicationInformation)] SAMPR_GROUP_GENERAL_INFORMATION DoNotUse;
+} SAMPR_GROUP_INFO_BUFFER, *PSAMPR_GROUP_INFO_BUFFER;
+
+typedef struct _SAMPR_ALIAS_GENERAL_INFORMATION
+{
+    RPC_UNICODE_STRING Name;
+    unsigned long MemberCount;
+    RPC_UNICODE_STRING AdminComment;
+} SAMPR_ALIAS_GENERAL_INFORMATION, *PSAMPR_ALIAS_GENERAL_INFORMATION;
+
+typedef struct _SAMPR_ALIAS_NAME_INFORMATION
+{
+    RPC_UNICODE_STRING Name;
+} SAMPR_ALIAS_NAME_INFORMATION, *PSAMPR_ALIAS_NAME_INFORMATION;
+
+typedef struct _SAMPR_ALIAS_ADM_COMMENT_INFORMATION
+{
+    RPC_UNICODE_STRING AdminComment;
+} SAMPR_ALIAS_ADM_COMMENT_INFORMATION, *PSAMPR_ALIAS_ADM_COMMENT_INFORMATION;
+
+typedef enum _ALIAS_INFORMATION_CLASS
+{
+    AliasGeneralInformation = 1,
+    AliasNameInformation,
+    AliasAdminCommentInformation,
+} ALIAS_INFORMATION_CLASS;
+
+typedef [switch_type(ALIAS_INFORMATION_CLASS)] union _SAMPR_ALIAS_INFO_BUFFER
+{
+    [case(AliasGeneralInformation)] SAMPR_ALIAS_GENERAL_INFORMATION General;
+    [case(AliasNameInformation)] SAMPR_ALIAS_NAME_INFORMATION Name;
+    [case(AliasAdminCommentInformation)] SAMPR_ALIAS_ADM_COMMENT_INFORMATION AdminComment;
+} SAMPR_ALIAS_INFO_BUFFER, *PSAMPR_ALIAS_INFO_BUFFER;
+
+typedef struct _SAMPR_ENCRYPTED_USER_PASSWORD
+{
+    unsigned char Buffer[(256 * 2) + 4];
+} SAMPR_ENCRYPTED_USER_PASSWORD, *PSAMPR_ENCRYPTED_USER_PASSWORD;
+
+typedef struct _SAMPR_ENCRYPTED_USER_PASSWORD_NEW
+{
+    unsigned char Buffer[(256 * 2) + 4 + 16];
+} SAMPR_ENCRYPTED_USER_PASSWORD_NEW, *PSAMPR_ENCRYPTED_USER_PASSWORD_NEW;
+
+typedef struct _USER_PRIMARY_GROUP_INFORMATION
+{
+    unsigned long PrimaryGroupId;
+} USER_PRIMARY_GROUP_INFORMATION, *PUSER_PRIMARY_GROUP_INFORMATION;
+
+typedef struct _USER_CONTROL_INFORMATION
+{
+    unsigned long UserAccountControl;
+} USER_CONTROL_INFORMATION, *PUSER_CONTROL_INFORMATION;
+
+typedef struct _USER_EXPIRES_INFORMATION
+{
+    OLD_LARGE_INTEGER AccountExpires;
+} USER_EXPIRES_INFORMATION, *PUSER_EXPIRES_INFORMATION;
+
+typedef struct _SAMPR_LOGON_HOURS
+{
+    unsigned short UnitsPerWeek;
+//    [size_is(1260), length_is((UnitsPerWeek + 7) / 8)] unsigned char *LogonHours; // FIXME
+    [size_is(1260)] unsigned char *LogonHours;
+} SAMPR_LOGON_HOURS, *PSAMPR_LOGON_HOURS;
+
+typedef struct _SAMPR_USER_ALL_INFORMATION
+{
+    OLD_LARGE_INTEGER LastLogon;
+    OLD_LARGE_INTEGER LastLogoff;
+    OLD_LARGE_INTEGER PasswordLastSet;
+    OLD_LARGE_INTEGER AccountExpires;
+    OLD_LARGE_INTEGER PasswordCanChange;
+    OLD_LARGE_INTEGER PasswordMustChange;
+    RPC_UNICODE_STRING UserName;
+    RPC_UNICODE_STRING FullName;
+    RPC_UNICODE_STRING HomeDirectory;
+    RPC_UNICODE_STRING HomeDirectoryDrive;
+    RPC_UNICODE_STRING ScriptPath;
+    RPC_UNICODE_STRING ProfilePath;
+    RPC_UNICODE_STRING AdminComment;
+    RPC_UNICODE_STRING WorkStations;
+    RPC_UNICODE_STRING UserComment;
+    RPC_UNICODE_STRING Parameters;
+    RPC_SHORT_BLOB LmOwfPassword;
+    RPC_SHORT_BLOB NtOwfPassword;
+    RPC_UNICODE_STRING PrivateData;
+    SAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor;
+    unsigned long UserId;
+    unsigned long PrimaryGroupId;
+    unsigned long UserAccountControl;
+    unsigned long WhichFields;
+    SAMPR_LOGON_HOURS LogonHours;
+    unsigned short BadPasswordCount;
+    unsigned short LogonCount;
+    unsigned short CountryCode;
+    unsigned short CodePage;
+    unsigned char LmPasswordPresent;
+    unsigned char NtPasswordPresent;
+    unsigned char PasswordExpired;
+    unsigned char PrivateDataSensitive;
+} SAMPR_USER_ALL_INFORMATION, *PSAMPR_USER_ALL_INFORMATION;
+
+typedef struct _SAMPR_USER_GENERAL_INFORMATION
+{
+    RPC_UNICODE_STRING UserName;
+    RPC_UNICODE_STRING FullName;
+    unsigned long PrimaryGroupId;
+    RPC_UNICODE_STRING AdminComment;
+    RPC_UNICODE_STRING UserComment;
+} SAMPR_USER_GENERAL_INFORMATION, *PSAMPR_USER_GENERAL_INFORMATION;
+
+typedef struct _SAMPR_USER_PREFERENCES_INFORMATION
+{
+    RPC_UNICODE_STRING UserComment;
+    RPC_UNICODE_STRING Reserved1;
+    unsigned short CountryCode;
+    unsigned short CodePage;
+} SAMPR_USER_PREFERENCES_INFORMATION, *PSAMPR_USER_PREFERENCES_INFORMATION;
+
+typedef struct _SAMPR_USER_PARAMETERS_INFORMATION
+{
+    RPC_UNICODE_STRING Parameters;
+} SAMPR_USER_PARAMETERS_INFORMATION, *PSAMPR_USER_PARAMETERS_INFORMATION;
+
+typedef struct _SAMPR_USER_LOGON_INFORMATION
+{
+    RPC_UNICODE_STRING UserName;
+    RPC_UNICODE_STRING FullName;
+    unsigned long UserId;
+    unsigned long PrimaryGroupId;
+    RPC_UNICODE_STRING HomeDirectory;
+    RPC_UNICODE_STRING HomeDirectoryDrive;
+    RPC_UNICODE_STRING ScriptPath;
+    RPC_UNICODE_STRING ProfilePath;
+    RPC_UNICODE_STRING WorkStations;
+    OLD_LARGE_INTEGER LastLogon;
+    OLD_LARGE_INTEGER LastLogoff;
+    OLD_LARGE_INTEGER PasswordLastSet;
+    OLD_LARGE_INTEGER PasswordCanChange;
+    OLD_LARGE_INTEGER PasswordMustChange;
+    SAMPR_LOGON_HOURS LogonHours;
+    unsigned short BadPasswordCount;
+    unsigned short LogonCount;
+    unsigned long UserAccountControl;
+} SAMPR_USER_LOGON_INFORMATION, *PSAMPR_USER_LOGON_INFORMATION;
+
+typedef struct _SAMPR_USER_ACCOUNT_INFORMATION
+{
+    RPC_UNICODE_STRING UserName;
+    RPC_UNICODE_STRING FullName;
+    unsigned long UserId;
+    unsigned long PrimaryGroupId;
+    RPC_UNICODE_STRING HomeDirectory;
+    RPC_UNICODE_STRING HomeDirectoryDrive;
+    RPC_UNICODE_STRING ScriptPath;
+    RPC_UNICODE_STRING ProfilePath;
+    RPC_UNICODE_STRING AdminComment;
+    RPC_UNICODE_STRING WorkStations;
+    OLD_LARGE_INTEGER LastLogon;
+    OLD_LARGE_INTEGER LastLogoff;
+    SAMPR_LOGON_HOURS LogonHours;
+    unsigned short BadPasswordCount;
+    unsigned short LogonCount;
+    OLD_LARGE_INTEGER PasswordLastSet;
+    OLD_LARGE_INTEGER AccountExpires;
+    unsigned long UserAccountControl;
+} SAMPR_USER_ACCOUNT_INFORMATION, *PSAMPR_USER_ACCOUNT_INFORMATION;
+
+typedef struct _SAMPR_USER_A_NAME_INFORMATION
+{
+    RPC_UNICODE_STRING UserName;
+} SAMPR_USER_A_NAME_INFORMATION, *PSAMPR_USER_A_NAME_INFORMATION;
+
+typedef struct _SAMPR_USER_F_NAME_INFORMATION
+{
+    RPC_UNICODE_STRING FullName;
+} SAMPR_USER_F_NAME_INFORMATION, *PSAMPR_USER_F_NAME_INFORMATION;
+
+typedef struct _SAMPR_USER_NAME_INFORMATION
+{
+    RPC_UNICODE_STRING UserName;
+    RPC_UNICODE_STRING FullName;
+} SAMPR_USER_NAME_INFORMATION, *PSAMPR_USER_NAME_INFORMATION;
+
+typedef struct _SAMPR_USER_HOME_INFORMATION
+{
+    RPC_UNICODE_STRING HomeDirectory;
+    RPC_UNICODE_STRING HomeDirectoryDrive;
+} SAMPR_USER_HOME_INFORMATION, *PSAMPR_USER_HOME_INFORMATION;
+
+typedef struct _SAMPR_USER_SCRIPT_INFORMATION
+{
+    RPC_UNICODE_STRING ScriptPath;
+} SAMPR_USER_SCRIPT_INFORMATION, *PSAMPR_USER_SCRIPT_INFORMATION;
+
+typedef struct _SAMPR_USER_PROFILE_INFORMATION
+{
+    RPC_UNICODE_STRING ProfilePath;
+} SAMPR_USER_PROFILE_INFORMATION, *PSAMPR_USER_PROFILE_INFORMATION;
+
+typedef struct _SAMPR_USER_ADMIN_COMMENT_INFORMATION
+{
+    RPC_UNICODE_STRING AdminComment;
+} SAMPR_USER_ADMIN_COMMENT_INFORMATION, *PSAMPR_USER_ADMIN_COMMENT_INFORMATION;
+
+typedef struct _SAMPR_USER_WORKSTATIONS_INFORMATION
+{
+    RPC_UNICODE_STRING WorkStations;
+} SAMPR_USER_WORKSTATIONS_INFORMATION, *PSAMPR_USER_WORKSTATIONS_INFORMATION;
+
+typedef struct _SAMPR_USER_LOGON_HOURS_INFORMATION
+{
+    SAMPR_LOGON_HOURS LogonHours;
+} SAMPR_USER_LOGON_HOURS_INFORMATION, *PSAMPR_USER_LOGON_HOURS_INFORMATION;
+
+typedef struct _SAMPR_USER_INTERNAL1_INFORMATION
+{
+    ENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword;
+    ENCRYPTED_LM_OWF_PASSWORD EncryptedLmOwfPassword;
+    unsigned char NtPasswordPresent;
+    unsigned char LmPasswordPresent;
+    unsigned char PasswordExpired;
+} SAMPR_USER_INTERNAL1_INFORMATION, *PSAMPR_USER_INTERNAL1_INFORMATION;
+
+typedef struct _SAMPR_USER_INTERNAL4_INFORMATION
+{
+    SAMPR_USER_ALL_INFORMATION I1;
+    SAMPR_ENCRYPTED_USER_PASSWORD UserPassword;
+} SAMPR_USER_INTERNAL4_INFORMATION, *PSAMPR_USER_INTERNAL4_INFORMATION;
+
+typedef struct _SAMPR_USER_INTERNAL4_INFORMATION_NEW
+{
+    SAMPR_USER_ALL_INFORMATION I1;
+    SAMPR_ENCRYPTED_USER_PASSWORD_NEW UserPassword;
+} SAMPR_USER_INTERNAL4_INFORMATION_NEW, *PSAMPR_USER_INTERNAL4_INFORMATION_NEW;
+
+typedef struct _SAMPR_USER_INTERNAL5_INFORMATION
+{
+    SAMPR_ENCRYPTED_USER_PASSWORD UserPassword;
+    unsigned char PasswordExpired;
+} SAMPR_USER_INTERNAL5_INFORMATION, *PSAMPR_USER_INTERNAL5_INFORMATION;
+
+typedef struct _SAMPR_USER_INTERNAL5_INFORMATION_NEW
+{
+    SAMPR_ENCRYPTED_USER_PASSWORD_NEW UserPassword;
+    unsigned char PasswordExpired;
+} SAMPR_USER_INTERNAL5_INFORMATION_NEW, *PSAMPR_USER_INTERNAL5_INFORMATION_NEW;
+
+typedef enum _USER_INFORMATION_CLASS
+{
+    UserGeneralInformation = 1,
+    UserPreferencesInformation = 2,
+    UserLogonInformation = 3,
+    UserLogonHoursInformation = 4,
+    UserAccountInformation = 5,
+    UserNameInformation = 6,
+    UserAccountNameInformation = 7,
+    UserFullNameInformation = 8,
+    UserPrimaryGroupInformation = 9,
+    UserHomeInformation = 10,
+    UserScriptInformation = 11,
+    UserProfileInformation = 12,
+    UserAdminCommentInformation = 13,
+    UserWorkStationsInformation = 14,
+    UserControlInformation = 16,
+    UserExpiresInformation = 17,
+    UserInternal1Information = 18,
+    UserParametersInformation = 20,
+    UserAllInformation = 21,
+    UserInternal4Information = 23,
+    UserInternal5Information = 24,
+    UserInternal4InformationNew = 25,
+    UserInternal5InformationNew = 26,
+} USER_INFORMATION_CLASS, *PUSER_INFORMATION_CLASS;
+
+typedef [switch_type(USER_INFORMATION_CLASS)] union _SAMPR_USER_INFO_BUFFER
+{
+    [case(UserGeneralInformation)] SAMPR_USER_GENERAL_INFORMATION General;
+    [case(UserPreferencesInformation)] SAMPR_USER_PREFERENCES_INFORMATION Preferences;
+    [case(UserLogonInformation)] SAMPR_USER_LOGON_INFORMATION Logon;
+    [case(UserLogonHoursInformation)] SAMPR_USER_LOGON_HOURS_INFORMATION LogonHours;
+    [case(UserAccountInformation)] SAMPR_USER_ACCOUNT_INFORMATION Account;
+    [case(UserNameInformation)] SAMPR_USER_NAME_INFORMATION Name;
+    [case(UserAccountNameInformation)] SAMPR_USER_A_NAME_INFORMATION AccountName;
+    [case(UserFullNameInformation)] SAMPR_USER_F_NAME_INFORMATION FullName;
+    [case(UserPrimaryGroupInformation)] USER_PRIMARY_GROUP_INFORMATION PrimaryGroup;
+    [case(UserHomeInformation)] SAMPR_USER_HOME_INFORMATION Home;
+    [case(UserScriptInformation)] SAMPR_USER_SCRIPT_INFORMATION Script;
+    [case(UserProfileInformation)] SAMPR_USER_PROFILE_INFORMATION Profile;
+    [case(UserAdminCommentInformation)] SAMPR_USER_ADMIN_COMMENT_INFORMATION AdminComment;
+    [case(UserWorkStationsInformation)] SAMPR_USER_WORKSTATIONS_INFORMATION WorkStations;
+    [case(UserControlInformation)] USER_CONTROL_INFORMATION Control;
+    [case(UserExpiresInformation)] USER_EXPIRES_INFORMATION Expires;
+    [case(UserInternal1Information)] SAMPR_USER_INTERNAL1_INFORMATION Internal1;
+    [case(UserParametersInformation)] SAMPR_USER_PARAMETERS_INFORMATION Parameters;
+    [case(UserAllInformation)] SAMPR_USER_ALL_INFORMATION All;
+    [case(UserInternal4Information)] SAMPR_USER_INTERNAL4_INFORMATION Internal4;
+    [case(UserInternal5Information)] SAMPR_USER_INTERNAL5_INFORMATION Internal5;
+    [case(UserInternal4InformationNew)] SAMPR_USER_INTERNAL4_INFORMATION_NEW Internal4New;
+    [case(UserInternal5InformationNew)] SAMPR_USER_INTERNAL5_INFORMATION_NEW Internal5New;
+} SAMPR_USER_INFO_BUFFER, *PSAMPR_USER_INFO_BUFFER;
+
+typedef enum _PASSWORD_POLICY_VALIDATION_TYPE
+{
+    SamValidateAuthentication = 1,
+    SamValidatePasswordChange,
+    SamValidatePasswordReset
+} PASSWORD_POLICY_VALIDATION_TYPE;
+
+typedef struct _SAM_VALIDATE_PASSWORD_HASH
+{
+    unsigned long Length;
+    [unique,size_is(Length)] unsigned char* Hash;
+} SAM_VALIDATE_PASSWORD_HASH, *PSAM_VALIDATE_PASSWORD_HASH;
+
+typedef struct _SAM_VALIDATE_PERSISTED_FIELDS
+{
+    unsigned long PresentFields;
+    LARGE_INTEGER PasswordLastSet;
+    LARGE_INTEGER BadPasswordTime;
+    LARGE_INTEGER LockoutTime;
+    unsigned long BadPasswordCount;
+    unsigned long PasswordHistoryLength;
+    [unique,size_is(PasswordHistoryLength)] PSAM_VALIDATE_PASSWORD_HASH PasswordHistory;
+} SAM_VALIDATE_PERSISTED_FIELDS, *PSAM_VALIDATE_PERSISTED_FIELDS;
+
+typedef enum _SAM_VALIDATE_VALIDATION_STATUS
+{
+    SamValidateSuccess = 0,
+    SamValidatePasswordMustChange,
+    SamValidateAccountLockedOut,
+    SamValidatePasswordExpired,
+    SamValidatePasswordIncorrect,
+    SamValidatePasswordIsInHistory,
+    SamValidatePasswordTooShort,
+    SamValidatePasswordTooLong,
+    SamValidatePasswordNotComplexEnough,
+    SamValidatePasswordTooRecent,
+    SamValidatePasswordFilterError
+} SAM_VALIDATE_VALIDATION_STATUS, *PSAM_VALIDATE_VALIDATION_STATUS;
+
+typedef struct _SAM_VALIDATE_STANDARD_OUTPUT_ARG
+{
+    SAM_VALIDATE_PERSISTED_FIELDS ChangedPersistedFields;
+    SAM_VALIDATE_VALIDATION_STATUS ValidationStatus;
+} SAM_VALIDATE_STANDARD_OUTPUT_ARG, *PSAM_VALIDATE_STANDARD_OUTPUT_ARG;
+
+typedef struct _SAM_VALIDATE_AUTHENTICATION_INPUT_ARG
+{
+    SAM_VALIDATE_PERSISTED_FIELDS InputPersistedFields;
+    unsigned char PasswordMatched;
+} SAM_VALIDATE_AUTHENTICATION_INPUT_ARG, *PSAM_VALIDATE_AUTHENTICATION_INPUT_ARG;
+
+typedef struct _SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
+{
+    SAM_VALIDATE_PERSISTED_FIELDS InputPersistedFields;
+    RPC_UNICODE_STRING ClearPassword;
+    RPC_UNICODE_STRING UserAccountName;
+    SAM_VALIDATE_PASSWORD_HASH HashedPassword;
+    unsigned char PasswordMatch;
+} SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG, *PSAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG;
+
+typedef struct _SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG
+{
+    SAM_VALIDATE_PERSISTED_FIELDS InputPersistedFields;
+    RPC_UNICODE_STRING ClearPassword;
+    RPC_UNICODE_STRING UserAccountName;
+    SAM_VALIDATE_PASSWORD_HASH HashedPassword;
+    unsigned char PasswordMustChangeAtNextLogon;
+    unsigned char ClearLockout;
+} SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG, *PSAM_VALIDATE_PASSWORD_RESET_INPUT_ARG;
+
+typedef [switch_type(PASSWORD_POLICY_VALIDATION_TYPE)] union _SAM_VALIDATE_INPUT_ARG
+{
+    [case(SamValidateAuthentication)] SAM_VALIDATE_AUTHENTICATION_INPUT_ARG ValidateAuthenticationInput;
+    [case(SamValidatePasswordChange)] SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG ValidatePasswordChangeInput;
+    [case(SamValidatePasswordReset)] SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG ValidatePasswordResetInput;
+} SAM_VALIDATE_INPUT_ARG, *PSAM_VALIDATE_INPUT_ARG;
+
+typedef [switch_type(PASSWORD_POLICY_VALIDATION_TYPE)] union _SAM_VALIDATE_OUTPUT_ARG
+{
+    [case(SamValidateAuthentication)] SAM_VALIDATE_STANDARD_OUTPUT_ARG ValidateAuthenticationOutput;
+    [case(SamValidatePasswordChange)] SAM_VALIDATE_STANDARD_OUTPUT_ARG ValidatePasswordChangeOutput;
+    [case(SamValidatePasswordReset)] SAM_VALIDATE_STANDARD_OUTPUT_ARG ValidatePasswordResetOutput;
+} SAM_VALIDATE_OUTPUT_ARG, *PSAM_VALIDATE_OUTPUT_ARG;
+
+[
+    uuid(12345778-1234-ABCD-EF00-0123456789AC),
+    version(1.0),
+    pointer_default(unique),
+    endpoint("ncacn_np:[\\pipe\\samr]")
+#ifndef __midl
+    ,explicit_handle
+#endif
+]
+interface samr
+{
+    /* Function 0 */
+    NTSTATUS
+    __stdcall
+    SamrConnect(
+        [in, unique] PSAMPR_SERVER_NAME ServerName,
+        [out] SAMPR_HANDLE *ServerHandle,
+        [in] ACCESS_MASK DesiredAccess);
+
+    /* Function 1 */
+    NTSTATUS
+    __stdcall
+    SamrCloseHandle(
+        [in,out] SAMPR_HANDLE *SamHandle);
+
+    /* Function 2 */
+    NTSTATUS
+    __stdcall
+    SamrSetSecurityObject(
+        [in] SAMPR_HANDLE ObjectHandle,
+        [in] SECURITY_INFORMATION SecurityInformation,
+        [in] PSAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor);
+
+    /* Function 3 */
+    NTSTATUS
+    __stdcall
+    SamrQuerySecurityObject(
+        [in] SAMPR_HANDLE ObjectHandle,
+        [in] SECURITY_INFORMATION SecurityInformation,
+        [out] PSAMPR_SR_SECURITY_DESCRIPTOR *SecurityDescriptor);
+
+    /* Function 4 */
+    NTSTATUS
+    __stdcall
+    SamrShutdownSamServer(
+        [in] SAMPR_HANDLE ServerHandle);
+
+    /* Function 5 */
+    NTSTATUS
+    __stdcall
+    SamrLookupDomainInSamServer(
+        [in] SAMPR_HANDLE ServerHandle,
+        [in] PRPC_UNICODE_STRING Name,
+        [out] PRPC_SID *DomainId);
+
+    /* Function 6 */
+    NTSTATUS
+    __stdcall
+    SamrEnumerateDomainsInSamServer(
+        [in] SAMPR_HANDLE ServerHandle,
+        [in,out] unsigned long *EnumerationContext,
+        [out] PSAMPR_ENUMERATION_BUFFER *Buffer,
+        [in] unsigned long PreferedMaximumLength,
+        [out] unsigned long *CountReturned);
+
+    /* Function 7 */
+    NTSTATUS
+    __stdcall
+    SamrOpenDomain(
+        [in] SAMPR_HANDLE ServerHandle,
+        [in] ACCESS_MASK DesiredAccess,
+        [in] PRPC_SID DomainId,
+        [out] SAMPR_HANDLE *DomainHandle);
+
+    /* Function 8 */
+    NTSTATUS
+    __stdcall
+    SamrQueryInformationDomain(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
+        [out, switch_is(DomainInformationClass)] PSAMPR_DOMAIN_INFO_BUFFER *Buffer);
+
+    /* Function 9 */
+    NTSTATUS
+    __stdcall
+    SamrSetInformationDomain(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
+        [in, switch_is(DomainInformationClass)] PSAMPR_DOMAIN_INFO_BUFFER DomainInformation);
+
+    /* Function 10 */
+    NTSTATUS
+    __stdcall
+    SamrCreateGroupInDomain(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] PRPC_UNICODE_STRING Name,
+        [in] ACCESS_MASK DesiredAccess,
+        [out] SAMPR_HANDLE *GroupHandle,
+        [out] unsigned long *RelativeId);
+
+    /* Function 11 */
+    NTSTATUS
+    __stdcall
+    SamrEnumerateGroupsInDomain(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in,out] unsigned long *EnumerationContext,
+        [out] PSAMPR_ENUMERATION_BUFFER *Buffer,
+        [in] unsigned long PreferedMaximumLength,
+        [out] unsigned long *CountReturned);
+
+    /* Function 12 */
+    NTSTATUS
+    __stdcall
+    SamrCreateUserInDomain([in] SAMPR_HANDLE DomainHandle,
+                           [in] PRPC_UNICODE_STRING Name,
+                           [in] ACCESS_MASK DesiredAccess,
+                           [out] SAMPR_HANDLE *UserHandle,
+                           [out] unsigned long *RelativeId);
+
+    /* Function 13 */
+    NTSTATUS
+    __stdcall
+    SamrEnumerateUsersInDomain([in] SAMPR_HANDLE DomainHandle,
+                               [in,out] unsigned long *EnumerationContext,
+                               [in] unsigned long UserAccountControl,
+                               [out] PSAMPR_ENUMERATION_BUFFER *Buffer,
+                               [in] unsigned long PreferedMaximumLength,
+                               [out] unsigned long *CountReturned);
+
+    /* Function 14 */
+    NTSTATUS
+    __stdcall
+    SamrCreateAliasInDomain([in] SAMPR_HANDLE DomainHandle,
+                            [in] PRPC_UNICODE_STRING AccountName,
+                            [in] ACCESS_MASK DesiredAccess,
+                            [out] SAMPR_HANDLE *AliasHandle,
+                            [out] unsigned long *RelativeId);
+
+    /* Function 15 */
+    NTSTATUS
+    __stdcall
+    SamrEnumerateAliasesInDomain([in] SAMPR_HANDLE DomainHandle,
+                                 [in,out] unsigned long *EnumerationContext,
+                                 [out] PSAMPR_ENUMERATION_BUFFER *Buffer,
+                                 [in] unsigned long PreferedMaximumLength,
+                                 [out] unsigned long *CountReturned);
+
+    /* Function 16 */
+    NTSTATUS
+    __stdcall
+    SamrGetAliasMembership([in] SAMPR_HANDLE DomainHandle,
+                           [in] PSAMPR_PSID_ARRAY SidArray,
+                           [out] PSAMPR_ULONG_ARRAY Membership);
+
+    /* Function 17 */
+    NTSTATUS
+    __stdcall
+    SamrLookupNamesInDomain([in] SAMPR_HANDLE DomainHandle,
+                            [in, range(0, 1000)] unsigned long Count,
+                            [in, size_is(1000), length_is(Count)] RPC_UNICODE_STRING Names[*],
+                            [out] PSAMPR_ULONG_ARRAY RelativeIds,
+                            [out] PSAMPR_ULONG_ARRAY Use);
+
+    /* Function 18 */
+    NTSTATUS
+    __stdcall
+    SamrLookupIdsInDomain(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in, range(0, 1000)] unsigned long Count,
+        [in, size_is(1000), length_is(Count)] unsigned long *RelativeIds,
+        [out] PSAMPR_RETURNED_USTRING_ARRAY Names,
+        [out] PSAMPR_ULONG_ARRAY Use);
+
+    /* Function 19 */
+    NTSTATUS
+    __stdcall
+    SamrOpenGroup(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] ACCESS_MASK DesiredAccess,
+        [in] unsigned long GroupId,
+        [out] SAMPR_HANDLE *GroupHandle);
+
+    /* Function 20 */
+    NTSTATUS
+    __stdcall
+    SamrQueryInformationGroup(
+        [in] SAMPR_HANDLE GroupHandle,
+        [in] GROUP_INFORMATION_CLASS GroupInformationClass,
+        [out, switch_is(GroupInformationClass)] PSAMPR_GROUP_INFO_BUFFER *Buffer);
+
+    /* Function 21 */
+    NTSTATUS
+    __stdcall
+    SamrSetInformationGroup(
+        [in] SAMPR_HANDLE GroupHandle,
+        [in] GROUP_INFORMATION_CLASS GroupInformationClass,
+        [in, switch_is(GroupInformationClass)] PSAMPR_GROUP_INFO_BUFFER Buffer);
+
+    /* Function 22 */
+    NTSTATUS
+    __stdcall
+    SamrAddMemberToGroup(
+        [in] SAMPR_HANDLE GroupHandle,
+        [in] unsigned long MemberId,
+        [in] unsigned long Attributes);
+
+    /* Function 21 */
+    NTSTATUS
+    __stdcall
+    SamrDeleteGroup(
+        [in,out] SAMPR_HANDLE *GroupHandle);
+
+    /* Function 24 */
+    NTSTATUS
+    __stdcall
+    SamrRemoveMemberFromGroup(
+        [in] SAMPR_HANDLE GroupHandle,
+        [in] unsigned long MemberId);
+
+    /* Function 25 */
+    NTSTATUS
+    __stdcall
+    SamrGetMembersInGroup(
+        [in] SAMPR_HANDLE GroupHandle,
+        [out] PSAMPR_GET_MEMBERS_BUFFER *Members);
+
+    /* Function 26 */
+    NTSTATUS
+    __stdcall
+    SamrSetMemberAttributesOfGroup(
+        [in] SAMPR_HANDLE GroupHandle,
+        [in] unsigned long MemberId,
+        [in] unsigned long Attributes);
+
+    /* Function 27 */
+    NTSTATUS
+    __stdcall
+    SamrOpenAlias(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] unsigned long DesiredAccess,
+        [in] unsigned long AliasId,
+        [out] SAMPR_HANDLE *AliasHandle);
+
+    /* Function 28 */
+    NTSTATUS
+    __stdcall
+    SamrQueryInformationAlias(
+        [in] SAMPR_HANDLE AliasHandle,
+        [in] ALIAS_INFORMATION_CLASS AliasInformationClass,
+        [out, switch_is(AliasInformationClass)] PSAMPR_ALIAS_INFO_BUFFER *Buffer);
+
+    /* Function 29 */
+    NTSTATUS
+    __stdcall
+    SamrSetInformationAlias(
+        [in] SAMPR_HANDLE AliasHandle,
+        [in] ALIAS_INFORMATION_CLASS AliasInformationClass,
+        [in, switch_is(AliasInformationClass)] PSAMPR_ALIAS_INFO_BUFFER Buffer);
+
+    /* Function 30 */
+    NTSTATUS
+    __stdcall
+    SamrDeleteAlias(
+        [in, out] SAMPR_HANDLE *AliasHandle);
+
+    /* Function 31 */
+    NTSTATUS
+    __stdcall
+    SamrAddMemberToAlias(
+        [in] SAMPR_HANDLE AliasHandle,
+        [in] PRPC_SID MemberId);
+
+    /* Function 32 */
+    NTSTATUS
+    __stdcall
+    SamrRemoveMemberFromAlias(
+        [in] SAMPR_HANDLE AliasHandle,
+        [in] PRPC_SID MemberId);
+
+    /* Function 33 */
+    NTSTATUS
+    __stdcall
+    SamrGetMembersInAlias(
+        [in] SAMPR_HANDLE AliasHandle,
+        [out] PSAMPR_PSID_ARRAY_OUT Members);
+
+    /* Function 34 */
+    NTSTATUS
+    __stdcall
+    SamrOpenUser(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] unsigned long DesiredAccess,
+        [in] unsigned long UserId,
+        [out] SAMPR_HANDLE *UserHandle);
+
+    /* Function 35 */
+    NTSTATUS
+    __stdcall
+    SamrDeleteUser(
+        [in,out] SAMPR_HANDLE *UserHandle);
+
+    /* Function 36 */
+    NTSTATUS
+    __stdcall
+    SamrQueryInformationUser(
+        [in] SAMPR_HANDLE UserHandle,
+        [in] USER_INFORMATION_CLASS UserInformationClass,
+        [out, switch_is(UserInformationClass)] PSAMPR_USER_INFO_BUFFER *Buffer);
+
+    /* Function 37 */
+    NTSTATUS
+    __stdcall
+    SamrSetInformationUser(
+        [in] SAMPR_HANDLE UserHandle,
+        [in] USER_INFORMATION_CLASS UserInformationClass,
+        [in, switch_is(UserInformationClass)] PSAMPR_USER_INFO_BUFFER Buffer);
+
+    /* Function 38 */
+    NTSTATUS
+    __stdcall
+    SamrChangePasswordUser(
+        [in] SAMPR_HANDLE UserHandle,
+        [in] unsigned char LmPresent,
+        [in, unique] PENCRYPTED_LM_OWF_PASSWORD OldLmEncryptedWithNewLm,
+        [in, unique] PENCRYPTED_LM_OWF_PASSWORD NewLmEncryptedWithOldLm,
+        [in] unsigned char NtPresent,
+        [in, unique] PENCRYPTED_NT_OWF_PASSWORD OldNtEncryptedWithNewNt,
+        [in, unique] PENCRYPTED_NT_OWF_PASSWORD NewNtEncryptedWithOldNt,
+        [in] unsigned char NtCrossEncryptionPresent,
+        [in, unique] PENCRYPTED_NT_OWF_PASSWORD NewNtEncryptedWithNewLm,
+        [in] unsigned char LmCrossEncryptionPresent,
+        [in, unique] PENCRYPTED_LM_OWF_PASSWORD NewLmEncryptedWithNewNt);
+
+    /* Function 39 */
+    NTSTATUS
+    __stdcall
+    SamrGetGroupsForUser(
+        [in] SAMPR_HANDLE UserHandle,
+        [out] PSAMPR_GET_GROUPS_BUFFER *Groups);
+
+    /* Function 40 */
+    NTSTATUS
+    __stdcall
+    SamrQueryDisplayInformation(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
+        [in] unsigned long Index,
+        [in] unsigned long EntryCount,
+        [in] unsigned long PreferredMaximumLength,
+        [out] unsigned long * TotalAvailable,
+        [out] unsigned long * TotalReturned,
+        [out, switch_is(DisplayInformationClass)] PSAMPR_DISPLAY_INFO_BUFFER Buffer);
+
+    /* Function 41 */
+    NTSTATUS
+    __stdcall
+    SamrGetDisplayEnumerationIndex(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
+        [in] PRPC_UNICODE_STRING Prefix,
+        [out] unsigned long *Index);
+
+    /* Function 42 */
+    NTSTATUS
+    __stdcall
+    SamrTestPrivateFunctionsDomain(
+        [in] SAMPR_HANDLE DomainHandle);
+
+    /* Function 43 */
+    NTSTATUS
+    __stdcall
+    SamrTestPrivateFunctionsUser(
+        [in] SAMPR_HANDLE UserHandle);
+
+    /* Function 44 */
+    NTSTATUS
+    __stdcall
+    SamrGetUserDomainPasswordInformation(
+        [in] SAMPR_HANDLE UserHandle,
+        [out] PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation);
+
+    /* Function 45 */
+    NTSTATUS
+    __stdcall
+    SamrRemoveMemberFromForeignDomain(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] PRPC_SID MemberSid);
+
+    /* Function 46 */
+    NTSTATUS
+    __stdcall
+    SamrQueryInformationDomain2(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
+        [out, switch_is(DomainInformationClass)] PSAMPR_DOMAIN_INFO_BUFFER *Buffer);
+
+    /* Function 47 */
+    NTSTATUS
+    __stdcall
+    SamrQueryInformationUser2(
+        [in] SAMPR_HANDLE UserHandle,
+        [in] USER_INFORMATION_CLASS UserInformationClass,
+        [out, switch_is(UserInformationClass)] PSAMPR_USER_INFO_BUFFER *Buffer);
+
+    /* Function 48 */
+    NTSTATUS
+    __stdcall
+    SamrQueryDisplayInformation2(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
+        [in] unsigned long Index,
+        [in] unsigned long EntryCount,
+        [in] unsigned long PreferredMaximumLength,
+        [out] unsigned long *TotalAvailable,
+        [out] unsigned long *TotalReturned,
+        [out, switch_is(DisplayInformationClass)] PSAMPR_DISPLAY_INFO_BUFFER Buffer);
+
+    /* Function 49 */
+    NTSTATUS
+    __stdcall
+    SamrGetDisplayEnumerationIndex2(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
+        [in] PRPC_UNICODE_STRING Prefix,
+        [out] unsigned long *Index);
+
+    /* Function 50 */
+    NTSTATUS
+    __stdcall
+    SamrCreateUser2InDomain(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] PRPC_UNICODE_STRING Name,
+        [in] unsigned long AccountType,
+        [in] unsigned long DesiredAccess,
+        [out] SAMPR_HANDLE *UserHandle,
+        [out] unsigned long *GrantedAccess,
+        [out] unsigned long *RelativeId);
+
+    /* Function 51 */
+    NTSTATUS
+    __stdcall
+    SamrQueryDisplayInformation3(
+        [in] SAMPR_HANDLE DomainHandle,
+        [in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
+        [in] unsigned long Index,
+        [in] unsigned long EntryCount,
+        [in] unsigned long PreferredMaximumLength,
+        [out] unsigned long *TotalAvailable,
+        [out] unsigned long *TotalReturned,
+        [out, switch_is(DisplayInformationClass)] PSAMPR_DISPLAY_INFO_BUFFER Buffer);
+
+    /* Function 52 */
+    NTSTATUS
+    __stdcall
+    SamrAddMultipleMembersToAlias(
+        [in] SAMPR_HANDLE AliasHandle,
+        [in] PSAMPR_PSID_ARRAY MembersBuffer);
+
+    /* Function 53 */
+    NTSTATUS
+    __stdcall
+    SamrRemoveMultipleMembersFromAlias(
+        [in] SAMPR_HANDLE AliasHandle,
+        [in] PSAMPR_PSID_ARRAY MembersBuffer);
+
+    /* Function 54 */
+    NTSTATUS
+    __stdcall
+    SamrOemChangePasswordUser2(
+        [in] handle_t BindingHandle,
+        [in,unique] PRPC_STRING ServerName,
+        [in] PRPC_STRING UserName,
+        [in,unique] PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
+        [in,unique] PENCRYPTED_LM_OWF_PASSWORD OldLmOwfPasswordEncryptedWithNewLm);
+
+    /* Function 55 */
+    NTSTATUS
+    __stdcall
+    SamrUnicodeChangePasswordUser2(
+        [in] handle_t BindingHandle,
+        [in,unique] PRPC_UNICODE_STRING ServerName,
+        [in] PRPC_UNICODE_STRING UserName,
+        [in,unique] PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldNt,
+        [in,unique] PENCRYPTED_NT_OWF_PASSWORD OldNtOwfPasswordEncryptedWithNewNt,
+        [in] unsigned char LmPresent,
+        [in,unique] PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
+        [in,unique] PENCRYPTED_LM_OWF_PASSWORD OldLmOwfPasswordEncryptedWithNewNt);
+
+    /* Function 56 */
+    NTSTATUS
+    __stdcall
+    SamrGetDomainPasswordInformation(
+        [in] handle_t BindingHandle,
+        [in,unique] PRPC_UNICODE_STRING Unused,
+        [out] PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation);
+
+    /* Function 57 */
+    NTSTATUS
+    __stdcall
+    SamrConnect2(
+        [in,unique,string] PSAMPR_SERVER_NAME ServerName,
+        [out] SAMPR_HANDLE *ServerHandle,
+        [in] ACCESS_MASK DesiredAccess);
+
+    /* Function 58 */
+    NTSTATUS
+    __stdcall
+    SamrSetInformationUser2(
+        [in] SAMPR_HANDLE UserHandle,
+        [in] USER_INFORMATION_CLASS UserInformationClass,
+        [in, switch_is(UserInformationClass)] PSAMPR_USER_INFO_BUFFER Buffer);
+
+    /* Function 59 */
+    NTSTATUS
+    __stdcall
+    SamrSetBootKeyInformation(
+        [in] handle_t BindingHandle); /* FIXME */
+
+    /* Function 60 */
+    NTSTATUS
+    __stdcall
+    SamrGetBootKeyInformation(
+        [in] handle_t BindingHandle); /* FIXME */
+
+    /* Function 61 */
+    NTSTATUS
+    __stdcall
+    SamrConnect3(
+        [in] handle_t BindingHandle); /* FIXME */
+
+    /* Function 62 */
+    NTSTATUS
+    __stdcall
+    SamrConnect4(
+        [in,unique,string] PSAMPR_SERVER_NAME ServerName,
+        [out] SAMPR_HANDLE *ServerHandle,
+        [in] unsigned long ClientRevision,
+        [in] ACCESS_MASK DesiredAccess);
+
+    /* Function 63 */
+    NTSTATUS
+    __stdcall
+    SamrUnicodeChangePasswordUser3(
+        [in] handle_t BindingHandle); /* FIXME */
+
+    /* Function 64 */
+    NTSTATUS
+    __stdcall
+    SamrConnect5(
+        [in,unique,string] PSAMPR_SERVER_NAME ServerName,
+        [in] ACCESS_MASK DesiredAccess,
+        [in] unsigned long InVersion,
+        [in,switch_is(InVersion)] SAMPR_REVISION_INFO *InRevisionInfo,
+        [out] unsigned long *OutVersion,
+        [out,switch_is(*OutVersion)] SAMPR_REVISION_INFO *OutRevisionInfo,
+        [out] SAMPR_HANDLE *ServerHandle);
+
+    /* Function 65 */
+    NTSTATUS
+    __stdcall
+    SamrRidToSid(
+        [in] SAMPR_HANDLE ObjectHandle,
+        [in] unsigned long Rid,
+        [out] PRPC_SID *Sid);
+
+    /* Function 66 */
+    NTSTATUS
+    __stdcall
+    SamrSetDSRMPassword(
+        [in] handle_t BindingHandle,
+        [in,unique] PRPC_UNICODE_STRING Unused,
+        [in] unsigned long UserId,
+        [in,unique] PENCRYPTED_NT_OWF_PASSWORD EncryptedNtOwfPassword);
+
+    /* Function 67 */
+    NTSTATUS
+    __stdcall
+    SamrValidatePassword(
+        [in] handle_t Handle,
+        [in] PASSWORD_POLICY_VALIDATION_TYPE ValidationType,
+        [in,switch_is(ValidationType)] PSAM_VALIDATE_INPUT_ARG InputArg,
+        [out,switch_is(ValidationType)] PSAM_VALIDATE_OUTPUT_ARG *OutputArg);
+}

Propchange: trunk/reactos/include/reactos/idl/sam.idl
------------------------------------------------------------------------------
    svn:eol-style = native




More information about the Ros-diffs mailing list