Process Hacker
ntsam.h File Reference
#include <pshpack4.h>
#include <poppack.h>

Go to the source code of this file.

Data Structures

struct  _SAM_RID_ENUMERATION
 
struct  _SAM_SID_ENUMERATION
 
struct  _SAM_BYTE_ARRAY
 
struct  _SAM_BYTE_ARRAY_32K
 
struct  _DOMAIN_GENERAL_INFORMATION
 
struct  _DOMAIN_GENERAL_INFORMATION2
 
struct  _DOMAIN_UAS_INFORMATION
 
struct  _DOMAIN_PASSWORD_INFORMATION
 
struct  _DOMAIN_LOGOFF_INFORMATION
 
struct  _DOMAIN_OEM_INFORMATION
 
struct  _DOMAIN_NAME_INFORMATION
 
struct  _DOMAIN_SERVER_ROLE_INFORMATION
 
struct  _DOMAIN_REPLICATION_INFORMATION
 
struct  _DOMAIN_MODIFIED_INFORMATION
 
struct  _DOMAIN_MODIFIED_INFORMATION2
 
struct  _DOMAIN_STATE_INFORMATION
 
struct  _DOMAIN_LOCKOUT_INFORMATION
 
struct  _DOMAIN_DISPLAY_USER
 
struct  _DOMAIN_DISPLAY_MACHINE
 
struct  _DOMAIN_DISPLAY_GROUP
 
struct  _DOMAIN_DISPLAY_OEM_USER
 
struct  _DOMAIN_DISPLAY_OEM_GROUP
 
struct  _DOMAIN_LOCALIZABLE_ACCOUNTS_ENTRY
 
struct  _DOMAIN_LOCALIZABLE_ACCOUNTS
 
union  _DOMAIN_LOCALIZABLE_INFO_BUFFER
 
struct  _GROUP_MEMBERSHIP
 
struct  _GROUP_GENERAL_INFORMATION
 
struct  _GROUP_NAME_INFORMATION
 
struct  _GROUP_ATTRIBUTE_INFORMATION
 
struct  _GROUP_ADM_COMMENT_INFORMATION
 
struct  _ALIAS_GENERAL_INFORMATION
 
struct  _ALIAS_NAME_INFORMATION
 
struct  _ALIAS_ADM_COMMENT_INFORMATION
 
struct  _ALIAS_EXTENDED_INFORMATION
 
struct  _LOGON_HOURS
 
struct  _SR_SECURITY_DESCRIPTOR
 
struct  _USER_ALL_INFORMATION
 
struct  _USER_GENERAL_INFORMATION
 
struct  _USER_PREFERENCES_INFORMATION
 
struct  _USER_PARAMETERS_INFORMATION
 
struct  _USER_LOGON_INFORMATION
 
struct  _USER_ACCOUNT_INFORMATION
 
struct  _USER_ACCOUNT_NAME_INFORMATION
 
struct  _USER_FULL_NAME_INFORMATION
 
struct  _USER_NAME_INFORMATION
 
struct  _USER_PRIMARY_GROUP_INFORMATION
 
struct  _USER_HOME_INFORMATION
 
struct  _USER_SCRIPT_INFORMATION
 
struct  _USER_PROFILE_INFORMATION
 
struct  _USER_ADMIN_COMMENT_INFORMATION
 
struct  _USER_WORKSTATIONS_INFORMATION
 
struct  _USER_SET_PASSWORD_INFORMATION
 
struct  _USER_CONTROL_INFORMATION
 
struct  _USER_EXPIRES_INFORMATION
 
struct  _USER_LOGON_HOURS_INFORMATION
 
struct  _USER_EXTENDED_INFORMATION
 
struct  _USER_LOGON_UI_INFORMATION
 
struct  _USER_PWD_CHANGE_FAILURE_INFORMATION
 
struct  _SAM_GROUP_MEMBER_ID
 
struct  _SAM_ALIAS_MEMBER_ID
 
union  _SAM_DELTA_DATA
 
struct  _SAM_VALIDATE_PASSWORD_HASH
 
struct  _SAM_VALIDATE_PERSISTED_FIELDS
 
struct  _SAM_VALIDATE_STANDARD_OUTPUT_ARG
 
struct  _SAM_VALIDATE_AUTHENTICATION_INPUT_ARG
 
struct  _SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
 
struct  _SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG
 
union  _SAM_VALIDATE_INPUT_ARG
 
union  _SAM_VALIDATE_OUTPUT_ARG
 
struct  _SAM_OPERATION_OBJCHG_INPUT
 
struct  _SAM_OPERATION_OBJCHG_OUTPUT
 
union  _SAM_GENERIC_OPERATION_INPUT
 
union  _SAM_GENERIC_OPERATION_OUTPUT
 

Macros

#define SAM_MAXIMUM_LOOKUP_COUNT   (1000)
 
#define SAM_MAXIMUM_LOOKUP_LENGTH   (32000)
 
#define SAM_MAX_PASSWORD_LENGTH   (256)
 
#define SAM_PASSWORD_ENCRYPTION_SALT_LEN   (16)
 
#define SAM_SERVER_CONNECT   0x0001
 
#define SAM_SERVER_SHUTDOWN   0x0002
 
#define SAM_SERVER_INITIALIZE   0x0004
 
#define SAM_SERVER_CREATE_DOMAIN   0x0008
 
#define SAM_SERVER_ENUMERATE_DOMAINS   0x0010
 
#define SAM_SERVER_LOOKUP_DOMAIN   0x0020
 
#define SAM_SERVER_ALL_ACCESS
 
#define SAM_SERVER_READ
 
#define SAM_SERVER_WRITE
 
#define SAM_SERVER_EXECUTE
 
#define DOMAIN_READ_PASSWORD_PARAMETERS   0x0001
 
#define DOMAIN_WRITE_PASSWORD_PARAMS   0x0002
 
#define DOMAIN_READ_OTHER_PARAMETERS   0x0004
 
#define DOMAIN_WRITE_OTHER_PARAMETERS   0x0008
 
#define DOMAIN_CREATE_USER   0x0010
 
#define DOMAIN_CREATE_GROUP   0x0020
 
#define DOMAIN_CREATE_ALIAS   0x0040
 
#define DOMAIN_GET_ALIAS_MEMBERSHIP   0x0080
 
#define DOMAIN_LIST_ACCOUNTS   0x0100
 
#define DOMAIN_LOOKUP   0x0200
 
#define DOMAIN_ADMINISTER_SERVER   0x0400
 
#define DOMAIN_ALL_ACCESS
 
#define DOMAIN_READ
 
#define DOMAIN_WRITE
 
#define DOMAIN_EXECUTE
 
#define DOMAIN_PROMOTION_INCREMENT   { 0x0, 0x10 }
 
#define DOMAIN_PROMOTION_MASK   { 0x0, 0xfffffff0 }
 
#define _DOMAIN_PASSWORD_INFORMATION_DEFINED
 
#define DOMAIN_PASSWORD_COMPLEX   0x00000001L
 
#define DOMAIN_PASSWORD_NO_ANON_CHANGE   0x00000002L
 
#define DOMAIN_PASSWORD_NO_CLEAR_CHANGE   0x00000004L
 
#define DOMAIN_LOCKOUT_ADMINS   0x00000008L
 
#define DOMAIN_PASSWORD_STORE_CLEARTEXT   0x00000010L
 
#define DOMAIN_REFUSE_PASSWORD_CHANGE   0x00000020L
 
#define DOMAIN_NO_LM_OWF_CHANGE   0x00000040L
 
#define GROUP_READ_INFORMATION   0x0001
 
#define GROUP_WRITE_ACCOUNT   0x0002
 
#define GROUP_ADD_MEMBER   0x0004
 
#define GROUP_REMOVE_MEMBER   0x0008
 
#define GROUP_LIST_MEMBERS   0x0010
 
#define GROUP_ALL_ACCESS
 
#define GROUP_READ
 
#define GROUP_WRITE
 
#define GROUP_EXECUTE
 
#define ALIAS_ADD_MEMBER   0x0001
 
#define ALIAS_REMOVE_MEMBER   0x0002
 
#define ALIAS_LIST_MEMBERS   0x0004
 
#define ALIAS_READ_INFORMATION   0x0008
 
#define ALIAS_WRITE_ACCOUNT   0x0010
 
#define ALIAS_ALL_ACCESS
 
#define ALIAS_READ
 
#define ALIAS_WRITE
 
#define ALIAS_EXECUTE
 
#define ALIAS_ALL_NAME   (0x00000001L)
 
#define ALIAS_ALL_MEMBER_COUNT   (0x00000002L)
 
#define ALIAS_ALL_ADMIN_COMMENT   (0x00000004L)
 
#define ALIAS_ALL_SHELL_ADMIN_OBJECT_PROPERTIES   (0x00000008L)
 
#define GROUP_TYPE_BUILTIN_LOCAL_GROUP   0x00000001
 
#define GROUP_TYPE_ACCOUNT_GROUP   0x00000002
 
#define GROUP_TYPE_RESOURCE_GROUP   0x00000004
 
#define GROUP_TYPE_UNIVERSAL_GROUP   0x00000008
 
#define GROUP_TYPE_APP_BASIC_GROUP   0x00000010
 
#define GROUP_TYPE_APP_QUERY_GROUP   0x00000020
 
#define GROUP_TYPE_SECURITY_ENABLED   0x80000000
 
#define GROUP_TYPE_RESOURCE_BEHAVOIR
 
#define USER_READ_GENERAL   0x0001
 
#define USER_READ_PREFERENCES   0x0002
 
#define USER_WRITE_PREFERENCES   0x0004
 
#define USER_READ_LOGON   0x0008
 
#define USER_READ_ACCOUNT   0x0010
 
#define USER_WRITE_ACCOUNT   0x0020
 
#define USER_CHANGE_PASSWORD   0x0040
 
#define USER_FORCE_PASSWORD_CHANGE   0x0080
 
#define USER_LIST_GROUPS   0x0100
 
#define USER_READ_GROUP_INFORMATION   0x0200
 
#define USER_WRITE_GROUP_INFORMATION   0x0400
 
#define USER_ALL_ACCESS
 
#define USER_READ
 
#define USER_WRITE
 
#define USER_EXECUTE
 
#define USER_ACCOUNT_DISABLED   (0x00000001)
 
#define USER_HOME_DIRECTORY_REQUIRED   (0x00000002)
 
#define USER_PASSWORD_NOT_REQUIRED   (0x00000004)
 
#define USER_TEMP_DUPLICATE_ACCOUNT   (0x00000008)
 
#define USER_NORMAL_ACCOUNT   (0x00000010)
 
#define USER_MNS_LOGON_ACCOUNT   (0x00000020)
 
#define USER_INTERDOMAIN_TRUST_ACCOUNT   (0x00000040)
 
#define USER_WORKSTATION_TRUST_ACCOUNT   (0x00000080)
 
#define USER_SERVER_TRUST_ACCOUNT   (0x00000100)
 
#define USER_DONT_EXPIRE_PASSWORD   (0x00000200)
 
#define USER_ACCOUNT_AUTO_LOCKED   (0x00000400)
 
#define USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED   (0x00000800)
 
#define USER_SMARTCARD_REQUIRED   (0x00001000)
 
#define USER_TRUSTED_FOR_DELEGATION   (0x00002000)
 
#define USER_NOT_DELEGATED   (0x00004000)
 
#define USER_USE_DES_KEY_ONLY   (0x00008000)
 
#define USER_DONT_REQUIRE_PREAUTH   (0x00010000)
 
#define USER_PASSWORD_EXPIRED   (0x00020000)
 
#define USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION   (0x00040000)
 
#define USER_NO_AUTH_DATA_REQUIRED   (0x00080000)
 
#define USER_PARTIAL_SECRETS_ACCOUNT   (0x00100000)
 
#define USER_USE_AES_KEYS   (0x00200000)
 
#define NEXT_FREE_ACCOUNT_CONTROL_BIT   (USER_USE_AES_KEYS << 1)
 
#define USER_MACHINE_ACCOUNT_MASK
 
#define USER_ACCOUNT_TYPE_MASK
 
#define USER_COMPUTED_ACCOUNT_CONTROL_BITS
 
#define SAM_DAYS_PER_WEEK   (7)
 
#define SAM_HOURS_PER_WEEK   (24 * SAM_DAYS_PER_WEEK)
 
#define SAM_MINUTES_PER_WEEK   (60 * SAM_HOURS_PER_WEEK)
 
#define USER_ALL_USERNAME   0x00000001
 
#define USER_ALL_FULLNAME   0x00000002
 
#define USER_ALL_USERID   0x00000004
 
#define USER_ALL_PRIMARYGROUPID   0x00000008
 
#define USER_ALL_ADMINCOMMENT   0x00000010
 
#define USER_ALL_USERCOMMENT   0x00000020
 
#define USER_ALL_HOMEDIRECTORY   0x00000040
 
#define USER_ALL_HOMEDIRECTORYDRIVE   0x00000080
 
#define USER_ALL_SCRIPTPATH   0x00000100
 
#define USER_ALL_PROFILEPATH   0x00000200
 
#define USER_ALL_WORKSTATIONS   0x00000400
 
#define USER_ALL_LASTLOGON   0x00000800
 
#define USER_ALL_LASTLOGOFF   0x00001000
 
#define USER_ALL_LOGONHOURS   0x00002000
 
