NT4/private/newsam/samrpc.idl
2020-09-30 17:12:29 +02:00

1447 lines
49 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*++
Copyright (c) 1991 Microsoft Corporation
Module Name:
samrpc.idl
Abstract:
Security Account Manager RPC Interface Definition File
This file contains the RPC Interface Definition Language file for
remotable SAM functions.
These functions are internal versions of API and are NOT visible to
SAM clients. SAM clients call the SAM API defined in file ntsam.h.
Those routines, in turn, call corresponding RPC routines defined by
this file.
Author:
Jim Kelly (JimK) May 23, 1991
Environment:
User Mode
Revision History:
--*/
[
uuid(12345778-1234-ABCD-EF00-0123456789AC), //FIX,FIX - Need real uuid
version(1.0),
#ifdef __midl
ms_union,
#endif // __midl
pointer_default(unique)
]
interface samr
{
//
// Import a dummy interface containing #includes for public .h files. This
// trick is necessary so that midl will only generate marshalling routines
// for subtypes that are relevant to the parameters specified on the RPC
// interface. midl also ingores function prototypes contained therein.
//
import "samimp.idl";
/////////////////////////// TEMPORARY //////////////////////////////////////
// //
// I'm tired of fighting MIDL trying to figure out how to import common //
// definitions for the following data structures. SOOO. I'm just going //
// to hard-code them in here for a while. //
// //
/////////////////////////// TEMPORARY //////////////////////////////////////
//
// Unicode strings are counted 16-bit character strings.
// The Length field and MaximumLength fields specify number of bytes,
// (not wide-characters) in the string. So, this definition differs
// a bit from the real unicode string type.
//
// The Length field does not include a null terminating character
// if present.
//
// NOTE: A null termination character (two bytes of zero), if present,
// will not be copied with the RPC. It must be explicitly added
// on the client or server side.
//
//
typedef struct _RPC_UNICODE_STRING {
USHORT Length;
USHORT MaximumLength;
// [size_is(MaximumLength/sizeof(WCHAR)), length_is(Length/sizeof(WCHAR))] PWCH Buffer;
[size_is(MaximumLength/2), length_is(Length/2)] PWCH Buffer;
} RPC_UNICODE_STRING, *PRPC_UNICODE_STRING;
typedef struct _RPC_CYPHER_DATA {
ULONG Length;
ULONG MaximumLength;
[size_is(MaximumLength), length_is(Length)] PCHAR Buffer;
} RPC_CYPHER_DATA, *PRPC_CYPHER_DATA;
//
// ANSI counted string
//
typedef struct _RPC_STRING {
USHORT Length;
USHORT MaximumLength;
[size_is(MaximumLength), length_is(Length)] PCHAR Buffer;
} RPC_STRING, *PRPC_STRING, RPC_ANSI_STRING, *PRPC_ANSI_STRING;
//
// RPC definition of the SID structure. Note the use of the [size_is()]
// qualifier to specify the number of elements in the variable size
// imbedded SubAuthorityCount array at runtime.
//
//
typedef struct _RPC_SID {
UCHAR Revision;
UCHAR SubAuthorityCount;
SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
[size_is(SubAuthorityCount)] ULONG SubAuthority[*];
} RPC_SID, *PRPC_SID, **PPRPC_SID;
////////////////////// END TEMPORARY //////////////////////////////////////
////////////////////// END TEMPORARY //////////////////////////////////////
////////////////////// END TEMPORARY //////////////////////////////////////
//
// SAM Generic Handle used to bind from client to server.
// This handle is used for both LOCAL and REMOTE services.
//
typedef [handle] LPWSTR PSAMPR_SERVER_NAME;
//
// SAM RPC Context Handle (Internal definition of SAM_HANDLE)
//
typedef [context_handle] PVOID SAMPR_HANDLE;
//
// Sam enumeration return buffer format
//
typedef struct _SAMPR_RID_ENUMERATION {
ULONG RelativeId;
RPC_UNICODE_STRING Name;
} SAMPR_RID_ENUMERATION, *PSAMPR_RID_ENUMERATION;
typedef struct _SAMPR_SID_ENUMERATION {
PSID Sid;
RPC_UNICODE_STRING Name;
} SAMPR_SID_ENUMERATION, *PSAMPR_SID_ENUMERATION;
typedef struct _SAMPR_ENUMERATION_BUFFER {
ULONG EntriesRead;
[size_is(EntriesRead)] PSAMPR_RID_ENUMERATION Buffer;
} SAMPR_ENUMERATION_BUFFER, *PSAMPR_ENUMERATION_BUFFER;
//
// Used for passing and/or returning self-relative security descriptors
//
typedef struct _SAMPR_SR_SECURITY_DESCRIPTOR {
ULONG Length;
[size_is(Length)] PUCHAR SecurityDescriptor;
} SAMPR_SR_SECURITY_DESCRIPTOR, *PSAMPR_SR_SECURITY_DESCRIPTOR;
//
// Sam get groups return buffer format
//
typedef struct _SAMPR_GET_GROUPS_BUFFER {
ULONG MembershipCount;
[size_is(MembershipCount)] PGROUP_MEMBERSHIP Groups;
} SAMPR_GET_GROUPS_BUFFER, *PSAMPR_GET_GROUPS_BUFFER;
//
// Sam get members in group return buffer format
//
typedef struct _SAMPR_GET_MEMBERS_BUFFER {
ULONG MemberCount;
[size_is(MemberCount)] PULONG Members;
[size_is(MemberCount)] PULONG Attributes;
} SAMPR_GET_MEMBERS_BUFFER, *PSAMPR_GET_MEMBERS_BUFFER;
//
// Logon hours points to an array of bytes that varies in length
// depending upon how many units per-week are specified.
//
typedef struct _SAMPR_LOGON_HOURS {
USHORT UnitsPerWeek;
//
// Points to an array of bitmask.
// The bits represent either days, hours or minutes in the week
// depending upon the value of UnitsPerWeek. (Technically, they
// could represent any division of time not finer than minute
// granularity).
// Day granularity is specified by specifying SAM_DAYS_PER_WEEK.
// Hours granularity is specified by specifying SAM_HOURS_PER_WEEK.
// Minute granularity is specified by specifying SAM_MINUTES_PER_WEEK.
// The number of bytes pointed to by this field is
// ((UnitsPerWeek + 7) / 8) and may not exceed
// ((SAM_MINUTES_PER_WEEK+7)/8 == 1260).
//
[size_is(1260), length_is((UnitsPerWeek+7)/8)] PUCHAR LogonHours;
} SAMPR_LOGON_HOURS, *PSAMPR_LOGON_HOURS;
typedef struct _SAMPR_ULONG_ARRAY {
//
// Indicates the number of Elements in the array.
//
ULONG Count;
//
// Normally, the client wrapper wants to set this to NULL
// before calling the stub. This causes the client stub
// to allocate a buffe for the returned information which
// can be passed back to the caller of the wrapper routine.
//
[size_is(Count)] ULONG * Element;
} SAMPR_ULONG_ARRAY, *PSAMPR_ULONG_ARRAY;
//
// We must hide the PSID in a structure to avoid too many *'s in a
// field that uses size_is - otherwise MIDL has a fit.
//
typedef struct _SAMPR_SID_INFORMATION {
PRPC_SID SidPointer;
} SAMPR_SID_INFORMATION, *PSAMPR_SID_INFORMATION;
//
// Define an array of pointers to SIDs
//
typedef struct _SAMPR_PSID_ARRAY {
//
// Indicates the number of Elements in the array.
//
ULONG Count;
//
// Points to the array of sid-pointers
//
[size_is(Count)] PSAMPR_SID_INFORMATION Sids;
} SAMPR_PSID_ARRAY, *PSAMPR_PSID_ARRAY;
//
// The following structure is used to receive (as an out parameter) a list
// of relative IDs (or other ULONGS). This structure is necessary because
// RPC needs the count to be in the same structure as the returned ULONGs.
// A wrapper routine is expected to initialize this structure on its stack
// and pass its address.
//
// WARNING: before passing this structure to an RPC stub, the UlongArrayBuffer
// field must be set to NULL. This causes the stub to allocate
// the return buffer.
//
//typedef struct _SAMPR_RETURNED_ULONG_ARRAY {
// ULONG Count;
// [size_is(Count)] ULONG * UlongArrayBuffer; // Set to NULL before call !!!
//} SAMPR_RETURNED_ULONG_ARRAY, *PSAMPR_RETURNED_ULONG_ARRAY;
typedef struct _SAMPR_UNICODE_STRING_ARRAY {
//
// Indicates the number of Elements in the array.
//
ULONG Count;
//
// Normally, the client wrapper wants to set this to NULL
// before calling the stub. This causes the client stub
// to allocate a buffer for the returned information which
// can be passed back to the caller of the wrapper routine.
//
[size_is(Count)] RPC_UNICODE_STRING * Element;
} SAMPR_UNICODE_STRING_ARRAY, *PSAMPR_UNICODE_STRING_ARRAY;
//
// The allocation scheme used on the client side and server side is
// different when a list of unicode string names is to be returned.
// The server wants to be able to return multiple allocation
// blocks and the client only wants to have to worry about freeing a single
// allocation block.
//
// To accomplish this, a notion of unicode name arrays are introduced.
// one representing an array passed by a client and another representing
// an array returned by a server. Then, a client .acf file is used to get
// these to look correct when generating client stubs and a server .acf
// file is used to get them to be correct for the server when generating
// the server stubs.
//
typedef RPC_UNICODE_STRING SAMPR_RETURNED_STRING;
typedef RPC_UNICODE_STRING *PSAMPR_RETURNED_STRING;
typedef STRING SAMPR_RETURNED_NORMAL_STRING;
typedef STRING *PSAMPR_RETURNED_NORMAL_STRING;
//
// The following structure is used to receive (as an out parameter) a list
// of unicode string names. This structure is necessary because
// RPC needs the count to be in the same structure as the returned names.
// A wrapper routine is expected to initialize this structure on its stack
// and pass its address.
//
// WARNING: before passing this structure to an RPC stub, the UnameArrayBuffer
// field must be set to NULL. This causes the stub to allocate
// the return buffer.
//
typedef struct _SAMPR_RETURNED_USTRING_ARRAY {
ULONG Count;
[size_is(Count)] PSAMPR_RETURNED_STRING Element; // Set to NULL before call !!!
} SAMPR_RETURNED_USTRING_ARRAY, *PSAMPR_RETURNED_USTRING_ARRAY;
///////////////////////////////////////////////////////////////////////////////
// //
// Server Object Related RPC Definitions //
// //
///////////////////////////////////////////////////////////////////////////////
// (None)
///////////////////////////////////////////////////////////////////////////////
// //
// Domain Object Related RPC Definitions //
// //
///////////////////////////////////////////////////////////////////////////////
#pragma pack(4)
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;
ULONG DomainServerState;
ULONG DomainServerRole;
BOOLEAN UasCompatibilityRequired;
ULONG UserCount;
ULONG GroupCount;
ULONG AliasCount;
} SAMPR_DOMAIN_GENERAL_INFORMATION, *PSAMPR_DOMAIN_GENERAL_INFORMATION;
#pragma pack()
#pragma pack(4)
typedef struct _SAMPR_DOMAIN_GENERAL_INFORMATION2 {
SAMPR_DOMAIN_GENERAL_INFORMATION I1;
//
// New fields added for this structure (NT1.0A).
//
#if defined(MIDL_PASS)
OLD_LARGE_INTEGER LockoutDuration; //Must be a Delta time
OLD_LARGE_INTEGER LockoutObservationWindow; //Must be a Delta time
#else
LARGE_INTEGER LockoutDuration; //Must be a Delta time
LARGE_INTEGER LockoutObservationWindow; //Must be a Delta time
#endif
USHORT LockoutThreshold;
} SAMPR_DOMAIN_GENERAL_INFORMATION2, *PSAMPR_DOMAIN_GENERAL_INFORMATION2;
#pragma pack()
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 {
#if defined(MIDL_PASS)
OLD_LARGE_INTEGER LockoutDuration; //Must be a Delta time
OLD_LARGE_INTEGER LockoutObservationWindow; //Must be a Delta time
#else
LARGE_INTEGER LockoutDuration; //Must be a Delta time
LARGE_INTEGER LockoutObservationWindow; //Must be a Delta time
#endif
USHORT LockoutThreshold; //Zero means no lockout
} SAMPR_DOMAIN_LOCKOUT_INFORMATION, *PSAMPR_DOMAIN_LOCKOUT_INFORMATION;
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;
///////////////////////////////////////////////////////////////////////////////
// //
// Group Object Related Definitions //
// //
///////////////////////////////////////////////////////////////////////////////
typedef struct _SAMPR_GROUP_GENERAL_INFORMATION {
RPC_UNICODE_STRING Name;
ULONG Attributes;
ULONG 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 [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;
} SAMPR_GROUP_INFO_BUFFER, *PSAMPR_GROUP_INFO_BUFFER;
///////////////////////////////////////////////////////////////////////////////
// //
// Alias Object Related Definitions //
// //
///////////////////////////////////////////////////////////////////////////////
typedef struct _SAMPR_ALIAS_GENERAL_INFORMATION {
RPC_UNICODE_STRING Name;
ULONG 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 [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;
///////////////////////////////////////////////////////////////////////////////
// //
// User Object Related Definitions //
// //
///////////////////////////////////////////////////////////////////////////////
#pragma pack(4)
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_UNICODE_STRING LmOwfPassword;
RPC_UNICODE_STRING NtOwfPassword;
RPC_UNICODE_STRING PrivateData;
SAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor;
ULONG UserId;
ULONG PrimaryGroupId;
ULONG UserAccountControl;
ULONG WhichFields;
SAMPR_LOGON_HOURS LogonHours;
USHORT BadPasswordCount;
USHORT LogonCount;
USHORT CountryCode;
USHORT CodePage;
BOOLEAN LmPasswordPresent;
BOOLEAN NtPasswordPresent;
BOOLEAN PasswordExpired;
BOOLEAN PrivateDataSensitive;
} SAMPR_USER_ALL_INFORMATION, *PSAMPR_USER_ALL_INFORMATION;
#pragma pack()
#pragma pack(4)
typedef struct _SAMPR_USER_INTERNAL3_INFORMATION {
SAMPR_USER_ALL_INFORMATION I1;
#if defined(MIDL_PASS)
OLD_LARGE_INTEGER LastBadPasswordTime;
#else
LARGE_INTEGER LastBadPasswordTime;
#endif
} SAMPR_USER_INTERNAL3_INFORMATION, *PSAMPR_USER_INTERNAL3_INFORMATION;
#pragma pack()
typedef struct _SAMPR_USER_GENERAL_INFORMATION {
RPC_UNICODE_STRING UserName;
RPC_UNICODE_STRING FullName;
ULONG 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;
USHORT CountryCode;
USHORT 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;
#pragma pack(4)
typedef struct _SAMPR_USER_LOGON_INFORMATION {
RPC_UNICODE_STRING UserName;
RPC_UNICODE_STRING FullName;
ULONG UserId;
ULONG 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;
USHORT BadPasswordCount;
USHORT LogonCount;
ULONG UserAccountControl;
} SAMPR_USER_LOGON_INFORMATION, *PSAMPR_USER_LOGON_INFORMATION;
#pragma pack()
#pragma pack(4)
typedef struct _SAMPR_USER_ACCOUNT_INFORMATION {
RPC_UNICODE_STRING UserName;
RPC_UNICODE_STRING FullName;
ULONG UserId;
ULONG 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;
USHORT BadPasswordCount;
USHORT LogonCount;
OLD_LARGE_INTEGER PasswordLastSet;
OLD_LARGE_INTEGER AccountExpires;
ULONG UserAccountControl;
} SAMPR_USER_ACCOUNT_INFORMATION, *PSAMPR_USER_ACCOUNT_INFORMATION;
#pragma pack()
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;
BOOLEAN NtPasswordPresent;
BOOLEAN LmPasswordPresent;
BOOLEAN 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_INTERNAL5_INFORMATION {
SAMPR_ENCRYPTED_USER_PASSWORD UserPassword;
BOOLEAN PasswordExpired;
} SAMPR_USER_INTERNAL5_INFORMATION, *PSAMPR_USER_INTERNAL5_INFORMATION;
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(UserInternal2Information)] USER_INTERNAL2_INFORMATION Internal2;
[case(UserParametersInformation)] SAMPR_USER_PARAMETERS_INFORMATION Parameters;
[case(UserAllInformation)] SAMPR_USER_ALL_INFORMATION All;
[case(UserInternal3Information)] SAMPR_USER_INTERNAL3_INFORMATION Internal3;
[case(UserInternal4Information)] SAMPR_USER_INTERNAL4_INFORMATION Internal4;
[case(UserInternal5Information)] SAMPR_USER_INTERNAL5_INFORMATION Internal5;
} SAMPR_USER_INFO_BUFFER, *PSAMPR_USER_INFO_BUFFER;
///////////////////////////////////////////////////////////////////////////////
// //
// Domain display information Related Definitions //
// //
///////////////////////////////////////////////////////////////////////////////
typedef struct _SAMPR_DOMAIN_DISPLAY_USER {
ULONG Index;
ULONG Rid;
ULONG AccountControl;
SAMPR_RETURNED_STRING LogonName;
SAMPR_RETURNED_STRING AdminComment;
SAMPR_RETURNED_STRING FullName;
} SAMPR_DOMAIN_DISPLAY_USER, *PSAMPR_DOMAIN_DISPLAY_USER;
typedef struct _SAMPR_DOMAIN_DISPLAY_MACHINE {
ULONG Index;
ULONG Rid;
ULONG AccountControl;
SAMPR_RETURNED_STRING Machine;
SAMPR_RETURNED_STRING Comment;
} SAMPR_DOMAIN_DISPLAY_MACHINE, *PSAMPR_DOMAIN_DISPLAY_MACHINE;
typedef struct _SAMPR_DOMAIN_DISPLAY_GROUP { // Added for NT1.0A
ULONG Index;
ULONG Rid;
ULONG Attributes;
SAMPR_RETURNED_STRING Group;
SAMPR_RETURNED_STRING Comment;
} SAMPR_DOMAIN_DISPLAY_GROUP, *PSAMPR_DOMAIN_DISPLAY_GROUP;
typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_USER { // Added for NT1.0A
ULONG Index;
SAMPR_RETURNED_NORMAL_STRING OemUser;
} SAMPR_DOMAIN_DISPLAY_OEM_USER, *PSAMPR_DOMAIN_DISPLAY_OEM_USER;
typedef struct _SAMPR_DOMAIN_DISPLAY_OEM_GROUP { // Added for NT1.0A
ULONG Index;
SAMPR_RETURNED_NORMAL_STRING OemGroup;
} SAMPR_DOMAIN_DISPLAY_OEM_GROUP, *PSAMPR_DOMAIN_DISPLAY_OEM_GROUP;
typedef struct _SAMPR_DOMAIN_DISPLAY_USER_BUFFER {
ULONG 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 {
ULONG 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 { // Added for NT1.0A
ULONG 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 { // Added for NT1.0A
ULONG 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 { // Added for NT1.0A
ULONG 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;
///////////////////////////////////////////////////////////////////////////////
// //
// APIs Exported By SAM //
// //
// Note that MIDL will prefix each of these routine names with the //
// interface name. So, we will end up with names like Samr_Connect(). //
// //
///////////////////////////////////////////////////////////////////////////////
NTSTATUS
SamrConnect(
[in,unique] PSAMPR_SERVER_NAME ServerName,
[out] SAMPR_HANDLE * ServerHandle,
[in] ACCESS_MASK DesiredAccess
);
NTSTATUS
SamrCloseHandle(
[in,out] SAMPR_HANDLE * SamHandle
);
NTSTATUS
SamrSetSecurityObject(
[in] SAMPR_HANDLE ObjectHandle,
[in] SECURITY_INFORMATION SecurityInformation,
[in] PSAMPR_SR_SECURITY_DESCRIPTOR SecurityDescriptor
);
NTSTATUS
SamrQuerySecurityObject(
[in] SAMPR_HANDLE ObjectHandle,
[in] SECURITY_INFORMATION SecurityInformation,
[out] PSAMPR_SR_SECURITY_DESCRIPTOR *SecurityDescriptor
);
//
// Server related API
//
NTSTATUS
SamrShutdownSamServer(
[in] SAMPR_HANDLE ServerHandle
);
NTSTATUS
SamrLookupDomainInSamServer(
[in] SAMPR_HANDLE ServerHandle,
[in] PRPC_UNICODE_STRING Name,
[out] PRPC_SID * DomainId
);
NTSTATUS
SamrEnumerateDomainsInSamServer(
[in] SAMPR_HANDLE ServerHandle,
[in,out] PSAM_ENUMERATE_HANDLE EnumerationContext,
[out] PSAMPR_ENUMERATION_BUFFER *Buffer,
[in] ULONG PreferedMaximumLength,
[out] PULONG CountReturned
);
//
// Domain related API
//
NTSTATUS
SamrOpenDomain(
[in] SAMPR_HANDLE ServerHandle,
[in] ACCESS_MASK DesiredAccess,
[in] PRPC_SID DomainId,
[out] SAMPR_HANDLE * DomainHandle
);
//
// Don't call the following api with an InfoClass level beyond
// DomainUasInformation. This is the highest info level supported
// in NT1.0, and RPC didn't raise an exception when an invalid
// info level was passed, so the server side stub tries to unmarshal
// the [out] parameter (which isn't there) and can access violate.
//
// CALL SamrQueryInformationDomain2() instead (see end of this file)
//
NTSTATUS
SamrQueryInformationDomain(
[in] SAMPR_HANDLE DomainHandle,
[in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
[out, switch_is(DomainInformationClass)]
PSAMPR_DOMAIN_INFO_BUFFER *Buffer
);
NTSTATUS
SamrSetInformationDomain(
[in] SAMPR_HANDLE DomainHandle,
[in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
[in, switch_is(DomainInformationClass)]
PSAMPR_DOMAIN_INFO_BUFFER DomainInformation
);
NTSTATUS
SamrCreateGroupInDomain(
[in] SAMPR_HANDLE DomainHandle,
[in] PRPC_UNICODE_STRING Name,
[in] ACCESS_MASK DesiredAccess,
[out] SAMPR_HANDLE * GroupHandle,
[out] PULONG RelativeId
);
NTSTATUS
SamrEnumerateGroupsInDomain(
[in] SAMPR_HANDLE DomainHandle,
[in,out] PSAM_ENUMERATE_HANDLE EnumerationContext,
[out] PSAMPR_ENUMERATION_BUFFER *Buffer,
[in] ULONG PreferedMaximumLength,
[out] PULONG CountReturned
);
NTSTATUS
SamrCreateUserInDomain(
[in] SAMPR_HANDLE DomainHandle,
[in] PRPC_UNICODE_STRING Name,
[in] ACCESS_MASK DesiredAccess,
[out] SAMPR_HANDLE * UserHandle,
[out] PULONG RelativeId
);
NTSTATUS
SamrEnumerateUsersInDomain(
[in] SAMPR_HANDLE DomainHandle,
[in,out] PSAM_ENUMERATE_HANDLE EnumerationContext,
[in] ULONG UserAccountControl,
[out] PSAMPR_ENUMERATION_BUFFER *Buffer,
[in] ULONG PreferedMaximumLength,
[out] PULONG CountReturned
);
NTSTATUS
SamrCreateAliasInDomain(
[in] SAMPR_HANDLE DomainHandle,
[in] PRPC_UNICODE_STRING AccountName,
[in] ACCESS_MASK DesiredAccess,
[out] SAMPR_HANDLE * AliasHandle,
[out] PULONG RelativeId
);
NTSTATUS
SamrEnumerateAliasesInDomain(
[in] SAMPR_HANDLE DomainHandle,
[in,out] PSAM_ENUMERATE_HANDLE EnumerationContext,
[out] PSAMPR_ENUMERATION_BUFFER *Buffer,
[in] ULONG PreferedMaximumLength,
[out] PULONG CountReturned
);
NTSTATUS
SamrGetAliasMembership(
[in] SAMPR_HANDLE DomainHandle,
[in] PSAMPR_PSID_ARRAY SidArray,
[out] PSAMPR_ULONG_ARRAY Membership
);
//
// The format of parameters in LookupNamesInDomain() differs between
// client and server side. This is accomplished using multiple .acf files.
// Please see samclient.acf and samsrvr.acf for further descriptions of
// parameter formats.
//
NTSTATUS
SamrLookupNamesInDomain(
[in] SAMPR_HANDLE DomainHandle,
[in] ULONG Count,
//
// The following count must match SAM_MAXIMUM_LOOKUP_COUNT,
// defined in ntsam.h
//
[in,size_is(1000), length_is(Count)]
RPC_UNICODE_STRING Names[*],
[out] PSAMPR_ULONG_ARRAY RelativeIds,
[out] PSAMPR_ULONG_ARRAY Use
);
//
//
// The format of parameters in LookupIdsInDomain() differs between
// client and server side. This is accomplished using multiple .acf files.
// Please see samclient.acf and samsrvr.acf for further descriptions of
// parameter formats.
//
NTSTATUS
SamrLookupIdsInDomain(
[in] SAMPR_HANDLE DomainHandle,
[in] ULONG Count,
//
// The following count must match SAM_MAXIMUM_LOOKUP_COUNT,
// defined in ntsam.h
//
[in,size_is(1000), length_is(Count)]
PULONG RelativeIds,
[out] PSAMPR_RETURNED_USTRING_ARRAY Names,
[out] PSAMPR_ULONG_ARRAY Use
);
//
// Group related API
//
NTSTATUS
SamrOpenGroup(
[in] SAMPR_HANDLE DomainHandle,
[in] ACCESS_MASK DesiredAccess,
[in] ULONG GroupId,
[out] SAMPR_HANDLE * GroupHandle
);
NTSTATUS
SamrQueryInformationGroup(
[in] SAMPR_HANDLE GroupHandle,
[in] GROUP_INFORMATION_CLASS GroupInformationClass,
[out, switch_is(GroupInformationClass)]
PSAMPR_GROUP_INFO_BUFFER *Buffer
);
NTSTATUS
SamrSetInformationGroup(
[in] SAMPR_HANDLE GroupHandle,
[in] GROUP_INFORMATION_CLASS GroupInformationClass,
[in, switch_is(GroupInformationClass)]
PSAMPR_GROUP_INFO_BUFFER Buffer
);
NTSTATUS
SamrAddMemberToGroup(
[in] SAMPR_HANDLE GroupHandle,
[in] ULONG MemberId,
[in] ULONG Attributes
);
NTSTATUS
SamrDeleteGroup(
[in,out] SAMPR_HANDLE * GroupHandle
);
NTSTATUS
SamrRemoveMemberFromGroup(
[in] SAMPR_HANDLE GroupHandle,
[in] ULONG MemberId
);
NTSTATUS
SamrGetMembersInGroup(
[in] SAMPR_HANDLE GroupHandle,
[out] PSAMPR_GET_MEMBERS_BUFFER *Members
);
NTSTATUS
SamrSetMemberAttributesOfGroup(
[in] SAMPR_HANDLE GroupHandle,
[in] ULONG MemberId,
[in] ULONG Attributes
);
//
// Alias related API
//
NTSTATUS
SamrOpenAlias(
[in] SAMPR_HANDLE DomainHandle,
[in] ACCESS_MASK DesiredAccess,
[in] ULONG AliasId,
[out] SAMPR_HANDLE * AliasHandle
);
NTSTATUS
SamrQueryInformationAlias(
[in] SAMPR_HANDLE AliasHandle,
[in] ALIAS_INFORMATION_CLASS AliasInformationClass,
[out, switch_is(AliasInformationClass)]
PSAMPR_ALIAS_INFO_BUFFER *Buffer
);
NTSTATUS
SamrSetInformationAlias(
[in] SAMPR_HANDLE AliasHandle,
[in] ALIAS_INFORMATION_CLASS AliasInformationClass,
[in, switch_is(AliasInformationClass)]
PSAMPR_ALIAS_INFO_BUFFER Buffer
);
NTSTATUS
SamrDeleteAlias(
[in, out] SAMPR_HANDLE * AliasHandle
);
NTSTATUS
SamrAddMemberToAlias(
[in] SAMPR_HANDLE AliasHandle,
[in] PRPC_SID MemberId
);
NTSTATUS
SamrRemoveMemberFromAlias(
[in] SAMPR_HANDLE AliasHandle,
[in] PRPC_SID MemberId
);
NTSTATUS
SamrGetMembersInAlias(
[in] SAMPR_HANDLE AliasHandle,
[out] PSAMPR_PSID_ARRAY Members
);
//
// User related API
//
NTSTATUS
SamrOpenUser(
[in] SAMPR_HANDLE DomainHandle,
[in] ACCESS_MASK DesiredAccess,
[in] ULONG UserId,
[out] SAMPR_HANDLE * UserHandle
);
NTSTATUS
SamrDeleteUser(
[in,out] SAMPR_HANDLE * UserHandle
);
//
// Don't call the following api with an InfoClass level beyond
// UserAllInformation. This is the highest info level supported
// in NT1.0, and RPC didn't raise an exception when an invalid
// info level was passed, so the server side stub tries to unmarshal
// the [out] parameter (which isn't there) and can access violate.
//
// CALL SamrQueryInformationUser2() instead (see end of this file)
//
NTSTATUS
SamrQueryInformationUser(
[in] SAMPR_HANDLE UserHandle,
[in] USER_INFORMATION_CLASS UserInformationClass,
[out, switch_is(UserInformationClass)]
PSAMPR_USER_INFO_BUFFER *Buffer
);
NTSTATUS
SamrSetInformationUser(
[in] SAMPR_HANDLE UserHandle,
[in] USER_INFORMATION_CLASS UserInformationClass,
[in, switch_is(UserInformationClass)]
PSAMPR_USER_INFO_BUFFER Buffer
);
NTSTATUS
SamrChangePasswordUser(
[in] SAMPR_HANDLE UserHandle,
[in] BOOLEAN LmPresent,
[in, unique] PENCRYPTED_LM_OWF_PASSWORD LmOldEncryptedWithLmNew,
[in, unique] PENCRYPTED_LM_OWF_PASSWORD LmNewEncryptedWithLmOld,
[in] BOOLEAN NtPresent,
[in, unique] PENCRYPTED_NT_OWF_PASSWORD NtOldEncryptedWithNtNew,
[in, unique] PENCRYPTED_NT_OWF_PASSWORD NtNewEncryptedWithNtOld,
[in] BOOLEAN NtCrossEncryptionPresent,
[in, unique] PENCRYPTED_NT_OWF_PASSWORD NtNewEncryptedWithLmNew,
[in] BOOLEAN LmCrossEncryptionPresent,
[in, unique] PENCRYPTED_LM_OWF_PASSWORD LmNtNewEncryptedWithNtNew
);
NTSTATUS
SamrGetGroupsForUser(
[in] SAMPR_HANDLE UserHandle,
[out] PSAMPR_GET_GROUPS_BUFFER *Groups
);
//
// Don't call the following api with an InfoClass level beyond
// DomainDisplayMachine. This is the highest info level supported
// in NT1.0, and RPC didn't raise an exception when an invalid
// info level was passed, so the server side stub tries to unmarshal
// the [out] parameter (which isn't there) and can access violate.
//
// CALL SamrQueryDisplayInformation2() instead (see end of this file)
//
NTSTATUS
SamrQueryDisplayInformation (
[in] SAMPR_HANDLE DomainHandle,
[in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
[in] ULONG Index,
[in] ULONG EntryCount,
[in] ULONG PreferredMaximumLength,
[out] PULONG TotalAvailable,
[out] PULONG TotalReturned,
[out, switch_is(DisplayInformationClass)]
PSAMPR_DISPLAY_INFO_BUFFER Buffer
);
//
// Don't call the following api with an InfoClass level beyond
// DomainDisplayMachine. This is the highest info level supported
// in NT1.0, and RPC didn't raise an exception when an invalid
// info level was passed, so the server side stub tries to unmarshal
// the [out] parameter (which isn't there) and can access violate.
//
// CALL SamrGetDisplayEnumerationIndex2() instead (see end of this file)
//
NTSTATUS
SamrGetDisplayEnumerationIndex (
[in] SAMPR_HANDLE DomainHandle,
[in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
[in] PRPC_UNICODE_STRING Prefix,
[out] PULONG Index
);
//
// Test APIs.
// These only do anything on special builds.
//
NTSTATUS
SamrTestPrivateFunctionsDomain (
[in] SAMPR_HANDLE DomainHandle
);
NTSTATUS
SamrTestPrivateFunctionsUser (
[in] SAMPR_HANDLE UserHandle
);
//
// The following is only for use by WRAPPERS.C, although there's no
// harm done if an application calls it.
//
NTSTATUS
SamrGetUserDomainPasswordInformation (
[in] SAMPR_HANDLE UserHandle,
[out] PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation
);
//
// API added late, so we want it at the end.
//
NTSTATUS
SamrRemoveMemberFromForeignDomain (
[in] SAMPR_HANDLE DomainHandle,
[in] PRPC_SID MemberSid
);
//
// API added for NT1.0A.
// These must be added at the end of the file to ensure operability
// with down-level systems. That is, the API number of all existing
// API must be kept the same as it was.
//
NTSTATUS
SamrQueryInformationDomain2( // Added for NT1.0A
[in] SAMPR_HANDLE DomainHandle,
[in] DOMAIN_INFORMATION_CLASS DomainInformationClass,
[out, switch_is(DomainInformationClass)]
PSAMPR_DOMAIN_INFO_BUFFER *Buffer
);
NTSTATUS
SamrQueryInformationUser2(
[in] SAMPR_HANDLE UserHandle,
[in] USER_INFORMATION_CLASS UserInformationClass,
[out, switch_is(UserInformationClass)]
PSAMPR_USER_INFO_BUFFER *Buffer
);
NTSTATUS
SamrQueryDisplayInformation2 (
[in] SAMPR_HANDLE DomainHandle,
[in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
[in] ULONG Index,
[in] ULONG EntryCount,
[in] ULONG PreferredMaximumLength,
[out] PULONG TotalAvailable,
[out] PULONG TotalReturned,
[out, switch_is(DisplayInformationClass)]
PSAMPR_DISPLAY_INFO_BUFFER Buffer
);
NTSTATUS
SamrGetDisplayEnumerationIndex2 (
[in] SAMPR_HANDLE DomainHandle,
[in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
[in] PRPC_UNICODE_STRING Prefix,
[out] PULONG Index
);
NTSTATUS
SamrCreateUser2InDomain(
[in] SAMPR_HANDLE DomainHandle,
[in] PRPC_UNICODE_STRING Name,
[in] ULONG AccountType,
[in] ACCESS_MASK DesiredAccess,
[out] SAMPR_HANDLE * UserHandle,
[out] PULONG GrantedAccess,
[out] PULONG RelativeId
);
NTSTATUS
SamrQueryDisplayInformation3 (
[in] SAMPR_HANDLE DomainHandle,
[in] DOMAIN_DISPLAY_INFORMATION DisplayInformationClass,
[in] ULONG Index,
[in] ULONG EntryCount,
[in] ULONG PreferredMaximumLength,
[out] PULONG TotalAvailable,
[out] PULONG TotalReturned,
[out, switch_is(DisplayInformationClass)]
PSAMPR_DISPLAY_INFO_BUFFER Buffer
);
NTSTATUS
SamrAddMultipleMembersToAlias(
[in] SAMPR_HANDLE AliasHandle,
[in] PSAMPR_PSID_ARRAY MembersBuffer
);
NTSTATUS
SamrRemoveMultipleMembersFromAlias(
[in] SAMPR_HANDLE AliasHandle,
[in] PSAMPR_PSID_ARRAY MembersBuffer
);
NTSTATUS
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 OldLmOwfPassswordEncryptedWithNewLm
);
NTSTATUS
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] BOOLEAN LmPresent,
[in,unique] PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
[in,unique] PENCRYPTED_LM_OWF_PASSWORD OldLmOwfPassswordEncryptedWithNewLmOrNt
);
NTSTATUS
SamrGetDomainPasswordInformation (
[in] handle_t BindingHandle,
[in,unique] PRPC_UNICODE_STRING ServerName,
[out] PUSER_DOMAIN_PASSWORD_INFORMATION PasswordInformation
);
NTSTATUS
SamrConnect2(
[in,unique,string] PSAMPR_SERVER_NAME ServerName,
[out] SAMPR_HANDLE * ServerHandle,
[in] ACCESS_MASK DesiredAccess
);
NTSTATUS
SamrSetInformationUser2(
[in] SAMPR_HANDLE UserHandle,
[in] USER_INFORMATION_CLASS UserInformationClass,
[in, switch_is(UserInformationClass)]
PSAMPR_USER_INFO_BUFFER Buffer
);
}