[NETAPI32]
authorEric Kohl <eric.kohl@reactos.org>
Sun, 23 Dec 2012 18:59:40 +0000 (18:59 +0000)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 23 Dec 2012 18:59:40 +0000 (18:59 +0000)
Ooops! These are needed too!

svn path=/trunk/; revision=57981

reactos/include/ddk/ntsam.h
reactos/include/reactos/idl/sam.idl

index cb0af84..9a8c3a1 100644 (file)
@@ -187,6 +187,11 @@ extern "C" {
 #define USER_PARTIAL_SECRETS_ACCOUNT                0x00100000
 #define USER_USE_AES_KEYS                           0x00200000
 
+/* Constants uses by LOGON_HOURS.UnitsPerWeek */
+#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)
+
 
 typedef PVOID SAM_HANDLE, *PSAM_HANDLE;
 typedef ULONG SAM_ENUMERATE_HANDLE, *PSAM_ENUMERATE_HANDLE;
@@ -277,6 +282,12 @@ typedef struct _GROUP_MEMBERSHIP
     ULONG Attributes;
 } GROUP_MEMBERSHIP, *PGROUP_MEMBERSHIP;
 
+typedef struct _LOGON_HOURS
+{
+    USHORT UnitsPerWeek;
+    PUCHAR LogonHours;
+} LOGON_HOURS, *PLOGON_HOURS;
+
 typedef enum _USER_INFORMATION_CLASS
 {
     UserGeneralInformation = 1,
@@ -310,12 +321,139 @@ typedef enum _USER_INFORMATION_CLASS
     UserLogonUIInformation,
 } USER_INFORMATION_CLASS, *PUSER_INFORMATION_CLASS;
 
+typedef struct _USER_GENERAL_INFORMATION
+{
+    UNICODE_STRING UserName;
+    UNICODE_STRING FullName;
+    ULONG PrimaryGroupId;
+    UNICODE_STRING AdminComment;
+    UNICODE_STRING UserComment;
+} USER_GENERAL_INFORMATION, *PUSER_GENERAL_INFORMATION;
+
+typedef struct _USER_PREFERENCES_INFORMATION
+{
+    UNICODE_STRING UserComment;
+    UNICODE_STRING Reserved1;
+    USHORT CountryCode;
+    USHORT CodePage;
+} USER_PREFERENCES_INFORMATION, *PUSER_PREFERENCES_INFORMATION;
+
+#include "pshpack4.h"
+typedef struct _USER_LOGON_INFORMATION
+{
+    UNICODE_STRING UserName;
+    UNICODE_STRING FullName;
+    ULONG UserId;
+    ULONG PrimaryGroupId;
+    UNICODE_STRING HomeDirectory;
+    UNICODE_STRING HomeDirectoryDrive;
+    UNICODE_STRING ScriptPath;
+    UNICODE_STRING ProfilePath;
+    UNICODE_STRING WorkStations;
+    LARGE_INTEGER LastLogon;
+    LARGE_INTEGER LastLogoff;
+    LARGE_INTEGER PasswordLastSet;
+    LARGE_INTEGER PasswordCanChange;
+    LARGE_INTEGER PasswordMustChange;
+    LOGON_HOURS LogonHours;
+    USHORT BadPasswordCount;
+    USHORT LogonCount;
+    ULONG UserAccountControl;
+} USER_LOGON_INFORMATION, *PUSER_LOGON_INFORMATION;
+#include "poppack.h"
+
+typedef struct _USER_LOGON_HOURS_INFORMATION
+{
+    LOGON_HOURS LogonHours;
+} USER_LOGON_HOURS_INFORMATION, *PUSER_LOGON_HOURS_INFORMATION;
+
+#include "pshpack4.h"
+typedef struct _USER_ACCOUNT_INFORMATION
+{
+    UNICODE_STRING UserName;
+    UNICODE_STRING FullName;
+    ULONG UserId;
+    ULONG PrimaryGroupId;
+    UNICODE_STRING HomeDirectory;
+    UNICODE_STRING HomeDirectoryDrive;
+    UNICODE_STRING ScriptPath;
+    UNICODE_STRING ProfilePath;
+    UNICODE_STRING AdminComment;
+    UNICODE_STRING WorkStations;
+    LARGE_INTEGER LastLogon;
+    LARGE_INTEGER LastLogoff;
+    LOGON_HOURS LogonHours;
+    USHORT BadPasswordCount;
+    USHORT LogonCount;
+    LARGE_INTEGER PasswordLastSet;
+    LARGE_INTEGER AccountExpires;
+    ULONG UserAccountControl;
+} USER_ACCOUNT_INFORMATION, *PUSER_ACCOUNT_INFORMATION;
+#include "poppack.h"
+
+typedef struct _USER_NAME_INFORMATION
+{
+    UNICODE_STRING UserName;
+    UNICODE_STRING FullName;
+} USER_NAME_INFORMATION, *PUSER_NAME_INFORMATION;
+
+typedef struct _USER_ACCOUNT_NAME_INFORMATION
+{
+    UNICODE_STRING UserName;
+} USER_ACCOUNT_NAME_INFORMATION, *PUSER_ACCOUNT_NAME_INFORMATION;
+
+typedef struct _USER_FULL_NAME_INFORMATION
+{
+    UNICODE_STRING FullName;
+} USER_FULL_NAME_INFORMATION, *PUSER_FULL_NAME_INFORMATION;
+
+typedef struct _USER_PRIMARY_GROUP_INFORMATION
+{
+    ULONG PrimaryGroupId;
+} USER_PRIMARY_GROUP_INFORMATION, *PUSER_PRIMARY_GROUP_INFORMATION;
+
+typedef struct _USER_HOME_INFORMATION
+{
+    UNICODE_STRING HomeDirectory;
+    UNICODE_STRING HomeDirectoryDrive;
+} USER_HOME_INFORMATION, *PUSER_HOME_INFORMATION;
+
+typedef struct _USER_SCRIPT_INFORMATION
+{
+    UNICODE_STRING ScriptPath;
+} USER_SCRIPT_INFORMATION, *PUSER_SCRIPT_INFORMATION;
+
+typedef struct _USER_PROFILE_INFORMATION
+{
+    UNICODE_STRING ProfilePath;
+} USER_PROFILE_INFORMATION, *PUSER_PROFILE_INFORMATION;
+
+typedef struct _USER_ADMIN_COMMENT_INFORMATION
+{
+    UNICODE_STRING AdminComment;
+} USER_ADMIN_COMMENT_INFORMATION, *PUSER_ADMIN_COMMENT_INFORMATION;
+
+typedef struct _USER_WORKSTATIONS_INFORMATION
+{
+    UNICODE_STRING WorkStations;
+} USER_WORKSTATIONS_INFORMATION, *PUSER_WORKSTATIONS_INFORMATION;
+
 typedef struct _USER_SET_PASSWORD_INFORMATION
 {
     UNICODE_STRING Password;
     BOOLEAN PasswordExpired;
 } USER_SET_PASSWORD_INFORMATION, *PUSER_SET_PASSWORD_INFORMATION;
 