#define USER_ALL_BADPASSWORDCOUNT   0x00004000
 
#define USER_ALL_LOGONCOUNT   0x00008000
 
#define USER_ALL_PASSWORDCANCHANGE   0x00010000
 
#define USER_ALL_PASSWORDMUSTCHANGE   0x00020000
 
#define USER_ALL_PASSWORDLASTSET   0x00040000
 
#define USER_ALL_ACCOUNTEXPIRES   0x00080000
 
#define USER_ALL_USERACCOUNTCONTROL   0x00100000
 
#define USER_ALL_PARAMETERS   0x00200000
 
#define USER_ALL_COUNTRYCODE   0x00400000
 
#define USER_ALL_CODEPAGE   0x00800000
 
#define USER_ALL_NTPASSWORDPRESENT   0x01000000
 
#define USER_ALL_LMPASSWORDPRESENT   0x02000000
 
#define USER_ALL_PRIVATEDATA   0x04000000
 
#define USER_ALL_PASSWORDEXPIRED   0x08000000
 
#define USER_ALL_SECURITYDESCRIPTOR   0x10000000
 
#define USER_ALL_OWFPASSWORD   0x20000000
 
#define USER_ALL_UNDEFINED_MASK   0xc0000000
 
#define USER_ALL_READ_GENERAL_MASK
 
#define USER_ALL_READ_LOGON_MASK
 
#define USER_ALL_READ_ACCOUNT_MASK
 
#define USER_ALL_READ_PREFERENCES_MASK
 
#define USER_ALL_READ_TRUSTED_MASK
 
#define USER_ALL_READ_CANT_MASK   USER_ALL_UNDEFINED_MASK
 
#define USER_ALL_WRITE_ACCOUNT_MASK
 
#define USER_ALL_WRITE_PREFERENCES_MASK
 
#define USER_ALL_WRITE_FORCE_PASSWORD_CHANGE_MASK
 
#define USER_ALL_WRITE_TRUSTED_MASK
 
#define USER_ALL_WRITE_CANT_MASK
 
#define USER_EXTENDED_FIELD_USER_TILE   (0x00001000L)
 
#define USER_EXTENDED_FIELD_PASSWORD_HINT   (0x00002000L)
 
#define USER_EXTENDED_FIELD_DONT_SHOW_IN_LOGON_UI   (0x00004000L)
 
#define USER_EXTENDED_FIELD_SHELL_ADMIN_OBJECT_PROPERTIES   (0x00008000L)
 
#define SAM_PWD_CHANGE_NO_ERROR   0
 
#define SAM_PWD_CHANGE_PASSWORD_TOO_SHORT   1
 
#define SAM_PWD_CHANGE_PWD_IN_HISTORY   2
 
#define SAM_PWD_CHANGE_USERNAME_IN_PASSWORD   3
 
#define SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD   4
 
#define SAM_PWD_CHANGE_NOT_COMPLEX   5
 
#define SAM_PWD_CHANGE_MACHINE_PASSWORD_NOT_DEFAULT   6
 
#define SAM_PWD_CHANGE_FAILED_BY_FILTER   7
 
#define SAM_PWD_CHANGE_PASSWORD_TOO_LONG   8
 
#define SAM_PWD_CHANGE_FAILURE_REASON_MAX   8
 
#define SAM_USER_ACCOUNT   (0x00000001)
 
#define SAM_GLOBAL_GROUP_ACCOUNT   (0x00000002)
 
#define SAM_LOCAL_GROUP_ACCOUNT   (0x00000004)
 
#define SAM_DELTA_NOTIFY_ROUTINE   "DeltaNotify"
 
#define SAM_SID_COMPATIBILITY_ALL   0
 
#define SAM_SID_COMPATIBILITY_LAX   1
 
#define SAM_SID_COMPATIBILITY_STRICT   2
 
#define SAM_VALIDATE_PASSWORD_LAST_SET   0x00000001
 
#define SAM_VALIDATE_BAD_PASSWORD_TIME   0x00000002
 
#define SAM_VALIDATE_LOCKOUT_TIME   0x00000004
 
#define SAM_VALIDATE_BAD_PASSWORD_COUNT   0x00000008
 
#define SAM_VALIDATE_PASSWORD_HISTORY_LENGTH   0x00000010
 
#define SAM_VALIDATE_PASSWORD_HISTORY   0x00000020
 

Typedefs

typedef PVOID SAM_HANDLE
 
typedef PVOID * PSAM_HANDLE
 
typedef ULONG SAM_ENUMERATE_HANDLE
 
typedef ULONG * PSAM_ENUMERATE_HANDLE
 
typedef struct _SAM_RID_ENUMERATION SAM_RID_ENUMERATION
 
typedef struct
_SAM_RID_ENUMERATION
PSAM_RID_ENUMERATION
 
typedef struct _SAM_SID_ENUMERATION SAM_SID_ENUMERATION
 
typedef struct
_SAM_SID_ENUMERATION
PSAM_SID_ENUMERATION
 
typedef struct _SAM_BYTE_ARRAY SAM_BYTE_ARRAY
 
typedef struct _SAM_BYTE_ARRAYPSAM_BYTE_ARRAY
 
typedef struct _SAM_BYTE_ARRAY_32K SAM_BYTE_ARRAY_32K
 
typedef struct
_SAM_BYTE_ARRAY_32K
PSAM_BYTE_ARRAY_32K
 
typedef SAM_BYTE_ARRAY_32K SAM_SHELL_OBJECT_PROPERTIES
 
typedef SAM_BYTE_ARRAY_32KPSAM_SHELL_OBJECT_PROPERTIES
 
typedef enum
_DOMAIN_INFORMATION_CLASS 
DOMAIN_INFORMATION_CLASS
 
typedef enum
_DOMAIN_SERVER_ENABLE_STATE 
DOMAIN_SERVER_ENABLE_STATE
 
typedef enum
_DOMAIN_SERVER_ENABLE_STATE
PDOMAIN_SERVER_ENABLE_STATE
 
typedef enum _DOMAIN_SERVER_ROLE DOMAIN_SERVER_ROLE
 
typedef enum _DOMAIN_SERVER_ROLEPDOMAIN_SERVER_ROLE
 
typedef struct
_DOMAIN_GENERAL_INFORMATION 
DOMAIN_GENERAL_INFORMATION
 
typedef struct
_DOMAIN_GENERAL_INFORMATION
PDOMAIN_GENERAL_INFORMATION
 
typedef struct
_DOMAIN_GENERAL_INFORMATION2 
DOMAIN_GENERAL_INFORMATION2
 
typedef struct
_DOMAIN_GENERAL_INFORMATION2
PDOMAIN_GENERAL_INFORMATION2
 
typedef struct
_DOMAIN_UAS_INFORMATION 
DOMAIN_UAS_INFORMATION
 
typedef struct
_DOMAIN_PASSWORD_INFORMATION 
DOMAIN_PASSWORD_INFORMATION
 
typedef struct
_DOMAIN_PASSWORD_INFORMATION
PDOMAIN_PASSWORD_INFORMATION
 
typedef enum
_DOMAIN_PASSWORD_CONSTRUCTION 
DOMAIN_PASSWORD_CONSTRUCTION
 
typedef struct
_DOMAIN_LOGOFF_INFORMATION 
DOMAIN_LOGOFF_INFORMATION
 
typedef struct
_DOMAIN_LOGOFF_INFORMATION
PDOMAIN_LOGOFF_INFORMATION
 
typedef struct
_DOMAIN_OEM_INFORMATION 
DOMAIN_OEM_INFORMATION
 
typedef struct
_DOMAIN_OEM_INFORMATION
PDOMAIN_OEM_INFORMATION
 
typedef struct
_DOMAIN_NAME_INFORMATION 
DOMAIN_NAME_INFORMATION
 
typedef struct
_DOMAIN_NAME_INFORMATION
PDOMAIN_NAME_INFORMATION
 
typedef struct
_DOMAIN_SERVER_ROLE_INFORMATION 
DOMAIN_SERVER_ROLE_INFORMATION
 
typedef struct
_DOMAIN_SERVER_ROLE_INFORMATION
PDOMAIN_SERVER_ROLE_INFORMATION
 
typedef struct
_DOMAIN_REPLICATION_INFORMATION 
DOMAIN_REPLICATION_INFORMATION
 
typedef struct
_DOMAIN_REPLICATION_INFORMATION
PDOMAIN_REPLICATION_INFORMATION
 
typedef struct
_DOMAIN_MODIFIED_INFORMATION 
DOMAIN_MODIFIED_INFORMATION
 
typedef struct
_DOMAIN_MODIFIED_INFORMATION
PDOMAIN_MODIFIED_INFORMATION
 
typedef struct
_DOMAIN_MODIFIED_INFORMATION2 
DOMAIN_MODIFIED_INFORMATION2
 
typedef struct
_DOMAIN_MODIFIED_INFORMATION2
PDOMAIN_MODIFIED_INFORMATION2
 
typedef struct
_DOMAIN_STATE_INFORMATION 
DOMAIN_STATE_INFORMATION
 
typedef struct
_DOMAIN_STATE_INFORMATION
PDOMAIN_STATE_INFORMATION
 
typedef struct
_DOMAIN_LOCKOUT_INFORMATION 
DOMAIN_LOCKOUT_INFORMATION
 
typedef struct
_DOMAIN_LOCKOUT_INFORMATION
PDOMAIN_LOCKOUT_INFORMATION
 
typedef enum
_DOMAIN_DISPLAY_INFORMATION 
DOMAIN_DISPLAY_INFORMATION
 
typedef enum
_DOMAIN_DISPLAY_INFORMATION
PDOMAIN_DISPLAY_INFORMATION
 
typedef struct _DOMAIN_DISPLAY_USER DOMAIN_DISPLAY_USER
 
typedef struct
_DOMAIN_DISPLAY_USER
PDOMAIN_DISPLAY_USER
 
typedef struct
_DOMAIN_DISPLAY_MACHINE 
DOMAIN_DISPLAY_MACHINE
 
typedef struct
_DOMAIN_DISPLAY_MACHINE
PDOMAIN_DISPLAY_MACHINE
 
typedef struct
_DOMAIN_DISPLAY_GROUP 
DOMAIN_DISPLAY_GROUP
 
typedef struct
_DOMAIN_DISPLAY_GROUP
PDOMAIN_DISPLAY_GROUP
 
typedef struct
_DOMAIN_DISPLAY_OEM_USER 
DOMAIN_DISPLAY_OEM_USER
 
typedef struct
_DOMAIN_DISPLAY_OEM_USER
PDOMAIN_DISPLAY_OEM_USER
 
typedef struct
_DOMAIN_DISPLAY_OEM_GROUP 
DOMAIN_DISPLAY_OEM_GROUP
 
typedef struct
_DOMAIN_DISPLAY_OEM_GROUP
PDOMAIN_DISPLAY_OEM_GROUP
 
typedef enum
_DOMAIN_LOCALIZABLE_ACCOUNTS_INFORMATION 
DOMAIN_LOCALIZABLE_ACCOUNTS_INFORMATION
 
typedef enum
_DOMAIN_LOCALIZABLE_ACCOUNTS_INFORMATION
PDOMAIN_LOCALIZABLE_ACCOUNTS_INFORMATION
 
typedef struct
_DOMAIN_LOCALIZABLE_ACCOUNTS_ENTRY 
DOMAIN_LOCALIZABLE_ACCOUNT_ENTRY
 
typedef struct
_DOMAIN_LOCALIZABLE_ACCOUNTS_ENTRY
PDOMAIN_LOCALIZABLE_ACCOUNT_ENTRY
 
typedef struct
_DOMAIN_LOCALIZABLE_ACCOUNTS 
DOMAIN_LOCALIZABLE_ACCOUNTS_BASIC
 
typedef struct
_DOMAIN_LOCALIZABLE_ACCOUNTS
PDOMAIN_LOCALIZABLE_ACCOUNTS_BASIC
 
typedef union
_DOMAIN_LOCALIZABLE_INFO_BUFFER 
DOMAIN_LOCALIZABLE_ACCOUNTS_INFO_BUFFER
 
typedef union
_DOMAIN_LOCALIZABLE_INFO_BUFFER
PDOMAIN_LOCALIZABLE_ACCOUNTS_INFO_BUFFER
 
typedef struct _GROUP_MEMBERSHIP GROUP_MEMBERSHIP
 
typedef struct _GROUP_MEMBERSHIPPGROUP_MEMBERSHIP
 
typedef enum
_GROUP_INFORMATION_CLASS 
GROUP_INFORMATION_CLASS
 
typedef struct
_GROUP_GENERAL_INFORMATION 
GROUP_GENERAL_INFORMATION
 
typedef struct
_GROUP_GENERAL_INFORMATION
PGROUP_GENERAL_INFORMATION
 
typedef struct
_GROUP_NAME_INFORMATION 
GROUP_NAME_INFORMATION
 
typedef struct
_GROUP_NAME_INFORMATION
PGROUP_NAME_INFORMATION
 
typedef struct
_GROUP_ATTRIBUTE_INFORMATION 
GROUP_ATTRIBUTE_INFORMATION
 
typedef struct
_GROUP_ATTRIBUTE_INFORMATION
PGROUP_ATTRIBUTE_INFORMATION
 
typedef struct
_GROUP_ADM_COMMENT_INFORMATION 
GROUP_ADM_COMMENT_INFORMATION
 
