21#define TICKS_PER_DAY -864000000000LL
22#define TICKS_PER_MINUTE -600000000LL
41 SIZE_T DomainNameLength = 0;
44 DPRINT(
"SYSSETUP: SetAccountsDomainSid\n");
46 if (DomainName !=
NULL)
48 DomainNameLength =
wcslen(DomainName);
64 DPRINT(
"LsaOpenPolicy failed (Status: 0x%08lx)\n",
Status);
73 if (DomainName ==
NULL)
82 Info.DomainName.Length = DomainNameLength *
sizeof(
WCHAR);
83 Info.DomainName.MaximumLength =
Info.DomainName.Length +
sizeof(
WCHAR);
86 if (DomainSid ==
NULL)
89 Info.DomainSid = DomainSid;
94 Info.DomainName.Length = DomainNameLength *
sizeof(
WCHAR);
95 Info.DomainName.MaximumLength =
Info.DomainName.Length +
sizeof(
WCHAR);
96 Info.DomainSid = DomainSid;
104 DPRINT(
"LsaSetInformationPolicy failed (Status: 0x%08lx)\n",
Status);
107 if (OrigInfo !=
NULL)
133 DPRINT1(
"SamSetInformationDomain failed (Status: 0x%08lx)\n",
Status);
160 SIZE_T DomainNameLength = 0;
163 DPRINT1(
"SYSSETUP: SetPrimaryDomain()\n");
165 if (DomainName !=
NULL)
167 DomainNameLength =
wcslen(DomainName);
183 DPRINT(
"LsaOpenPolicy failed (Status: 0x%08lx)\n",
Status);
192 if (DomainName ==
NULL)
201 Info.Name.Length = DomainNameLength *
sizeof(
WCHAR);
205 if (DomainSid ==
NULL)
208 Info.Sid = DomainSid;
213 Info.Name.Length = DomainNameLength *
sizeof(
WCHAR);
215 Info.Sid = DomainSid;
223 DPRINT(
"LsaSetInformationPolicy failed (Status: 0x%08lx)\n",
Status);
226 if (OrigInfo !=
NULL)
241 LPWSTR BuiltinAccounts[] = {
259 DPRINT(
"InstallBuiltinAccounts()\n");
310 WCHAR szPrivilegeString[256];
311 WCHAR szSidString[256];
321 DPRINT(
"InstallPrivileges()\n");
340 DPRINT1(
"SetupFindFirstLineW failed\n");
356 DPRINT1(
"SetupGetStringFieldW() failed\n");
359 DPRINT(
"Privilege: %S\n", szPrivilegeString);
369 DPRINT1(
"SetupGetStringFieldW() failed\n");
372 DPRINT(
"SID: %S\n", szSidString);
377 if (szSidString[0] ==
L'*')
379 DPRINT(
"Account Sid: %S\n", &szSidString[1]);
389 DPRINT(
"Account name: %S\n", szSidString);
391 ReferencedDomains =
NULL;
400 if (ReferencedDomains !=
NULL)
407 DPRINT1(
"LsaLookupNames2() failed (Status 0x%08lx)\n",
Status);
421 (AccountSid !=
NULL) ? AccountSid : Sids[0].
Sid,
426 DPRINT1(
"LsaAddAccountRights() failed (Status %08lx)\n",
Status);
435 if (AccountSid !=
NULL)
447 if (PolicyHandle !=
NULL)
470 DPRINT(
"ApplyRegistryValues()\n");
477 DPRINT1(
"SetupFindFirstLineW failed\n");
493 DPRINT1(
"SetupGetStringFieldW() failed\n");
497 DPRINT(
"RegistryPath: %S\n", szRegistryPath);
499 Ptr1 =
wcschr(szRegistryPath,
L'\\');
500 Ptr2 =
wcsrchr(szRegistryPath,
L'\\');
501 if (Ptr1 !=
NULL && Ptr2 !=
NULL && Ptr1 != Ptr2)
513 wcscpy(szValueName, Ptr2);
515 DPRINT(
"RootName: %S\n", szRootName);
516 DPRINT(
"KeyName: %S\n", szKeyName);
517 DPRINT(
"ValueName: %S\n", szValueName);
519 if (
_wcsicmp(szRootName,
L"Machine") == 0)
525 DPRINT1(
"Unsupported root key %S\n", szRootName);
540 DPRINT1(
"Invalid value type %lu\n", dwType);
581 DPRINT1(
"Failed to determine the required buffer size!\n");
596 DPRINT1(
"Failed to create the key %S (Error %lu)\n", szKeyName, dwError);
669 DWORD dwValue, dwError;
672 DPRINT(
"ApplyEventlogSettings(%p %S %S)\n",
673 hSecurityInf, pszSectionName, pszLogName);
676 L"System\\CurrentControlSet\\Services\\Eventlog",
686 DPRINT1(
"Failed to create the Eventlog Service key (Error %lu)\n", dwError);
701 DPRINT1(
"Failed to create the key %S (Error %lu)\n", pszLogName, dwError);
714 DPRINT(
"MaximumLogSize\n");
720 DPRINT(
"MaximumLogSize: %lu (kByte)\n", dwValue);
721 if (dwValue >= 64 && dwValue <= 4194240)
725 DPRINT(
"MaxSize: %lu\n", dwValue);
739 L"AuditLogRetentionPeriod",
754 else if (dwValue == 1)
768 else if (dwValue == 2)
776 DPRINT(
"Retention: %lu\n", dwValue);
790 L"RestrictGuestAccess",
800 if (dwValue == 0 || dwValue == 1)
802 DPRINT(
"RestrictGuestAccess: %lu\n", dwValue);
804 L"RestrictGuestAccess",
837 DPRINT(
"ApplyPasswordSettings()\n");
848 DPRINT1(
"LsaOpenPolicy() failed (Status: 0x%08lx)\n",
Status);
857 DPRINT1(
"LsaQueryInformationPolicy() failed (Status: 0x%08lx)\n",
Status);
877 DPRINT1(
"SamOpenDomain() failed (Status: 0x%08lx)\n",
Status);
883 (
PVOID*)&PasswordInfo);
886 DPRINT1(
"SamQueryInformationDomain() failed (Status %08lx)\n",
Status);
893 L"MaximumPasswordAge",
898 DPRINT(
"Value: %ld\n", nValue);
903 else if ((nValue >= 1) && (nValue < 1000))
914 L"MinimumPasswordAge",
919 DPRINT(
"Wert: %ld\n", nValue);
920 if ((nValue >= 0) && (nValue < 1000))
932 L"MinimumPasswordLength",
937 DPRINT(
"Value: %ld\n", nValue);
938 if ((nValue >= 0) && (nValue <= 65535))
949 L"PasswordHistorySize",
954 DPRINT(
"Value: %ld\n", nValue);
955 if ((nValue >= 0) && (nValue <= 65535))
965 L"PasswordComplexity",
983 L"ClearTextPassword",
1006 DPRINT1(
"SamSetInformationDomain() failed (Status %08lx)\n",
Status);
1011 if (PasswordInfo !=
NULL)
1014 if (DomainHandle !=
NULL)
1017 if (ServerHandle !=
NULL)
1020 if (OrigInfo !=
NULL)
1023 if (PolicyHandle !=
NULL)
1044 DPRINT(
"ApplyLockoutSettings()\n");
1055 DPRINT1(
"LsaOpenPolicy() failed (Status: 0x%08lx)\n",
Status);
1061 (
PVOID *)&OrigInfo);
1064 DPRINT1(
"LsaQueryInformationPolicy() failed (Status: 0x%08lx)\n",
Status);
1084 DPRINT1(
"SamOpenDomain() failed (Status: 0x%08lx)\n",
Status);
1090 (
PVOID*)&LockoutInfo);
1093 DPRINT1(
"SamQueryInformationDomain() failed (Status %08lx)\n",
Status);
1113 L"ResetLockoutCount",
1136 else if ((nValue >= 0) && (nValue < 100000))
1148 DPRINT1(
"SamSetInformationDomain() failed (Status %08lx)\n",
Status);
1153 if (LockoutInfo !=
NULL)
1156 if (DomainHandle !=
NULL)
1159 if (ServerHandle !=
NULL)
1162 if (OrigInfo !=
NULL)
1165 if (PolicyHandle !=
NULL)
1180 DPRINT1(
"SetLsaAnonymousNameLookup()\n");
1184 L"LSAAnonymousNameLookup",
1220 DPRINT(
"EnableAccount()\n");
1230 DPRINT1(
"No valid integer value\n");
1234 DPRINT(
"Value: %d\n", nValue);
1242 DPRINT1(
"SamOpenUser() failed (Status: 0x%08lx)\n",
Status);
1248 (
PVOID*)&ControlInfo);
1251 DPRINT1(
"SamQueryInformationUser() failed (Status: 0x%08lx)\n",
Status);
1269 DPRINT1(
"SamSetInformationUser() failed (Status: 0x%08lx)\n",
Status);
1273 if (ControlInfo !=
NULL)
1276 if (UserHandle !=
NULL)
1297 DPRINT(
"SetNewAccountName()\n");
1316 if (pszName ==
NULL)
1318 DPRINT1(
"HeapAlloc() failed\n");
1328 DPRINT1(
"No valid string value\n");
1332 DPRINT(
"NewAccountName: '%S'\n", pszName);
1340 DPRINT1(
"SamOpenUser() failed (Status: 0x%08lx)\n",
Status);
1356 DPRINT1(
"SamSetInformationUser() failed (Status: 0x%08lx)\n",
Status);
1360 if (UserHandle !=
NULL)
1363 if (pszName !=
NULL)
1381 DPRINT(
"ApplyAccountSettings()\n");
1392 DPRINT1(
"LsaOpenPolicy() failed (Status: 0x%08lx)\n",
Status);
1398 (
PVOID *)&OrigInfo);
1401 DPRINT1(
"LsaQueryInformationPolicy() failed (Status: 0x%08lx)\n",
Status);
1421 DPRINT1(
"SamOpenDomain() failed (Status: 0x%08lx)\n",
Status);
1430 L"EnableAdminAccount",
1436 L"EnableGuestAccount",
1442 L"NewAdministratorName",
1453 if (DomainHandle !=
NULL)
1456 if (ServerHandle !=
NULL)
1459 if (OrigInfo !=
NULL)
1462 if (PolicyHandle !=
NULL)
1474 WCHAR szOptionName[256];
1481 DPRINT(
"ApplyAuditEvents(%p)\n", hSecurityInf);
1488 DPRINT1(
"SetupFindFirstLineW failed\n");
1506 if (AuditOptions ==
NULL)
1508 DPRINT1(
"Failed to allocate the auditiing options array!\n");
1525 DPRINT1(
"SetupGetStringFieldW() failed\n");
1529 DPRINT(
"Option: '%S'\n", szOptionName);
1535 DPRINT1(
"SetupGetStringFieldW() failed\n");
1539 DPRINT(
"Value: %d\n", nValue);
1543 DPRINT1(
"Invalid audit option!\n");
1547 if (
_wcsicmp(szOptionName,
L"AuditSystemEvents") == 0)
1551 else if (
_wcsicmp(szOptionName,
L"AuditLogonEvents") == 0)
1555 else if (
_wcsicmp(szOptionName,
L"AuditObjectAccess") == 0)
1559 else if (
_wcsicmp(szOptionName,
L"AuditPrivilegeUse") == 0)
1563 else if (
_wcsicmp(szOptionName,
L"AuditProcessTracking") == 0)
1567 else if (
_wcsicmp(szOptionName,
L"AuditPolicyChange") == 0)
1571 else if (
_wcsicmp(szOptionName,
L"AuditAccountManage") == 0)
1575 else if (
_wcsicmp(szOptionName,
L"AuditDSAccess") == 0)
1579 else if (
_wcsicmp(szOptionName,
L"AuditAccountLogon") == 0)
1585 DPRINT1(
"Invalid auditing option '%S'\n", szOptionName);
1595 DPRINT1(
"LsaSetInformationPolicy() failed (Status 0x%08lx)\n",
Status);
1599 if (AuditOptions !=
NULL)
1602 if (PolicyHandle !=
NULL)
1610 PWSTR pszSecurityInf;
1616 pszSecurityInf =
L"defltwk.inf";
1653 PWSTR pszSecurityInf;
1658 pszSecurityInf =
L"defltwk.inf";
1715 DPRINT1(
"LsaOpenPolicy() failed (Status: 0x%08lx)\n",
Status);
1721 (
PVOID *)&OrigInfo);
1724 DPRINT1(
"LsaQueryInformationPolicy() failed (Status: 0x%08lx)\n",
Status);
1744 DPRINT1(
"SamOpenDomain() failed (Status: 0x%08lx)\n",
Status);
1766 DPRINT1(
"SamSetInformationUser() failed (Status %08lx)\n",
Status);
1772 (
PVOID*)&AccountNameInfo);
1775 DPRINT1(
"SamQueryInformationUser() failed (Status 0x%08lx)\n",
Status);
1806 if (AccountNameInfo !=
NULL)
1809 if (OrigInfo !=
NULL)
1812 if (PolicyHandle !=
NULL)
1815 if (UserHandle !=
NULL)
1818 if (DomainHandle !=
NULL)
1821 if (ServerHandle !=
NULL)
1824 DPRINT1(
"SYSSETUP: SetAdministratorPassword() done (Status %08lx)\n",
Status);
1833 WCHAR szAutoAdminLogon[2];
1840 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
1852 (
LPBYTE)szAutoAdminLogon,
1857 if (
wcscmp(szAutoAdminLogon,
L"1") == 0)
1860 L"DefaultDomainName",
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
#define RegCloseKey(hKey)
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
NTSTATUS WINAPI LsaSetInformationPolicy(IN LSA_HANDLE PolicyHandle, IN POLICY_INFORMATION_CLASS InformationClass, IN PVOID Buffer)
NTSTATUS WINAPI LsaOpenPolicy(IN PLSA_UNICODE_STRING SystemName OPTIONAL, IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE PolicyHandle)
NTSTATUS WINAPI LsaCreateAccount(IN LSA_HANDLE PolicyHandle, IN PSID AccountSid, IN ACCESS_MASK DesiredAccess, OUT PLSA_HANDLE AccountHandle)
NTSTATUS WINAPI LsaQueryInformationPolicy(IN LSA_HANDLE PolicyHandle, IN POLICY_INFORMATION_CLASS InformationClass, OUT PVOID *Buffer)
NTSTATUS WINAPI LsaLookupNames2(IN LSA_HANDLE PolicyHandle, IN ULONG Flags, IN ULONG Count, IN PLSA_UNICODE_STRING Names, OUT PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains, OUT PLSA_TRANSLATED_SID2 *Sids)
NTSTATUS WINAPI LsaAddAccountRights(IN LSA_HANDLE PolicyHandle, IN PSID AccountSid, IN PLSA_UNICODE_STRING UserRights, IN ULONG CountOfRights)
NTSTATUS WINAPI LsaFreeMemory(IN PVOID Buffer)
NTSTATUS WINAPI LsaClose(IN LSA_HANDLE ObjectHandle)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
static DWORD DWORD * dwLength
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
LONG WINAPI SetupGetLineCountW(HINF hinf, PCWSTR section)
VOID SetAutoAdminLogon(VOID)
static VOID ApplyAuditEvents(_In_ HINF hSecurityInf)
NTSTATUS SetAdministratorPassword(LPCWSTR Password)
LONG CountSecuritySteps(VOID)
static VOID ApplyLockoutSettings(_In_ HINF hSecurityInf, _In_ PWSTR pszSectionName)
static NTSTATUS SetPrimaryDomain(LPCWSTR DomainName, PSID DomainSid)
static VOID ApplyRegistryValues(_In_ HINF hSecurityInf, _In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify)
static VOID InstallPrivileges(_In_ HINF hSecurityInf, _In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify)
static VOID ApplyAccountSettings(_In_ HINF hSecurityInf, _In_ PWSTR pszSectionName)
static VOID EnableAccount(_In_ HINF hSecurityInf, _In_ PWSTR pszSectionName, _In_ PWSTR pszValueName, _In_ SAM_HANDLE DomainHandle, _In_ DWORD dwAccountRid)
DWORD InstallSecurity(_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify)
static VOID ApplyPasswordSettings(_In_ HINF hSecurityInf, _In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ PWSTR pszSectionName)
static VOID InstallBuiltinAccounts(_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify)
static VOID ApplyEventlogSettings(_In_ HINF hSecurityInf, _In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ PWSTR pszSectionName, _In_ PWSTR pszLogName)
static VOID SetLsaAnonymousNameLookup(_In_ HINF hSecurityInf, _In_ PWSTR pszSectionName)
NTSTATUS WINAPI SetAccountsDomainSid(PSID DomainSid, LPCWSTR DomainName)
static VOID SetNewAccountName(_In_ HINF hSecurityInf, _In_ PWSTR pszSectionName, _In_ PWSTR pszValueName, _In_ SAM_HANDLE DomainHandle, _In_ DWORD dwAccountRid)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
HLOCAL NTAPI LocalFree(HLOCAL hMem)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define REG_OPTION_NON_VOLATILE
#define UNICODE_STRING_MAX_CHARS
#define USER_READ_GENERAL
@ DomainPasswordInformation
@ DomainLockoutInformation
#define USER_FORCE_PASSWORD_CHANGE
#define DOMAIN_WRITE_OTHER_PARAMETERS
#define USER_WRITE_ACCOUNT
#define USER_READ_ACCOUNT
#define DOMAIN_PASSWORD_STORE_CLEARTEXT
#define SAM_SERVER_LOOKUP_DOMAIN
@ UserAccountNameInformation
@ UserSetPasswordInformation
#define SAM_SERVER_CONNECT
#define DOMAIN_WRITE_PASSWORD_PARAMS
#define DOMAIN_READ_PASSWORD_PARAMETERS
#define DOMAIN_PASSWORD_COMPLEX
#define USER_ACCOUNT_DISABLED
#define POLICY_AUDIT_EVENT_NONE
@ PolicyAuditEventsInformation
@ PolicyPrimaryDomainInformation
@ PolicyAccountDomainInformation
#define POLICY_AUDIT_EVENT_UNCHANGED
#define POLICY_CREATE_ACCOUNT
struct _LSA_OBJECT_ATTRIBUTES LSA_OBJECT_ATTRIBUTES
#define POLICY_TRUST_ADMIN
@ AuditCategoryAccountManagement
@ AuditCategoryAccountLogon
@ AuditCategoryPolicyChange
@ AuditCategoryObjectAccess
@ AuditCategoryDirectoryServiceAccess
@ AuditCategoryDetailedTracking
@ AuditCategoryPrivilegeUse
#define POLICY_VIEW_LOCAL_INFORMATION
#define POLICY_SET_AUDIT_REQUIREMENTS
#define POLICY_LOOKUP_NAMES
NTSTATUS NTAPI SamQueryInformationUser(IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, OUT PVOID *Buffer)
NTSTATUS NTAPI SamQueryInformationDomain(IN SAM_HANDLE DomainHandle, IN DOMAIN_INFORMATION_CLASS DomainInformationClass, OUT PVOID *Buffer)
NTSTATUS NTAPI SamOpenUser(IN SAM_HANDLE DomainHandle, IN ACCESS_MASK DesiredAccess, IN ULONG UserId, OUT PSAM_HANDLE UserHandle)
NTSTATUS NTAPI SamSetInformationUser(IN SAM_HANDLE UserHandle, IN USER_INFORMATION_CLASS UserInformationClass, IN PVOID Buffer)
NTSTATUS NTAPI SamFreeMemory(IN PVOID Buffer)
NTSTATUS NTAPI SamConnect(IN OUT PUNICODE_STRING ServerName OPTIONAL, OUT PSAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
NTSTATUS NTAPI SamCloseHandle(IN SAM_HANDLE SamHandle)
NTSTATUS NTAPI SamOpenDomain(IN SAM_HANDLE ServerHandle, IN ACCESS_MASK DesiredAccess, IN PSID DomainId, OUT PSAM_HANDLE DomainHandle)
NTSTATUS NTAPI SamSetInformationDomain(IN SAM_HANDLE DomainHandle, IN DOMAIN_INFORMATION_CLASS DomainInformationClass, IN PVOID Buffer)
#define ConvertStringSidToSid
#define SetupGetStringField
#define SetupGetMultiSzField
LARGE_INTEGER LockoutObservationWindow
LARGE_INTEGER LockoutDuration
UNICODE_STRING DomainName
USHORT PasswordHistoryLength
LARGE_INTEGER MinPasswordAge
LARGE_INTEGER MaxPasswordAge
LSA_UNICODE_STRING DomainName
ULONG MaximumAuditEventCount
PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_PARAMETER
BOOL WINAPI SetupGetStringFieldW(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
BOOL WINAPI SetupFindFirstLineW(IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
BOOL WINAPI SetupGetIntField(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT INT *IntegerValue)
ULONG WINAPI SetupGetFieldCount(IN PINFCONTEXT Context)
BOOL WINAPI SetupFindNextLine(IN PINFCONTEXT ContextIn, OUT PINFCONTEXT ContextOut)
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
BOOL WINAPI SetupGetBinaryField(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PUCHAR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
DWORD WINAPI GetLastError(void)
#define HKEY_LOCAL_MACHINE
#define DOMAIN_USER_RID_ADMIN
#define DOMAIN_USER_RID_GUEST