+typedef struct _USER_CONTROL_INFORMATION
+{
+    ULONG UserAccountControl;
+} USER_CONTROL_INFORMATION, *PUSER_CONTROL_INFORMATION;
+
+
+#define SAM_SID_COMPATIBILITY_ALL    0
+#define SAM_SID_COMPATIBILITY_LAX    1
+#define SAM_SID_COMPATIBILITY_STRICT 2
+
 
 NTSTATUS
 NTAPI
@@ -436,6 +574,11 @@ SamGetAliasMembership(IN SAM_HANDLE DomainHandle,
                       OUT PULONG MembershipCount,
                       OUT PULONG *Aliases);
 
+NTSTATUS
+NTAPI
+SamGetCompatibilityMode(IN SAM_HANDLE ObjectHandle,
+                        OUT PULONG Mode);
+
 NTSTATUS
 NTAPI
 SamGetGroupsForUser(IN SAM_HANDLE UserHandle,
index 96f1640..dbecb57 100644 (file)
@@ -447,6 +447,7 @@ typedef struct _SAMPR_ENCRYPTED_USER_PASSWORD_NEW
     unsigned char Buffer[(256 * 2) + 4 + 16];
 } SAMPR_ENCRYPTED_USER_PASSWORD_NEW, *PSAMPR_ENCRYPTED_USER_PASSWORD_NEW;
 
+cpp_quote("#ifndef _NTSAM_")
 typedef struct _USER_PRIMARY_GROUP_INFORMATION
 {
     unsigned long PrimaryGroupId;
@@ -456,6 +457,7 @@ typedef struct _USER_CONTROL_INFORMATION
 {
     unsigned long UserAccountControl;
 } USER_CONTROL_INFORMATION, *PUSER_CONTROL_INFORMATION;
+cpp_quote("#endif")
 
 typedef struct _USER_EXPIRES_INFORMATION
 {