typedef struct
_GROUP_ADM_COMMENT_INFORMATION
PGROUP_ADM_COMMENT_INFORMATION
 
typedef enum
_ALIAS_INFORMATION_CLASS 
ALIAS_INFORMATION_CLASS
 
typedef struct
_ALIAS_GENERAL_INFORMATION 
ALIAS_GENERAL_INFORMATION
 
typedef struct
_ALIAS_GENERAL_INFORMATION
PALIAS_GENERAL_INFORMATION
 
typedef struct
_ALIAS_NAME_INFORMATION 
ALIAS_NAME_INFORMATION
 
typedef struct
_ALIAS_NAME_INFORMATION
PALIAS_NAME_INFORMATION
 
typedef struct
_ALIAS_ADM_COMMENT_INFORMATION 
ALIAS_ADM_COMMENT_INFORMATION
 
typedef struct
_ALIAS_ADM_COMMENT_INFORMATION
PALIAS_ADM_COMMENT_INFORMATION
 
typedef struct
_ALIAS_EXTENDED_INFORMATION 
ALIAS_EXTENDED_INFORMATION
 
typedef struct
_ALIAS_EXTENDED_INFORMATION
PALIAS_EXTENDED_INFORMATION
 
typedef struct _LOGON_HOURS LOGON_HOURS
 
typedef struct _LOGON_HOURSPLOGON_HOURS
 
typedef struct
_SR_SECURITY_DESCRIPTOR 
SR_SECURITY_DESCRIPTOR
 
typedef struct
_SR_SECURITY_DESCRIPTOR
PSR_SECURITY_DESCRIPTOR
 
typedef enum
_USER_INFORMATION_CLASS 
USER_INFORMATION_CLASS
 
typedef enum
_USER_INFORMATION_CLASS
PUSER_INFORMATION_CLASS
 
typedef struct
_USER_ALL_INFORMATION 
USER_ALL_INFORMATION
 
typedef struct
_USER_ALL_INFORMATION
PUSER_ALL_INFORMATION
 
typedef struct
_USER_GENERAL_INFORMATION 
USER_GENERAL_INFORMATION
 
typedef struct
_USER_GENERAL_INFORMATION
PUSER_GENERAL_INFORMATION
 
typedef struct
_USER_PREFERENCES_INFORMATION 
USER_PREFERENCES_INFORMATION
 
typedef struct
_USER_PREFERENCES_INFORMATION
PUSER_PREFERENCES_INFORMATION
 
typedef struct
_USER_PARAMETERS_INFORMATION 
USER_PARAMETERS_INFORMATION
 
typedef struct
_USER_PARAMETERS_INFORMATION
PUSER_PARAMETERS_INFORMATION
 
typedef struct
_USER_LOGON_INFORMATION 
USER_LOGON_INFORMATION
 
typedef struct
_USER_LOGON_INFORMATION
PUSER_LOGON_INFORMATION
 
typedef struct
_USER_ACCOUNT_INFORMATION 
USER_ACCOUNT_INFORMATION
 
typedef struct
_USER_ACCOUNT_INFORMATION
PUSER_ACCOUNT_INFORMATION
 
typedef struct
_USER_ACCOUNT_NAME_INFORMATION 
USER_ACCOUNT_NAME_INFORMATION
 
typedef struct
_USER_ACCOUNT_NAME_INFORMATION
PUSER_ACCOUNT_NAME_INFORMATION
 
typedef struct
_USER_FULL_NAME_INFORMATION 
USER_FULL_NAME_INFORMATION
 
typedef struct
_USER_FULL_NAME_INFORMATION
PUSER_FULL_NAME_INFORMATION
 
typedef struct
_USER_NAME_INFORMATION 
USER_NAME_INFORMATION
 
typedef struct
_USER_NAME_INFORMATION
PUSER_NAME_INFORMATION
 
typedef struct
_USER_PRIMARY_GROUP_INFORMATION 
USER_PRIMARY_GROUP_INFORMATION
 
typedef struct
_USER_PRIMARY_GROUP_INFORMATION
PUSER_PRIMARY_GROUP_INFORMATION
 
typedef struct
_USER_HOME_INFORMATION 
USER_HOME_INFORMATION
 
typedef struct
_USER_HOME_INFORMATION
PUSER_HOME_INFORMATION
 
typedef struct
_USER_SCRIPT_INFORMATION 
USER_SCRIPT_INFORMATION
 
typedef struct
_USER_SCRIPT_INFORMATION
PUSER_SCRIPT_INFORMATION
 
typedef struct
_USER_PROFILE_INFORMATION 
USER_PROFILE_INFORMATION
 
typedef struct
_USER_PROFILE_INFORMATION
PUSER_PROFILE_INFORMATION
 
typedef struct
_USER_ADMIN_COMMENT_INFORMATION 
USER_ADMIN_COMMENT_INFORMATION
 
typedef struct
_USER_ADMIN_COMMENT_INFORMATION
PUSER_ADMIN_COMMENT_INFORMATION
 
typedef struct
_USER_WORKSTATIONS_INFORMATION 
USER_WORKSTATIONS_INFORMATION
 
typedef struct
_USER_WORKSTATIONS_INFORMATION
PUSER_WORKSTATIONS_INFORMATION
 
typedef struct
_USER_SET_PASSWORD_INFORMATION 
USER_SET_PASSWORD_INFORMATION
 
typedef struct
_USER_SET_PASSWORD_INFORMATION
PUSER_SET_PASSWORD_INFORMATION
 
typedef struct
_USER_CONTROL_INFORMATION 
USER_CONTROL_INFORMATION
 
typedef struct
_USER_CONTROL_INFORMATION
PUSER_CONTROL_INFORMATION
 
typedef struct
_USER_EXPIRES_INFORMATION 
USER_EXPIRES_INFORMATION
 
typedef struct
_USER_EXPIRES_INFORMATION
PUSER_EXPIRES_INFORMATION
 
typedef struct
_USER_LOGON_HOURS_INFORMATION 
USER_LOGON_HOURS_INFORMATION
 
typedef struct
_USER_LOGON_HOURS_INFORMATION
PUSER_LOGON_HOURS_INFORMATION
 
typedef SAM_BYTE_ARRAY_32K SAM_USER_TILE
 
typedef SAM_BYTE_ARRAY_32KPSAM_USER_TILE
 
typedef struct
_USER_EXTENDED_INFORMATION 
USER_EXTENDED_INFORMATION
 
typedef struct
_USER_EXTENDED_INFORMATION
PUSER_EXTENDED_INFORMATION
 
typedef struct
_USER_LOGON_UI_INFORMATION 
USER_LOGON_UI_INFORMATION
 
typedef struct
_USER_LOGON_UI_INFORMATION
PUSER_LOGON_UI_INFORMATION
 
typedef struct
_USER_PWD_CHANGE_FAILURE_INFORMATION 
USER_PWD_CHANGE_FAILURE_INFORMATION
 
typedef struct
_USER_PWD_CHANGE_FAILURE_INFORMATION
PUSER_PWD_CHANGE_FAILURE_INFORMATION
 
typedef enum
_SECURITY_DB_DELTA_TYPE 
SECURITY_DB_DELTA_TYPE
 
typedef enum
_SECURITY_DB_DELTA_TYPE
PSECURITY_DB_DELTA_TYPE
 
typedef enum
_SECURITY_DB_OBJECT_TYPE 
SECURITY_DB_OBJECT_TYPE
 
typedef enum
_SECURITY_DB_OBJECT_TYPE
PSECURITY_DB_OBJECT_TYPE
 
typedef enum _SAM_ACCOUNT_TYPE SAM_ACCOUNT_TYPE
 
typedef enum _SAM_ACCOUNT_TYPEPSAM_ACCOUNT_TYPE
 
typedef struct _SAM_GROUP_MEMBER_ID SAM_GROUP_MEMBER_ID
 
typedef struct
_SAM_GROUP_MEMBER_ID
PSAM_GROUP_MEMBER_ID
 
typedef struct _SAM_ALIAS_MEMBER_ID SAM_ALIAS_MEMBER_ID
 
typedef struct
_SAM_ALIAS_MEMBER_ID
PSAM_ALIAS_MEMBER_ID
 
typedef union _SAM_DELTA_DATA SAM_DELTA_DATA
 
typedef union _SAM_DELTA_DATAPSAM_DELTA_DATA
 
typedef NTSTATUS(NTAPI * PSAM_DELTA_NOTIFICATION_ROUTINE )(_In_ PSID DomainSid, _In_ SECURITY_DB_DELTA_TYPE DeltaType, _In_ SECURITY_DB_OBJECT_TYPE ObjectType, _In_ ULONG ObjectRid, _In_opt_ PUNICODE_STRING ObjectName, _In_ PLARGE_INTEGER ModifiedCount, _In_opt_ PSAM_DELTA_DATA DeltaData)
 
typedef enum
_PASSWORD_POLICY_VALIDATION_TYPE 
PASSWORD_POLICY_VALIDATION_TYPE
 
typedef struct
_SAM_VALIDATE_PASSWORD_HASH 
SAM_VALIDATE_PASSWORD_HASH
 
typedef struct
_SAM_VALIDATE_PASSWORD_HASH
PSAM_VALIDATE_PASSWORD_HASH
 
typedef struct
_SAM_VALIDATE_PERSISTED_FIELDS 
SAM_VALIDATE_PERSISTED_FIELDS
 
typedef struct
_SAM_VALIDATE_PERSISTED_FIELDS
PSAM_VALIDATE_PERSISTED_FIELDS
 
typedef enum
_SAM_VALIDATE_VALIDATION_STATUS 
SAM_VALIDATE_VALIDATION_STATUS
 
typedef enum
_SAM_VALIDATE_VALIDATION_STATUS
PSAM_VALIDATE_VALIDATION_STATUS
 
typedef struct
_SAM_VALIDATE_STANDARD_OUTPUT_ARG 
SAM_VALIDATE_STANDARD_OUTPUT_ARG
 
typedef struct
_SAM_VALIDATE_STANDARD_OUTPUT_ARG
PSAM_VALIDATE_STANDARD_OUTPUT_ARG
 
typedef struct
_SAM_VALIDATE_AUTHENTICATION_INPUT_ARG 
SAM_VALIDATE_AUTHENTICATION_INPUT_ARG
 
typedef struct
_SAM_VALIDATE_AUTHENTICATION_INPUT_ARG
PSAM_VALIDATE_AUTHENTICATION_INPUT_ARG
 
typedef struct
_SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG 
SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
 
typedef struct
_SAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
PSAM_VALIDATE_PASSWORD_CHANGE_INPUT_ARG
 
typedef struct
_SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG 
SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG
 
typedef struct
_SAM_VALIDATE_PASSWORD_RESET_INPUT_ARG
PSAM_VALIDATE_PASSWORD_RESET_INPUT_ARG
 
typedef union
_SAM_VALIDATE_INPUT_ARG 
SAM_VALIDATE_INPUT_ARG
 
typedef union
_SAM_VALIDATE_INPUT_ARG
PSAM_VALIDATE_INPUT_ARG
 
typedef union
_SAM_VALIDATE_OUTPUT_ARG 
SAM_VALIDATE_OUTPUT_ARG
 
typedef union
_SAM_VALIDATE_OUTPUT_ARG
PSAM_VALIDATE_OUTPUT_ARG
 
typedef enum
_SAM_GENERIC_OPERATION_TYPE 
SAM_GENERIC_OPERATION_TYPE
 
typedef enum
_SAM_GENERIC_OPERATION_TYPE
PSAM_GENERIC_OPERATION_TYPE
 
typedef struct
_SAM_OPERATION_OBJCHG_INPUT 
SAM_OPERATION_OBJCHG_INPUT
 
typedef struct
_SAM_OPERATION_OBJCHG_INPUT
PSAM_OPERATION_OBJCHG_INPUT
 
typedef struct
_SAM_OPERATION_OBJCHG_OUTPUT 
SAM_OPERATION_OBJCHG_OUTPUT
 
typedef struct
_SAM_OPERATION_OBJCHG_OUTPUT
PSAM_OPERATION_OBJCHG_OUTPUT
 
typedef union
_SAM_GENERIC_OPERATION_INPUT 
SAM_GENERIC_OPERATION_INPUT
 
typedef union
_SAM_GENERIC_OPERATION_INPUT
PSAM_GENERIC_OPERATION_INPUT
 
typedef union
_SAM_GENERIC_OPERATION_OUTPUT 
SAM_GENERIC_OPERATION_OUTPUT
 
typedef union
_SAM_GENERIC_OPERATION_OUTPUT
PSAM_GENERIC_OPERATION_OUTPUT
 

Enumerations

enum  _DOMAIN_INFORMATION_CLASS {
  DomainPasswordInformation = 1, DomainGeneralInformation, DomainLogoffInformation, DomainOemInformation,
  DomainNameInformation, DomainReplicationInformation, DomainServerRoleInformation, DomainModifiedInformation,
  DomainStateInformation, DomainUasInformation, DomainGeneralInformation2, DomainLockoutInformation,
  DomainModifiedInformation2
}
 
enum  _DOMAIN_SERVER_ENABLE_STATE { DomainServerEnabled = 1, DomainServerDisabled }
 
enum  _DOMAIN_SERVER_ROLE { DomainServerRoleBackup = 2, DomainServerRolePrimary }
 
enum  _DOMAIN_PASSWORD_CONSTRUCTION { DomainPasswordSimple = 1, DomainPasswordComplex }
 
enum  _DOMAIN_DISPLAY_INFORMATION {
  DomainDisplayUser = 1, DomainDisplayMachine, DomainDisplayGroup, DomainDisplayOemUser,
  DomainDisplayOemGroup, DomainDisplayServer
}
 
enum  _DOMAIN_LOCALIZABLE_ACCOUNTS_INFORMATION { DomainLocalizableAccountsBasic = 1 }
 
enum  _GROUP_INFORMATION_CLASS {
  GroupGeneralInformation = 1, GroupNameInformation, GroupAttributeInformation, GroupAdminCommentInformation,
  GroupReplicationInformation
}
 
enum  _ALIAS_INFORMATION_CLASS {
  AliasGeneralInformation = 1, AliasNameInformation, AliasAdminCommentInformation, AliasReplicationInformation,
  AliasExtendedInformation
}
 
enum  _USER_INFORMATION_CLASS {
  UserGeneralInformation = 1, UserPreferencesInformation, UserLogonInformation, UserLogonHoursInformation,
  UserAccountInformation, UserNameInformation, UserAccountNameInformation, UserFullNameInformation,
  UserPrimaryGroupInformation, UserHomeInformation, UserScriptInformation, UserProfileInformation,
  UserAdminCommentInformation, UserWorkStationsInformation, UserSetPasswordInformation, UserControlInformation,
  UserExpiresInformation, UserInternal1Information, UserInternal2Information, UserParametersInformation,
  UserAllInformation, UserInternal3Information, UserInternal4Information, UserInternal5Information,
  UserInternal4InformationNew, UserInternal5InformationNew, UserInternal6Information, UserExtendedInformation,
  UserLogonUIInformation
}
 
enum  _SECURITY_DB_DELTA_TYPE {
  SecurityDbNew = 1, SecurityDbRename, SecurityDbDelete, SecurityDbChangeMemberAdd,
  SecurityDbChangeMemberSet, SecurityDbChangeMemberDel, SecurityDbChange, SecurityDbChangePassword
}
 
enum  _SECURITY_DB_OBJECT_TYPE {
  SecurityDbObjectSamDomain = 1, SecurityDbObjectSamUser, SecurityDbObjectSamGroup, SecurityDbObjectSamAlias,
  SecurityDbObjectLsaPolicy, SecurityDbObjectLsaTDomain, SecurityDbObjectLsaAccount, SecurityDbObjectLsaSecret
}
 
enum  _SAM_ACCOUNT_TYPE { SamObjectUser = 1, SamObjectGroup, SamObjectAlias }
 
enum  _PASSWORD_POLICY_VALIDATION_TYPE { SamValidateAuthentication = 1, SamValidatePasswordChange, SamValidatePasswordReset }
 
enum  _SAM_VALIDATE_VALIDATION_STATUS {
  SamValidateSuccess = 0, SamValidatePasswordMustChange, SamValidateAccountLockedOut, SamValidatePasswordExpired,
  SamValidatePasswordIncorrect, SamValidatePasswordIsInHistory, SamValidatePasswordTooShort, SamValidatePasswordTooLong,
  SamValidatePasswordNotComplexEnough, SamValidatePasswordTooRecent, SamValidatePasswordFilterError
}
 
enum  _SAM_GENERIC_OPERATION_TYPE { SamObjectChangeNotificationOperation }
 

Functions

NTSTATUS NTAPI SamFreeMemory (_In_ PVOID Buffer)
 
NTSTATUS NTAPI SamCloseHandle (_In_ SAM_HANDLE SamHandle)
 
_Check_return_ NTSTATUS NTAPI SamSetSecurityObject (_In_ SAM_HANDLE ObjectHandle, _In_ SECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR SecurityDescriptor)
 
_Check_return_ NTSTATUS NTAPI SamQuerySecurityObject (_In_ SAM_HANDLE ObjectHandle, _In_ SECURITY_INFORMATION SecurityInformation, _Outptr_ PSECURITY_DESCRIPTOR *SecurityDescriptor)
 
_Check_return_ NTSTATUS NTAPI SamRidToSid (_In_ SAM_HANDLE ObjectHandle, _In_ ULONG Rid, _Outptr_ PSID *Sid)
 
_Check_return_ NTSTATUS NTAPI SamConnect (_In_opt_ PUNICODE_STRING ServerName, _Out_ PSAM_HANDLE ServerHandle, _In_ ACCESS_MASK DesiredAccess, _In_ POBJECT_ATTRIBUTES ObjectAttributes)
 
_Check_return_ NTSTATUS NTAPI SamShutdownSamServer (_In_ SAM_HANDLE ServerHandle)
 
_Check_return_ NTSTATUS NTAPI SamLookupDomainInSamServer (_In_ SAM_HANDLE ServerHandle, _In_ PUNICODE_STRING Name, _Outptr_ PSID *DomainId)
 
_Check_return_ NTSTATUS NTAPI SamEnumerateDomainsInSamServer (_In_ SAM_HANDLE ServerHandle, _Inout_ PSAM_ENUMERATE_HANDLE EnumerationContext, _Outptr_ PVOID *Buffer, _In_ ULONG PreferedMaximumLength, _Out_ PULONG CountReturned)
 
_Check_return_ NTSTATUS NTAPI SamOpenDomain (_In_ SAM_HANDLE ServerHandle, _In_ ACCESS_MASK DesiredAccess, _In_ PSID DomainId, _Out_ PSAM_HANDLE DomainHandle)
 
_Check_return_ NTSTATUS NTAPI SamQueryInformationDomain (_In_ SAM_HANDLE DomainHandle, _In_ DOMAIN_INFORMATION_CLASS DomainInformationClass, _Outptr_ PVOID *Buffer)
 
_Check_return_ NTSTATUS NTAPI SamSetInformationDomain (_In_ SAM_HANDLE DomainHandle, _In_ DOMAIN_INFORMATION_CLASS DomainInformationClass, _In_ PVOID DomainInformation)
 
_Check_return_ NTSTATUS NTAPI SamLookupNamesInDomain (_In_ SAM_HANDLE DomainHandle, _In_ ULONG Count, _In_reads_(Count) PUNICODE_STRING Names, _Out_ _Deref_post_count_(Count) PULONG *RelativeIds, _Out_ _Deref_post_count_(Count) PSID_NAME_USE *Use)
 
_Check_return_ NTSTATUS NTAPI SamLookupIdsInDomain (_In_ SAM_HANDLE DomainHandle, _In_ ULONG Count, _In_reads_(Count) PULONG RelativeIds, _Out_ _Deref_post_count_(Count) PUNICODE_STRING *Names, _Out_ _Deref_post_opt_count_(Count) PSID_NAME_USE *Use)
 
_Check_return_ NTSTATUS NTAPI SamRemoveMemberFromForeignDomain (_In_ SAM_HANDLE DomainHandle, _In_ PSID MemberId)
 
_Check_return_ NTSTATUS NTAPI SamQueryLocalizableAccountsInDomain (_In_ SAM_HANDLE Domain, _In_ ULONG Flags, _In_ ULONG LanguageId, _In_ DOMAIN_LOCALIZABLE_ACCOUNTS_INFORMATION Class, _Outptr_ PVOID *Buffer)
 
_Check_return_ NTSTATUS NTAPI SamEnumerateGroupsInDomain (_In_ SAM_HANDLE DomainHandle, _Inout_ PSAM_ENUMERATE_HANDLE EnumerationContext, _Outptr_ PVOID *Buffer, _In_ ULONG PreferedMaximumLength, _Out_ PULONG CountReturned)
 
_Check_return_ NTSTATUS NTAPI SamCreateGroupInDomain (_In_ SAM_HANDLE DomainHandle, _In_ PUNICODE_STRING AccountName, _In_ ACCESS_MASK DesiredAccess, _Out_ PSAM_HANDLE GroupHandle, _Out_ PULONG RelativeId)
 
_Check_return_ NTSTATUS NTAPI SamOpenGroup (_In_ SAM_HANDLE DomainHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG GroupId, _Out_ PSAM_HANDLE GroupHandle)
 
_Check_return_ NTSTATUS NTAPI SamDeleteGroup (_In_ SAM_HANDLE GroupHandle)
 
_Check_return_ NTSTATUS NTAPI SamQueryInformationGroup (_In_ SAM_HANDLE GroupHandle, _In_ GROUP_INFORMATION_CLASS GroupInformationClass, _Outptr_ PVOID *Buffer)
 
_Check_return_ NTSTATUS NTAPI SamSetInformationGroup (_In_ SAM_HANDLE GroupHandle, _In_ GROUP_INFORMATION_CLASS GroupInformationClass, _In_ PVOID Buffer)
 
_Check_return_ NTSTATUS NTAPI SamAddMemberToGroup (_In_ SAM_HANDLE GroupHandle, _In_ ULONG MemberId, _In_ ULONG Attributes)
 
_Check_return_ NTSTATUS NTAPI SamRemoveMemberFromGroup (_In_ SAM_HANDLE GroupHandle, _In_ ULONG MemberId)
 
_Check_return_ NTSTATUS NTAPI SamGetMembersInGroup (_In_ SAM_HANDLE GroupHandle, _Out_ _Deref_post_count_(*MemberCount) PULONG *MemberIds, _Out_ _Deref_post_count_(*MemberCount) PULONG *Attributes, _Out_ PULONG MemberCount)
 
_Check_return_ NTSTATUS NTAPI SamSetMemberAttributesOfGroup (_In_ SAM_HANDLE GroupHandle, _In_ ULONG MemberId, _In_ ULONG Attributes)
 
_Check_return_ NTSTATUS NTAPI SamEnumerateAliasesInDomain (_In_ SAM_HANDLE DomainHandle, _Inout_ PSAM_ENUMERATE_HANDLE EnumerationContext, _Outptr_ PVOID *Buffer, _In_ ULONG PreferedMaximumLength, _Out_ PULONG CountReturned)
 
_Check_return_ NTSTATUS NTAPI SamCreateAliasInDomain (_In_ SAM_HANDLE DomainHandle, _In_ PUNICODE_STRING AccountName, _In_ ACCESS_MASK DesiredAccess, _Out_ PSAM_HANDLE AliasHandle, _Out_ PULONG RelativeId)
 
_Check_return_ NTSTATUS NTAPI SamOpenAlias (_In_ SAM_HANDLE DomainHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG AliasId, _Out_ PSAM_HANDLE AliasHandle)
 
_Check_return_ NTSTATUS NTAPI SamDeleteAlias (_In_ SAM_HANDLE AliasHandle)
 
_Check_return_ NTSTATUS NTAPI SamQueryInformationAlias (_In_ SAM_HANDLE AliasHandle, _In_ ALIAS_INFORMATION_CLASS AliasInformationClass, _Outptr_ PVOID *Buffer)
 
_Check_return_ NTSTATUS NTAPI SamSetInformationAlias (_In_ SAM_HANDLE AliasHandle, _In_ ALIAS_INFORMATION_CLASS AliasInformationClass, _In_ PVOID Buffer)
 
_Check_return_ NTSTATUS NTAPI SamAddMemberToAlias (_In_ SAM_HANDLE AliasHandle, _In_ PSID MemberId)
 
_Check_return_ NTSTATUS NTAPI SamAddMultipleMembersToAlias (_In_ SAM_HANDLE AliasHandle, _In_reads_(MemberCount) PSID *MemberIds, _In_ ULONG MemberCount)
 
_Check_return_ NTSTATUS NTAPI SamRemoveMemberFromAlias (_In_ SAM_HANDLE AliasHandle, _In_ PSID MemberId)
 
_Check_return_ NTSTATUS NTAPI SamRemoveMultipleMembersFromAlias (_In_ SAM_HANDLE AliasHandle, _In_reads_(MemberCount) PSID *MemberIds, _In_ ULONG MemberCount)
 
_Check_return_ NTSTATUS NTAPI SamGetMembersInAlias (_In_ SAM_HANDLE AliasHandle, _Out_ _Deref_post_count_(*MemberCount) PSID **MemberIds, _Out_ PULONG MemberCount)
 
_Check_return_ NTSTATUS NTAPI SamGetAliasMembership (_In_ SAM_HANDLE DomainHandle, _In_ ULONG PassedCount, _In_reads_(PassedCount) PSID *Sids, _Out_ PULONG MembershipCount, _Out_ _Deref_post_count_(*MembershipCount) PULONG *Aliases)
 
_Check_return_ NTSTATUS NTAPI SamEnumerateUsersInDomain (_In_ SAM_HANDLE DomainHandle, _Inout_ PSAM_ENUMERATE_HANDLE EnumerationContext, _In_ ULONG UserAccountControl, _Outptr_ PVOID *Buffer, _In_ ULONG PreferedMaximumLength, _Out_ PULONG CountReturned)
 
_Check_return_ NTSTATUS NTAPI SamCreateUserInDomain (_In_ SAM_HANDLE DomainHandle, _In_ PUNICODE_STRING AccountName, _In_ ACCESS_MASK DesiredAccess, _Out_ PSAM_HANDLE UserHandle, _Out_ PULONG RelativeId)
 
_Check_return_ NTSTATUS NTAPI SamCreateUser2InDomain (_In_ SAM_HANDLE DomainHandle, _In_ PUNICODE_STRING AccountName, _In_ ULONG AccountType, _In_ ACCESS_MASK DesiredAccess, _Out_ PSAM_HANDLE UserHandle, _Out_ PULONG GrantedAccess, _Out_ PULONG RelativeId)
 
_Check_return_ NTSTATUS NTAPI SamOpenUser (_In_ SAM_HANDLE DomainHandle, _In_ ACCESS_MASK DesiredAccess, _In_ ULONG UserId, _Out_ PSAM_HANDLE UserHandle)
 
_Check_return_ NTSTATUS NTAPI SamDeleteUser (_In_ SAM_HANDLE UserHandle)
 
_Check_return_ NTSTATUS NTAPI SamQueryInformationUser (_In_ SAM_HANDLE UserHandle, _In_ USER_INFORMATION_CLASS UserInformationClass, _Outptr_ PVOID *Buffer)
 
_Check_return_ NTSTATUS NTAPI SamSetInformationUser (_In_ SAM_HANDLE UserHandle, _In_ USER_INFORMATION_CLASS UserInformationClass, _In_ PVOID Buffer)
 
_Check_return_ NTSTATUS NTAPI SamGetGroupsForUser (_In_ SAM_HANDLE UserHandle, _Out_ _Deref_post_count_(*MembershipCount) PGROUP_MEMBERSHIP *Groups, _Out_ PULONG MembershipCount)
 
_Check_return_ NTSTATUS NTAPI SamChangePasswordUser (_In_ SAM_HANDLE UserHandle, _In_ PUNICODE_STRING OldPassword, _In_ PUNICODE_STRING NewPassword)
 
_Check_return_ NTSTATUS NTAPI SamChangePasswordUser2 (_In_ PUNICODE_STRING ServerName, _In_ PUNICODE_STRING UserName, _In_ PUNICODE_STRING OldPassword, _In_ PUNICODE_STRING NewPassword)
 
_Check_return_ NTSTATUS NTAPI SamChangePasswordUser3 (_In_ PUNICODE_STRING ServerName, _In_ PUNICODE_STRING UserName, _In_ PUNICODE_STRING OldPassword, _In_ PUNICODE_STRING NewPassword, _Outptr_ PDOMAIN_PASSWORD_INFORMATION *EffectivePasswordPolicy, _Outptr_ PUSER_PWD_CHANGE_FAILURE_INFORMATION *PasswordChangeFailureInfo)
 
_Check_return_ NTSTATUS NTAPI SamQueryDisplayInformation (_In_ SAM_HANDLE DomainHandle, _In_ DOMAIN_DISPLAY_INFORMATION DisplayInformation, _In_ ULONG Index, _In_ ULONG EntryCount, _In_ ULONG PreferredMaximumLength, _In_ PULONG TotalAvailable, _Out_ PULONG TotalReturned, _Out_ PULONG ReturnedEntryCount, _Outptr_ PVOID *SortedBuffer)
 
_Check_return_ NTSTATUS NTAPI SamGetDisplayEnumerationIndex (_In_ SAM_HANDLE DomainHandle, _In_ DOMAIN_DISPLAY_INFORMATION DisplayInformation, _In_ PUNICODE_STRING Prefix, _Out_ PULONG Index)
 
_Check_return_ NTSTATUS NTAPI SamRegisterObjectChangeNotification (_In_ SECURITY_DB_OBJECT_TYPE ObjectType, _In_ HANDLE NotificationEventHandle)
 
NTSTATUS NTAPI SamUnregisterObjectChangeNotification (_In_ SECURITY_DB_OBJECT_TYPE ObjectType, _In_ HANDLE NotificationEventHandle)
 
_Check_return_ NTSTATUS NTAPI SamGetCompatibilityMode (_In_ SAM_HANDLE ObjectHandle, _Out_ ULONG *Mode)
 
_Check_return_ NTSTATUS NTAPI SamValidatePassword (_In_opt_ PUNICODE_STRING ServerName, _In_ PASSWORD_POLICY_VALIDATION_TYPE ValidationType, _In_ PSAM_VALIDATE_INPUT_ARG InputArg, _Out_ PSAM_VALIDATE_OUTPUT_ARG *OutputArg)
 
_Check_return_ NTSTATUS NTAPI SamPerformGenericOperation (_In_opt_ PWSTR ServerName, _In_ SAM_GENERIC_OPERATION_TYPE OperationType, _In_ PSAM_GENERIC_OPERATION_INPUT OperationIn, _Out_ PSAM_GENERIC_OPERATION_OUTPUT *OperationOut)
 

Macro Definition Documentation

#define _DOMAIN_PASSWORD_INFORMATION_DEFINED

Definition at line 238 of file ntsam.h.

#define ALIAS_ADD_MEMBER   0x0001

Definition at line 649 of file ntsam.h.

#define ALIAS_ALL_ACCESS
Value:
(STANDARD_RIGHTS_REQUIRED | \
ALIAS_READ_INFORMATION | \
ALIAS_WRITE_ACCOUNT | \
ALIAS_LIST_MEMBERS | \
ALIAS_ADD_MEMBER | \
ALIAS_REMOVE_MEMBER)

Definition at line 655 of file ntsam.h.

#define ALIAS_ALL_ADMIN_COMMENT   (0x00000004L)

Definition at line 703 of file ntsam.h.

#define ALIAS_ALL_MEMBER_COUNT   (0x00000002L)

Definition at line 702 of file ntsam.h.

#define ALIAS_ALL_NAME   (0x00000001L)

Definition at line 701 of file ntsam.h.

#define ALIAS_ALL_SHELL_ADMIN_OBJECT_PROPERTIES   (0x00000008L)

Definition at line 704 of file ntsam.h.

#define ALIAS_EXECUTE
Value:
(STANDARD_RIGHTS_EXECUTE | \
ALIAS_READ_INFORMATION)

Definition at line 670 of file ntsam.h.

#define ALIAS_LIST_MEMBERS   0x0004

Definition at line 651 of file ntsam.h.

#define ALIAS_READ
Value:
(STANDARD_RIGHTS_READ | \
ALIAS_LIST_MEMBERS)

Definition at line 662 of file ntsam.h.

#define ALIAS_READ_INFORMATION   0x0008

Definition at line 652 of file ntsam.h.

#define ALIAS_REMOVE_MEMBER   0x0002

Definition at line 650 of file ntsam.h.

#define ALIAS_WRITE
Value:
(STANDARD_RIGHTS_WRITE | \
ALIAS_WRITE_ACCOUNT | \
ALIAS_ADD_MEMBER | \
ALIAS_REMOVE_MEMBER)

Definition at line 665 of file ntsam.h.

#define ALIAS_WRITE_ACCOUNT   0x0010

Definition at line 653 of file ntsam.h.

#define DOMAIN_ADMINISTER_SERVER   0x0400

Definition at line 139 of file ntsam.h.

#define DOMAIN_ALL_ACCESS
Value:
(STANDARD_RIGHTS_REQUIRED | \
DOMAIN_READ_OTHER_PARAMETERS | \
DOMAIN_WRITE_OTHER_PARAMETERS | \
DOMAIN_WRITE_PASSWORD_PARAMS | \
DOMAIN_CREATE_USER | \
DOMAIN_CREATE_GROUP | \
DOMAIN_CREATE_ALIAS | \
DOMAIN_GET_ALIAS_MEMBERSHIP | \
DOMAIN_LIST_ACCOUNTS | \
DOMAIN_READ_PASSWORD_PARAMETERS | \
DOMAIN_LOOKUP | \
DOMAIN_ADMINISTER_SERVER)

Definition at line 141 of file ntsam.h.

#define DOMAIN_CREATE_ALIAS   0x0040

Definition at line 135 of file ntsam.h.

#define DOMAIN_CREATE_GROUP   0x0020

Definition at line 134 of file ntsam.h.

#define DOMAIN_CREATE_USER   0x0010

Definition at line 133 of file ntsam.h.

#define DOMAIN_EXECUTE
Value:
(STANDARD_RIGHTS_EXECUTE | \
DOMAIN_READ_PASSWORD_PARAMETERS | \
DOMAIN_LIST_ACCOUNTS | \
DOMAIN_LOOKUP)

Definition at line 166 of file ntsam.h.

#define DOMAIN_GET_ALIAS_MEMBERSHIP   0x0080

Definition at line 136 of file ntsam.h.

#define DOMAIN_LIST_ACCOUNTS   0x0100

Definition at line 137 of file ntsam.h.

#define DOMAIN_LOCKOUT_ADMINS   0x00000008L

Definition at line 254 of file ntsam.h.

#define DOMAIN_LOOKUP   0x0200

Definition at line 138 of file ntsam.h.

#define DOMAIN_NO_LM_OWF_CHANGE   0x00000040L

Definition at line 257 of file ntsam.h.

#define DOMAIN_PASSWORD_COMPLEX   0x00000001L

Definition at line 251 of file ntsam.h.

#define DOMAIN_PASSWORD_NO_ANON_CHANGE   0x00000002L

Definition at line 252 of file ntsam.h.

#define DOMAIN_PASSWORD_NO_CLEAR_CHANGE   0x00000004L

Definition at line 253 of file ntsam.h.

#define DOMAIN_PASSWORD_STORE_CLEARTEXT   0x00000010L

Definition at line 255 of file ntsam.h.

#define DOMAIN_PROMOTION_INCREMENT   { 0x0, 0x10 }

Definition at line 171 of file ntsam.h.

#define DOMAIN_PROMOTION_MASK   { 0x0, 0xfffffff0 }

Definition at line 172 of file ntsam.h.

#define DOMAIN_READ
Value:
(STANDARD_RIGHTS_READ | \
DOMAIN_GET_ALIAS_MEMBERSHIP | \
DOMAIN_READ_OTHER_PARAMETERS)

Definition at line 154 of file ntsam.h.

#define DOMAIN_READ_OTHER_PARAMETERS   0x0004

Definition at line 131 of file ntsam.h.

#define DOMAIN_READ_PASSWORD_PARAMETERS   0x0001

Definition at line 129 of file ntsam.h.

#define DOMAIN_REFUSE_PASSWORD_CHANGE   0x00000020L

Definition at line 256 of file ntsam.h.

#define DOMAIN_WRITE
Value:
(STANDARD_RIGHTS_WRITE | \
DOMAIN_WRITE_OTHER_PARAMETERS | \
DOMAIN_WRITE_PASSWORD_PARAMS | \
DOMAIN_CREATE_USER | \
DOMAIN_CREATE_GROUP | \
DOMAIN_CREATE_ALIAS | \
DOMAIN_ADMINISTER_SERVER)

Definition at line 158 of file ntsam.h.

#define DOMAIN_WRITE_OTHER_PARAMETERS   0x0008

Definition at line 132 of file ntsam.h.

#define DOMAIN_WRITE_PASSWORD_PARAMS   0x0002

Definition at line 130 of file ntsam.h.

#define GROUP_ADD_MEMBER   0x0004

Definition at line 490 of file ntsam.h.

#define GROUP_ALL_ACCESS
Value:
(STANDARD_RIGHTS_REQUIRED | \
GROUP_LIST_MEMBERS | \
GROUP_WRITE_ACCOUNT | \
GROUP_ADD_MEMBER | \
GROUP_REMOVE_MEMBER | \
GROUP_READ_INFORMATION)

Definition at line 494 of file ntsam.h.

#define GROUP_EXECUTE
Value:
(STANDARD_RIGHTS_EXECUTE | \
GROUP_READ_INFORMATION)

Definition at line 509 of file ntsam.h.

#define GROUP_LIST_MEMBERS   0x0010

Definition at line 492 of file ntsam.h.

#define GROUP_READ
Value:
(STANDARD_RIGHTS_READ | \
GROUP_LIST_MEMBERS)

Definition at line 501 of file ntsam.h.

#define GROUP_READ_INFORMATION   0x0001

Definition at line 488 of file ntsam.h.

#define GROUP_REMOVE_MEMBER   0x0008

Definition at line 491 of file ntsam.h.

#define GROUP_TYPE_ACCOUNT_GROUP   0x00000002

Definition at line 828 of file ntsam.h.

#define GROUP_TYPE_APP_BASIC_GROUP   0x00000010

Definition at line 831 of file ntsam.h.

#define GROUP_TYPE_APP_QUERY_GROUP   0x00000020

Definition at line 832 of file ntsam.h.

#define GROUP_TYPE_BUILTIN_LOCAL_GROUP   0x00000001

Definition at line 827 of file ntsam.h.

#define GROUP_TYPE_RESOURCE_BEHAVOIR
Value:
GROUP_TYPE_APP_BASIC_GROUP | \
GROUP_TYPE_APP_QUERY_GROUP)

Definition at line 835 of file ntsam.h.

#define GROUP_TYPE_RESOURCE_GROUP   0x00000004

Definition at line 829 of file ntsam.h.

#define GROUP_TYPE_SECURITY_ENABLED   0x80000000

Definition at line 833 of file ntsam.h.

#define GROUP_TYPE_UNIVERSAL_GROUP   0x00000008

Definition at line 830 of file ntsam.h.

#define GROUP_WRITE
Value:
(STANDARD_RIGHTS_WRITE | \
GROUP_WRITE_ACCOUNT | \
GROUP_ADD_MEMBER | \
GROUP_REMOVE_MEMBER)

Definition at line 504 of file ntsam.h.

#define GROUP_WRITE_ACCOUNT   0x0002

Definition at line 489 of file ntsam.h.

#define NEXT_FREE_ACCOUNT_CONTROL_BIT   (USER_USE_AES_KEYS << 1)

Definition at line 906 of file ntsam.h.

#define SAM_DAYS_PER_WEEK   (7)

Definition at line 927 of file ntsam.h.

#define SAM_DELTA_NOTIFY_ROUTINE   "DeltaNotify"

Definition at line 1559 of file ntsam.h.

#define SAM_GLOBAL_GROUP_ACCOUNT   (0x00000002)

Definition at line 1529 of file ntsam.h.

#define SAM_HOURS_PER_WEEK   (24 * SAM_DAYS_PER_WEEK)

Definition at line 928 of file ntsam.h.

#define SAM_LOCAL_GROUP_ACCOUNT   (0x00000004)

Definition at line 1530 of file ntsam.h.

#define SAM_MAX_PASSWORD_LENGTH   (256)

Definition at line 6 of file ntsam.h.

#define SAM_MAXIMUM_LOOKUP_COUNT   (1000)

Definition at line 4 of file ntsam.h.

#define SAM_MAXIMUM_LOOKUP_LENGTH   (32000)

Definition at line 5 of file ntsam.h.

#define SAM_MINUTES_PER_WEEK   (60 * SAM_HOURS_PER_WEEK)

Definition at line 929 of file ntsam.h.

#define SAM_PASSWORD_ENCRYPTION_SALT_LEN   (16)

Definition at line 7 of file ntsam.h.

#define SAM_PWD_CHANGE_FAILED_BY_FILTER   7

Definition at line 1353 of file ntsam.h.

#define SAM_PWD_CHANGE_FAILURE_REASON_MAX   8

Definition at line 1355 of file ntsam.h.

#define SAM_PWD_CHANGE_FULLNAME_IN_PASSWORD   4

Definition at line 1350 of file ntsam.h.

#define SAM_PWD_CHANGE_MACHINE_PASSWORD_NOT_DEFAULT   6

Definition at line 1352 of file ntsam.h.

#define SAM_PWD_CHANGE_NO_ERROR   0

Definition at line 1346 of file ntsam.h.

#define SAM_PWD_CHANGE_NOT_COMPLEX   5

Definition at line 1351 of file ntsam.h.

#define SAM_PWD_CHANGE_PASSWORD_TOO_LONG   8

Definition at line 1354 of file ntsam.h.

#define SAM_PWD_CHANGE_PASSWORD_TOO_SHORT   1

Definition at line 1347 of file ntsam.h.

#define SAM_PWD_CHANGE_PWD_IN_HISTORY   2

Definition at line 1348 of file ntsam.h.

#define SAM_PWD_CHANGE_USERNAME_IN_PASSWORD   3

Definition at line 1349 of file ntsam.h.

#define SAM_SERVER_ALL_ACCESS
Value:
(STANDARD_RIGHTS_REQUIRED | \
SAM_SERVER_CONNECT | \
SAM_SERVER_INITIALIZE | \
SAM_SERVER_CREATE_DOMAIN | \
SAM_SERVER_SHUTDOWN | \
SAM_SERVER_ENUMERATE_DOMAINS | \
SAM_SERVER_LOOKUP_DOMAIN)

Definition at line 88 of file ntsam.h.

#define SAM_SERVER_CONNECT   0x0001

Definition at line 81 of file ntsam.h.

#define SAM_SERVER_CREATE_DOMAIN   0x0008

Definition at line 84 of file ntsam.h.

#define SAM_SERVER_ENUMERATE_DOMAINS   0x0010

Definition at line 85 of file ntsam.h.

#define SAM_SERVER_EXECUTE
Value:
(STANDARD_RIGHTS_EXECUTE | \
SAM_SERVER_CONNECT | \
SAM_SERVER_LOOKUP_DOMAIN)

Definition at line 104 of file ntsam.h.

#define SAM_SERVER_INITIALIZE   0x0004

Definition at line 83 of file ntsam.h.

#define SAM_SERVER_LOOKUP_DOMAIN   0x0020

Definition at line 86 of file ntsam.h.

#define SAM_SERVER_READ
Value:
(STANDARD_RIGHTS_READ | \
SAM_SERVER_ENUMERATE_DOMAINS)

Definition at line 96 of file ntsam.h.

#define SAM_SERVER_SHUTDOWN   0x0002

Definition at line 82 of file ntsam.h.

#define SAM_SERVER_WRITE
Value:
(STANDARD_RIGHTS_WRITE | \
SAM_SERVER_INITIALIZE | \
SAM_SERVER_CREATE_DOMAIN | \
SAM_SERVER_SHUTDOWN)

Definition at line 99 of file ntsam.h.

#define SAM_SID_COMPATIBILITY_ALL   0

Definition at line 1578 of file ntsam.h.

#define SAM_SID_COMPATIBILITY_LAX   1

Definition at line 1579 of file ntsam.h.

#define SAM_SID_COMPATIBILITY_STRICT   2

Definition at line 1580 of file ntsam.h.

#define SAM_USER_ACCOUNT   (0x00000001)

Definition at line 1528 of file ntsam.h.

#define SAM_VALIDATE_BAD_PASSWORD_COUNT   0x00000008

Definition at line 1610 of file ntsam.h.

#define SAM_VALIDATE_BAD_PASSWORD_TIME   0x00000002

Definition at line 1608 of file ntsam.h.

#define SAM_VALIDATE_LOCKOUT_TIME   0x00000004

Definition at line 1609 of file ntsam.h.

#define SAM_VALIDATE_PASSWORD_HISTORY   0x00000020

Definition at line 1612 of file ntsam.h.

#define SAM_VALIDATE_PASSWORD_HISTORY_LENGTH   0x00000010

Definition at line 1611 of file ntsam.h.

#define SAM_VALIDATE_PASSWORD_LAST_SET   0x00000001

Definition at line 1607 of file ntsam.h.

#define USER_ACCOUNT_AUTO_LOCKED   (0x00000400)

Definition at line 893 of file ntsam.h.

#define USER_ACCOUNT_DISABLED   (0x00000001)

Definition at line 883 of file ntsam.h.

#define USER_ACCOUNT_TYPE_MASK
Value:
( \
USER_TEMP_DUPLICATE_ACCOUNT | \
USER_NORMAL_ACCOUNT | \
USER_MACHINE_ACCOUNT_MASK \
)

Definition at line 914 of file ntsam.h.

#define USER_ALL_ACCESS
Value:
(STANDARD_RIGHTS_REQUIRED | \
USER_READ_PREFERENCES | \
USER_READ_LOGON | \
USER_LIST_GROUPS | \
USER_READ_GROUP_INFORMATION | \
USER_WRITE_PREFERENCES | \
USER_CHANGE_PASSWORD | \
USER_FORCE_PASSWORD_CHANGE | \
USER_READ_GENERAL | \
USER_READ_ACCOUNT | \
USER_WRITE_ACCOUNT | \
USER_WRITE_GROUP_INFORMATION)

Definition at line 853 of file ntsam.h.

#define USER_ALL_ACCOUNTEXPIRES   0x00080000

Definition at line 1051 of file ntsam.h.

#define USER_ALL_ADMINCOMMENT   0x00000010

Definition at line 1036 of file ntsam.h.

#define USER_ALL_BADPASSWORDCOUNT   0x00004000

Definition at line 1046 of file ntsam.h.

#define USER_ALL_CODEPAGE   0x00800000

Definition at line 1055 of file ntsam.h.

#define USER_ALL_COUNTRYCODE   0x00400000

Definition at line 1054 of file ntsam.h.

#define USER_ALL_FULLNAME   0x00000002

Definition at line 1033 of file ntsam.h.

#define USER_ALL_HOMEDIRECTORY   0x00000040

Definition at line 1038 of file ntsam.h.

#define USER_ALL_HOMEDIRECTORYDRIVE   0x00000080

Definition at line 1039 of file ntsam.h.

#define USER_ALL_LASTLOGOFF   0x00001000

Definition at line 1044 of file ntsam.h.

#define USER_ALL_LASTLOGON   0x00000800

Definition at line 1043 of file ntsam.h.

#define USER_ALL_LMPASSWORDPRESENT   0x02000000

Definition at line 1057 of file ntsam.h.

#define USER_ALL_LOGONCOUNT   0x00008000

Definition at line 1047 of file ntsam.h.

#define USER_ALL_LOGONHOURS   0x00002000

Definition at line 1045 of file ntsam.h.

#define USER_ALL_NTPASSWORDPRESENT   0x01000000

Definition at line 1056 of file ntsam.h.

#define USER_ALL_OWFPASSWORD   0x20000000

Definition at line 1061 of file ntsam.h.

#define USER_ALL_PARAMETERS   0x00200000

Definition at line 1053 of file ntsam.h.

#define USER_ALL_PASSWORDCANCHANGE   0x00010000

Definition at line 1048 of file ntsam.h.

#define USER_ALL_PASSWORDEXPIRED   0x08000000

Definition at line 1059 of file ntsam.h.

#define USER_ALL_PASSWORDLASTSET   0x00040000

Definition at line 1050 of file ntsam.h.

#define USER_ALL_PASSWORDMUSTCHANGE   0x00020000

Definition at line 1049 of file ntsam.h.

#define USER_ALL_PRIMARYGROUPID   0x00000008

Definition at line 1035 of file ntsam.h.

#define USER_ALL_PRIVATEDATA   0x04000000

Definition at line 1058 of file ntsam.h.

#define USER_ALL_PROFILEPATH   0x00000200

Definition at line 1041 of file ntsam.h.

#define USER_ALL_READ_ACCOUNT_MASK
Value:
USER_ALL_ACCOUNTEXPIRES | \
USER_ALL_USERACCOUNTCONTROL | \
USER_ALL_PARAMETERS)

Definition at line 1091 of file ntsam.h.

#define USER_ALL_READ_CANT_MASK   USER_ALL_UNDEFINED_MASK

Definition at line 1111 of file ntsam.h.

#define USER_ALL_READ_GENERAL_MASK
Value:
USER_ALL_FULLNAME | \
USER_ALL_USERID | \
USER_ALL_PRIMARYGROUPID | \
USER_ALL_ADMINCOMMENT | \
USER_ALL_USERCOMMENT)

Definition at line 1067 of file ntsam.h.

#define USER_ALL_READ_LOGON_MASK
Value:
USER_ALL_HOMEDIRECTORYDRIVE | \
USER_ALL_SCRIPTPATH | \
USER_ALL_PROFILEPATH | \
USER_ALL_WORKSTATIONS | \
USER_ALL_LASTLOGON | \
USER_ALL_LASTLOGOFF | \
USER_ALL_LOGONHOURS | \
USER_ALL_BADPASSWORDCOUNT | \
USER_ALL_LOGONCOUNT | \
USER_ALL_PASSWORDCANCHANGE | \
USER_ALL_PASSWORDMUSTCHANGE)

Definition at line 1076 of file ntsam.h.

#define USER_ALL_READ_PREFERENCES_MASK
Value:
USER_ALL_CODEPAGE)

Definition at line 1098 of file ntsam.h.

#define USER_ALL_READ_TRUSTED_MASK
Value:
USER_ALL_LMPASSWORDPRESENT | \
USER_ALL_PASSWORDEXPIRED | \
USER_ALL_SECURITYDESCRIPTOR | \
USER_ALL_PRIVATEDATA)

Definition at line 1103 of file ntsam.h.

#define USER_ALL_SCRIPTPATH   0x00000100

Definition at line 1040 of file ntsam.h.

#define USER_ALL_SECURITYDESCRIPTOR   0x10000000

Definition at line 1060 of file ntsam.h.

#define USER_ALL_UNDEFINED_MASK   0xc0000000

Definition at line 1063 of file ntsam.h.

#define USER_ALL_USERACCOUNTCONTROL   0x00100000

Definition at line 1052 of file ntsam.h.

#define USER_ALL_USERCOMMENT   0x00000020

Definition at line 1037 of file ntsam.h.

#define USER_ALL_USERID   0x00000004

Definition at line 1034 of file ntsam.h.

#define USER_ALL_USERNAME   0x00000001

Definition at line 1032 of file ntsam.h.

#define USER_ALL_WORKSTATIONS   0x00000400

Definition at line 1042 of file ntsam.h.

#define USER_ALL_WRITE_ACCOUNT_MASK
Value:
USER_ALL_FULLNAME | \
USER_ALL_PRIMARYGROUPID | \
USER_ALL_HOMEDIRECTORY | \
USER_ALL_HOMEDIRECTORYDRIVE | \
USER_ALL_SCRIPTPATH | \
USER_ALL_PROFILEPATH | \
USER_ALL_ADMINCOMMENT | \
USER_ALL_WORKSTATIONS | \
USER_ALL_LOGONHOURS | \
USER_ALL_ACCOUNTEXPIRES | \
USER_ALL_USERACCOUNTCONTROL | \
USER_ALL_PARAMETERS)

Definition at line 1115 of file ntsam.h.

#define USER_ALL_WRITE_CANT_MASK
Value:
USER_ALL_PASSWORDCANCHANGE | \
USER_ALL_PASSWORDMUSTCHANGE | \
USER_ALL_UNDEFINED_MASK)

Definition at line 1159 of file ntsam.h.

#define USER_ALL_WRITE_FORCE_PASSWORD_CHANGE_MASK
Value:
USER_ALL_LMPASSWORDPRESENT | \
USER_ALL_PASSWORDEXPIRED)

Definition at line 1142 of file ntsam.h.

#define USER_ALL_WRITE_PREFERENCES_MASK
Value:
USER_ALL_COUNTRYCODE | \
USER_ALL_CODEPAGE)

Definition at line 1131 of file ntsam.h.

#define USER_ALL_WRITE_TRUSTED_MASK
Value:
USER_ALL_LASTLOGOFF | \
USER_ALL_BADPASSWORDCOUNT | \
USER_ALL_LOGONCOUNT | \
USER_ALL_PASSWORDLASTSET | \
USER_ALL_SECURITYDESCRIPTOR | \
USER_ALL_PRIVATEDATA)

Definition at line 1149 of file ntsam.h.

#define USER_CHANGE_PASSWORD   0x0040

Definition at line 847 of file ntsam.h.

#define USER_COMPUTED_ACCOUNT_CONTROL_BITS
Value:
( \
USER_ACCOUNT_AUTO_LOCKED | \
USER_PASSWORD_EXPIRED \
)

Definition at line 920 of file ntsam.h.

#define USER_DONT_EXPIRE_PASSWORD   (0x00000200)

Definition at line 892 of file ntsam.h.

#define USER_DONT_REQUIRE_PREAUTH   (0x00010000)

Definition at line 899 of file ntsam.h.

#define USER_ENCRYPTED_TEXT_PASSWORD_ALLOWED   (0x00000800)

Definition at line 894 of file ntsam.h.

#define USER_EXECUTE
Value:
(STANDARD_RIGHTS_EXECUTE | \
USER_READ_GENERAL | \
USER_CHANGE_PASSWORD)

Definition at line 877 of file ntsam.h.

#define USER_EXTENDED_FIELD_DONT_SHOW_IN_LOGON_UI   (0x00004000L)

Definition at line 1308 of file ntsam.h.

#define USER_EXTENDED_FIELD_PASSWORD_HINT   (0x00002000L)

Definition at line 1307 of file ntsam.h.

#define USER_EXTENDED_FIELD_SHELL_ADMIN_OBJECT_PROPERTIES   (0x00008000L)

Definition at line 1309 of file ntsam.h.

#define USER_EXTENDED_FIELD_USER_TILE   (0x00001000L)

Definition at line 1306 of file ntsam.h.

#define USER_FORCE_PASSWORD_CHANGE   0x0080

Definition at line 848 of file ntsam.h.

#define USER_HOME_DIRECTORY_REQUIRED   (0x00000002)

Definition at line 884 of file ntsam.h.

#define USER_INTERDOMAIN_TRUST_ACCOUNT   (0x00000040)

Definition at line 889 of file ntsam.h.

#define USER_LIST_GROUPS   0x0100

Definition at line 849 of file ntsam.h.

#define USER_MACHINE_ACCOUNT_MASK
Value:
( \
USER_INTERDOMAIN_TRUST_ACCOUNT | \
USER_WORKSTATION_TRUST_ACCOUNT | \
USER_SERVER_TRUST_ACCOUNT \
)

Definition at line 908 of file ntsam.h.

#define USER_MNS_LOGON_ACCOUNT   (0x00000020)

Definition at line 888 of file ntsam.h.

#define USER_NO_AUTH_DATA_REQUIRED   (0x00080000)

Definition at line 902 of file ntsam.h.

#define USER_NORMAL_ACCOUNT   (0x00000010)

Definition at line 887 of file ntsam.h.

#define USER_NOT_DELEGATED   (0x00004000)

Definition at line 897 of file ntsam.h.

#define USER_PARTIAL_SECRETS_ACCOUNT   (0x00100000)

Definition at line 903 of file ntsam.h.

#define USER_PASSWORD_EXPIRED   (0x00020000)

Definition at line 900 of file ntsam.h.

#define USER_PASSWORD_NOT_REQUIRED   (0x00000004)

Definition at line 885 of file ntsam.h.

#define USER_READ
Value:
(STANDARD_RIGHTS_READ | \
USER_READ_PREFERENCES | \
USER_READ_LOGON | \
USER_READ_ACCOUNT | \
USER_LIST_GROUPS | \
USER_READ_GROUP_INFORMATION)

Definition at line 866 of file ntsam.h.

#define USER_READ_ACCOUNT   0x0010

Definition at line 845 of file ntsam.h.

#define USER_READ_GENERAL   0x0001

Definition at line 841 of file ntsam.h.

#define USER_READ_GROUP_INFORMATION   0x0200

Definition at line 850 of file ntsam.h.

#define USER_READ_LOGON   0x0008

Definition at line 844 of file ntsam.h.

#define USER_READ_PREFERENCES   0x0002

Definition at line 842 of file ntsam.h.

#define USER_SERVER_TRUST_ACCOUNT   (0x00000100)

Definition at line 891 of file ntsam.h.

#define USER_SMARTCARD_REQUIRED   (0x00001000)

Definition at line 895 of file ntsam.h.

#define USER_TEMP_DUPLICATE_ACCOUNT   (0x00000008)

Definition at line 886 of file ntsam.h.

#define USER_TRUSTED_FOR_DELEGATION   (0x00002000)

Definition at line 896 of file ntsam.h.

#define USER_TRUSTED_TO_AUTHENTICATE_FOR_DELEGATION   (0x00040000)

Definition at line 901 of file ntsam.h.

#define USER_USE_AES_KEYS   (0x00200000)

Definition at line 904 of file ntsam.h.

#define USER_USE_DES_KEY_ONLY   (0x00008000)

Definition at line 898 of file ntsam.h.

#define USER_WORKSTATION_TRUST_ACCOUNT   (0x00000080)

Definition at line 890 of file ntsam.h.

#define USER_WRITE
Value:
(STANDARD_RIGHTS_WRITE | \
USER_WRITE_PREFERENCES | \
USER_CHANGE_PASSWORD)

Definition at line 873 of file ntsam.h.

#define USER_WRITE_ACCOUNT   0x0020

Definition at line 846 of file ntsam.h.

#define USER_WRITE_GROUP_INFORMATION   0x0400

Definition at line 851 of file ntsam.h.

#define USER_WRITE_PREFERENCES   0x0004

Definition at line 843 of file ntsam.h.

Typedef Documentation

typedef struct _LOGON_HOURS LOGON_HOURS
typedef struct _LOGON_HOURS * PLOGON_HOURS
typedef struct _SAM_BYTE_ARRAY * PSAM_BYTE_ARRAY
typedef NTSTATUS(NTAPI * PSAM_DELTA_NOTIFICATION_ROUTINE)(_In_ PSID DomainSid, _In_ SECURITY_DB_DELTA_TYPE DeltaType, _In_ SECURITY_DB_OBJECT_TYPE ObjectType, _In_ ULONG ObjectRid, _In_opt_ PUNICODE_STRING ObjectName, _In_ PLARGE_INTEGER ModifiedCount, _In_opt_ PSAM_DELTA_DATA DeltaData)

Definition at line 1549 of file ntsam.h.

typedef ULONG * PSAM_ENUMERATE_HANDLE

Definition at line 10 of file ntsam.h.

typedef PVOID * PSAM_HANDLE

Definition at line 9 of file ntsam.h.

Definition at line 36 of file ntsam.h.

Definition at line 1302 of file ntsam.h.

typedef ULONG SAM_ENUMERATE_HANDLE

Definition at line 10 of file ntsam.h.

typedef PVOID SAM_HANDLE

Definition at line 9 of file ntsam.h.

Definition at line 36 of file ntsam.h.

Definition at line 1302 of file ntsam.h.

Enumeration Type Documentation

Enumerator:
AliasGeneralInformation 
AliasNameInformation 
AliasAdminCommentInformation 
AliasReplicationInformation 
AliasExtendedInformation 

Definition at line 675 of file ntsam.h.

Enumerator:
DomainDisplayUser 
DomainDisplayMachine 
DomainDisplayGroup 
DomainDisplayOemUser 
DomainDisplayOemGroup 
DomainDisplayServer 

Definition at line 319 of file ntsam.h.

Enumerator:
DomainPasswordInformation 
DomainGeneralInformation 
DomainLogoffInformation 
DomainOemInformation 
DomainNameInformation 
DomainReplicationInformation 
DomainServerRoleInformation 
DomainModifiedInformation 
DomainStateInformation 
DomainUasInformation 
DomainGeneralInformation2 
DomainLockoutInformation 
DomainModifiedInformation2 

Definition at line 176 of file ntsam.h.

Enumerator:
DomainLocalizableAccountsBasic 

Definition at line 371 of file ntsam.h.

Enumerator:
DomainPasswordSimple 
DomainPasswordComplex 

Definition at line 261 of file ntsam.h.

Enumerator:
DomainServerEnabled 
DomainServerDisabled 

Definition at line 193 of file ntsam.h.

Enumerator:
DomainServerRoleBackup 
DomainServerRolePrimary 

Definition at line 199 of file ntsam.h.

Enumerator:
GroupGeneralInformation 
GroupNameInformation 
GroupAttributeInformation 
GroupAdminCommentInformation 
GroupReplicationInformation 

Definition at line 520 of file ntsam.h.

Enumerator:
SamValidateAuthentication 
SamValidatePasswordChange 
SamValidatePasswordReset 

Definition at line 1592 of file ntsam.h.

Enumerator:
SamObjectUser 
SamObjectGroup 
SamObjectAlias 

Definition at line 1521 of file ntsam.h.

Enumerator:
SamObjectChangeNotificationOperation 

Definition at line 1697 of file ntsam.h.

Enumerator:
SamValidateSuccess 
SamValidatePasswordMustChange 
SamValidateAccountLockedOut 
SamValidatePasswordExpired 
SamValidatePasswordIncorrect 
SamValidatePasswordIsInHistory 
SamValidatePasswordTooShort 
SamValidatePasswordTooLong 
SamValidatePasswordNotComplexEnough 
SamValidatePasswordTooRecent 
SamValidatePasswordFilterError 

Definition at line 1625 of file ntsam.h.

Enumerator:
SecurityDbNew 
SecurityDbRename 
SecurityDbDelete 
SecurityDbChangeMemberAdd 
SecurityDbChangeMemberSet 
SecurityDbChangeMemberDel 
SecurityDbChange 
SecurityDbChangePassword 

Definition at line 1497 of file ntsam.h.

Enumerator:
SecurityDbObjectSamDomain 
SecurityDbObjectSamUser 
SecurityDbObjectSamGroup 
SecurityDbObjectSamAlias 
SecurityDbObjectLsaPolicy 
SecurityDbObjectLsaTDomain 
SecurityDbObjectLsaAccount 
SecurityDbObjectLsaSecret 

Definition at line 1509 of file ntsam.h.

Enumerator:
UserGeneralInformation 
UserPreferencesInformation 
UserLogonInformation 
UserLogonHoursInformation 
UserAccountInformation 
UserNameInformation 
UserAccountNameInformation 
UserFullNameInformation 
UserPrimaryGroupInformation 
UserHomeInformation 
UserScriptInformation 
UserProfileInformation 
UserAdminCommentInformation 
UserWorkStationsInformation 
UserSetPasswordInformation 
UserControlInformation 
UserExpiresInformation 
UserInternal1Information 
UserInternal2Information 
UserParametersInformation 
UserAllInformation 
UserInternal3Information 
UserInternal4Information 
UserInternal5Information 
UserInternal4InformationNew 
UserInternal5InformationNew 
UserInternal6Information 
UserExtendedInformation 
UserLogonUIInformation 

Definition at line 958 of file ntsam.h.

Function Documentation

_Check_return_ NTSTATUS NTAPI SamAddMemberToAlias ( _In_ SAM_HANDLE  AliasHandle,
_In_ PSID  MemberId 
)
_Check_return_ NTSTATUS NTAPI SamAddMemberToGroup ( _In_ SAM_HANDLE  GroupHandle,
_In_ ULONG  MemberId,
_In_ ULONG  Attributes 
)
_Check_return_ NTSTATUS NTAPI SamAddMultipleMembersToAlias ( _In_ SAM_HANDLE  AliasHandle,
_In_reads_(MemberCount) PSID *  MemberIds,
_In_ ULONG  MemberCount 
)
_Check_return_ NTSTATUS NTAPI SamChangePasswordUser ( _In_ SAM_HANDLE  UserHandle,
_In_ PUNICODE_STRING  OldPassword,
_In_ PUNICODE_STRING  NewPassword 
)
_Check_return_ NTSTATUS NTAPI SamChangePasswordUser2 ( _In_ PUNICODE_STRING  ServerName,
_In_ PUNICODE_STRING  UserName,
_In_ PUNICODE_STRING  OldPassword,
_In_ PUNICODE_STRING  NewPassword 
)
_Check_return_ NTSTATUS NTAPI SamChangePasswordUser3 ( _In_ PUNICODE_STRING  ServerName,
_In_ PUNICODE_STRING  UserName,
_In_ PUNICODE_STRING  OldPassword,
_In_ PUNICODE_STRING  NewPassword,
_Outptr_ PDOMAIN_PASSWORD_INFORMATION EffectivePasswordPolicy,
_Outptr_ PUSER_PWD_CHANGE_FAILURE_INFORMATION PasswordChangeFailureInfo 
)
NTSTATUS NTAPI SamCloseHandle ( _In_ SAM_HANDLE  SamHandle)
_Check_return_ NTSTATUS NTAPI SamConnect ( _In_opt_ PUNICODE_STRING  ServerName,
_Out_ PSAM_HANDLE  ServerHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ POBJECT_ATTRIBUTES  ObjectAttributes 
)
_Check_return_ NTSTATUS NTAPI SamCreateAliasInDomain ( _In_ SAM_HANDLE  DomainHandle,
_In_ PUNICODE_STRING  AccountName,
_In_ ACCESS_MASK  DesiredAccess,
_Out_ PSAM_HANDLE  AliasHandle,
_Out_ PULONG  RelativeId 
)
_Check_return_ NTSTATUS NTAPI SamCreateGroupInDomain ( _In_ SAM_HANDLE  DomainHandle,
_In_ PUNICODE_STRING  AccountName,
_In_ ACCESS_MASK  DesiredAccess,
_Out_ PSAM_HANDLE  GroupHandle,
_Out_ PULONG  RelativeId 
)
_Check_return_ NTSTATUS NTAPI SamCreateUser2InDomain ( _In_ SAM_HANDLE  DomainHandle,
_In_ PUNICODE_STRING  AccountName,
_In_ ULONG  AccountType,
_In_ ACCESS_MASK  DesiredAccess,
_Out_ PSAM_HANDLE  UserHandle,
_Out_ PULONG  GrantedAccess,
_Out_ PULONG  RelativeId 
)
_Check_return_ NTSTATUS NTAPI SamCreateUserInDomain ( _In_ SAM_HANDLE  DomainHandle,
_In_ PUNICODE_STRING  AccountName,
_In_ ACCESS_MASK  DesiredAccess,
_Out_ PSAM_HANDLE  UserHandle,
_Out_ PULONG  RelativeId 
)
_Check_return_ NTSTATUS NTAPI SamDeleteAlias ( _In_ SAM_HANDLE  AliasHandle)
_Check_return_ NTSTATUS NTAPI SamDeleteGroup ( _In_ SAM_HANDLE  GroupHandle)
_Check_return_ NTSTATUS NTAPI SamDeleteUser ( _In_ SAM_HANDLE  UserHandle)
_Check_return_ NTSTATUS NTAPI SamEnumerateAliasesInDomain ( _In_ SAM_HANDLE  DomainHandle,
_Inout_ PSAM_ENUMERATE_HANDLE  EnumerationContext,
_Outptr_ PVOID *  Buffer,
_In_ ULONG  PreferedMaximumLength,
_Out_ PULONG  CountReturned 
)
_Check_return_ NTSTATUS NTAPI SamEnumerateDomainsInSamServer ( _In_ SAM_HANDLE  ServerHandle,
_Inout_ PSAM_ENUMERATE_HANDLE  EnumerationContext,
_Outptr_ PVOID *  Buffer,
_In_ ULONG  PreferedMaximumLength,
_Out_ PULONG  CountReturned 
)
_Check_return_ NTSTATUS NTAPI SamEnumerateGroupsInDomain ( _In_ SAM_HANDLE  DomainHandle,
_Inout_ PSAM_ENUMERATE_HANDLE  EnumerationContext,
_Outptr_ PVOID *  Buffer,
_In_ ULONG  PreferedMaximumLength,
_Out_ PULONG  CountReturned 
)
_Check_return_ NTSTATUS NTAPI SamEnumerateUsersInDomain ( _In_ SAM_HANDLE  DomainHandle,
_Inout_ PSAM_ENUMERATE_HANDLE  EnumerationContext,
_In_ ULONG  UserAccountControl,
_Outptr_ PVOID *  Buffer,
_In_ ULONG  PreferedMaximumLength,
_Out_ PULONG  CountReturned 
)
NTSTATUS NTAPI SamFreeMemory ( _In_ PVOID  Buffer)
_Check_return_ NTSTATUS NTAPI SamGetAliasMembership ( _In_ SAM_HANDLE  DomainHandle,
_In_ ULONG  PassedCount,
_In_reads_(PassedCount) PSID *  Sids,
_Out_ PULONG  MembershipCount,
_Out_ _Deref_post_count_ *MembershipCount PULONG *  Aliases 
)
_Check_return_ NTSTATUS NTAPI SamGetCompatibilityMode ( _In_ SAM_HANDLE  ObjectHandle,
_Out_ ULONG *  Mode 
)
_Check_return_ NTSTATUS NTAPI SamGetDisplayEnumerationIndex ( _In_ SAM_HANDLE  DomainHandle,
_In_ DOMAIN_DISPLAY_INFORMATION  DisplayInformation,
_In_ PUNICODE_STRING  Prefix,
_Out_ PULONG  Index 
)
_Check_return_ NTSTATUS NTAPI SamGetGroupsForUser ( _In_ SAM_HANDLE  UserHandle,
_Out_ _Deref_post_count_ *MembershipCount PGROUP_MEMBERSHIP Groups,
_Out_ PULONG  MembershipCount 
)
_Check_return_ NTSTATUS NTAPI SamGetMembersInAlias ( _In_ SAM_HANDLE  AliasHandle,
_Out_ _Deref_post_count_ *MemberCount PSID **  MemberIds,
_Out_ PULONG  MemberCount 
)
_Check_return_ NTSTATUS NTAPI SamGetMembersInGroup ( _In_ SAM_HANDLE  GroupHandle,
_Out_ _Deref_post_count_ *MemberCount PULONG *  MemberIds,
_Out_ _Deref_post_count_ *MemberCount PULONG *  Attributes,
_Out_ PULONG  MemberCount 
)
_Check_return_ NTSTATUS NTAPI SamLookupDomainInSamServer ( _In_ SAM_HANDLE  ServerHandle,
_In_ PUNICODE_STRING  Name,
_Outptr_ PSID *  DomainId 
)
_Check_return_ NTSTATUS NTAPI SamLookupIdsInDomain ( _In_ SAM_HANDLE  DomainHandle,
_In_ ULONG  Count,
_In_reads_(Count) PULONG  RelativeIds,
_Out_ _Deref_post_count_(Count) PUNICODE_STRING Names,
_Out_ _Deref_post_opt_count_(Count) PSID_NAME_USE *  Use 
)
_Check_return_ NTSTATUS NTAPI SamLookupNamesInDomain ( _In_ SAM_HANDLE  DomainHandle,
_In_ ULONG  Count,
_In_reads_(Count) PUNICODE_STRING  Names,
_Out_ _Deref_post_count_(Count) PULONG *  RelativeIds,
_Out_ _Deref_post_count_(Count) PSID_NAME_USE *  Use 
)
_Check_return_ NTSTATUS NTAPI SamOpenAlias ( _In_ SAM_HANDLE  DomainHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ ULONG  AliasId,
_Out_ PSAM_HANDLE  AliasHandle 
)
_Check_return_ NTSTATUS NTAPI SamOpenDomain ( _In_ SAM_HANDLE  ServerHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ PSID  DomainId,
_Out_ PSAM_HANDLE  DomainHandle 
)
_Check_return_ NTSTATUS NTAPI SamOpenGroup ( _In_ SAM_HANDLE  DomainHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ ULONG  GroupId,
_Out_ PSAM_HANDLE  GroupHandle 
)
_Check_return_ NTSTATUS NTAPI SamOpenUser ( _In_ SAM_HANDLE  DomainHandle,
_In_ ACCESS_MASK  DesiredAccess,
_In_ ULONG  UserId,
_Out_ PSAM_HANDLE  UserHandle 
)
_Check_return_ NTSTATUS NTAPI SamPerformGenericOperation ( _In_opt_ PWSTR  ServerName,
_In_ SAM_GENERIC_OPERATION_TYPE  OperationType,
_In_ PSAM_GENERIC_OPERATION_INPUT  OperationIn,
_Out_ PSAM_GENERIC_OPERATION_OUTPUT OperationOut 
)
_Check_return_ NTSTATUS NTAPI SamQueryDisplayInformation ( _In_ SAM_HANDLE  DomainHandle,
_In_ DOMAIN_DISPLAY_INFORMATION  DisplayInformation,
_In_ ULONG  Index,
_In_ ULONG  EntryCount,
_In_ ULONG  PreferredMaximumLength,
_In_ PULONG  TotalAvailable,
_Out_ PULONG  TotalReturned,
_Out_ PULONG  ReturnedEntryCount,
_Outptr_ PVOID *  SortedBuffer 
)
_Check_return_ NTSTATUS NTAPI SamQueryInformationAlias ( _In_ SAM_HANDLE  AliasHandle,
_In_ ALIAS_INFORMATION_CLASS  AliasInformationClass,
_Outptr_ PVOID *  Buffer 
)
_Check_return_ NTSTATUS NTAPI SamQueryInformationDomain ( _In_ SAM_HANDLE  DomainHandle,
_In_ DOMAIN_INFORMATION_CLASS  DomainInformationClass,
_Outptr_ PVOID *  Buffer 
)
_Check_return_ NTSTATUS NTAPI SamQueryInformationGroup ( _In_ SAM_HANDLE  GroupHandle,
_In_ GROUP_INFORMATION_CLASS  GroupInformationClass,
_Outptr_ PVOID *  Buffer 
)
_Check_return_ NTSTATUS NTAPI SamQueryInformationUser ( _In_ SAM_HANDLE  UserHandle,
_In_ USER_INFORMATION_CLASS  UserInformationClass,
_Outptr_ PVOID *  Buffer 
)
_Check_return_ NTSTATUS NTAPI SamQueryLocalizableAccountsInDomain ( _In_ SAM_HANDLE  Domain,
_In_ ULONG  Flags,
_In_ ULONG  LanguageId,
_In_ DOMAIN_LOCALIZABLE_ACCOUNTS_INFORMATION  Class,
_Outptr_ PVOID *  Buffer 
)
_Check_return_ NTSTATUS NTAPI SamQuerySecurityObject ( _In_ SAM_HANDLE  ObjectHandle,
_In_ SECURITY_INFORMATION  SecurityInformation,
_Outptr_ PSECURITY_DESCRIPTOR *  SecurityDescriptor 
)
_Check_return_ NTSTATUS NTAPI SamRegisterObjectChangeNotification ( _In_ SECURITY_DB_OBJECT_TYPE  ObjectType,
_In_ HANDLE  NotificationEventHandle 
)
_Check_return_ NTSTATUS NTAPI SamRemoveMemberFromAlias ( _In_ SAM_HANDLE  AliasHandle,
_In_ PSID  MemberId 
)
_Check_return_ NTSTATUS NTAPI SamRemoveMemberFromForeignDomain ( _In_ SAM_HANDLE  DomainHandle,
_In_ PSID  MemberId 
)
_Check_return_ NTSTATUS NTAPI SamRemoveMemberFromGroup ( _In_ SAM_HANDLE  GroupHandle,
_In_ ULONG  MemberId 
)
_Check_return_ NTSTATUS NTAPI SamRemoveMultipleMembersFromAlias ( _In_ SAM_HANDLE  AliasHandle,
_In_reads_(MemberCount) PSID *  MemberIds,
_In_ ULONG  MemberCount 
)
_Check_return_ NTSTATUS NTAPI SamRidToSid ( _In_ SAM_HANDLE  ObjectHandle,
_In_ ULONG  Rid,
_Outptr_ PSID *  Sid 
)
_Check_return_ NTSTATUS NTAPI SamSetInformationAlias ( _In_ SAM_HANDLE  AliasHandle,
_In_ ALIAS_INFORMATION_CLASS  AliasInformationClass,
_In_ PVOID  Buffer 
)
_Check_return_ NTSTATUS NTAPI SamSetInformationDomain ( _In_ SAM_HANDLE  DomainHandle,
_In_ DOMAIN_INFORMATION_CLASS  DomainInformationClass,
_In_ PVOID  DomainInformation 
)
_Check_return_ NTSTATUS NTAPI SamSetInformationGroup ( _In_ SAM_HANDLE  GroupHandle,
_In_ GROUP_INFORMATION_CLASS  GroupInformationClass,
_In_ PVOID  Buffer 
)
_Check_return_ NTSTATUS NTAPI SamSetInformationUser ( _In_ SAM_HANDLE  UserHandle,
_In_ USER_INFORMATION_CLASS  UserInformationClass,
_In_ PVOID  Buffer 
)
_Check_return_ NTSTATUS NTAPI SamSetMemberAttributesOfGroup ( _In_ SAM_HANDLE  GroupHandle,
_In_ ULONG  MemberId,
_In_ ULONG  Attributes 
)
_Check_return_ NTSTATUS NTAPI SamSetSecurityObject ( _In_ SAM_HANDLE  ObjectHandle,
_In_ SECURITY_INFORMATION  SecurityInformation,
_In_ PSECURITY_DESCRIPTOR  SecurityDescriptor 
)
_Check_return_ NTSTATUS NTAPI SamShutdownSamServer ( _In_ SAM_HANDLE  ServerHandle)
NTSTATUS NTAPI SamUnregisterObjectChangeNotification ( _In_ SECURITY_DB_OBJECT_TYPE  ObjectType,
_In_ HANDLE  NotificationEventHandle 
)
_Check_return_ NTSTATUS NTAPI SamValidatePassword ( _In_opt_ PUNICODE_STRING  ServerName,
_In_ PASSWORD_POLICY_VALIDATION_TYPE  ValidationType,
_In_ PSAM_VALIDATE_INPUT_ARG  InputArg,
_Out_ PSAM_VALIDATE_OUTPUT_ARG OutputArg 
)