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)
239 LPWSTR BuiltinAccounts[] = {
257 DPRINT(
"InstallBuiltinAccounts()\n");
301 WCHAR szPrivilegeString[256];
302 WCHAR szSidString[256];
312 DPRINT(
"InstallPrivileges()\n");
331 DPRINT1(
"SetupFindFirstLineW failed\n");
344 DPRINT1(
"SetupGetStringFieldW() failed\n");
347 DPRINT(
"Privilege: %S\n", szPrivilegeString);
357 DPRINT1(
"SetupGetStringFieldW() failed\n");
360 DPRINT(
"SID: %S\n", szSidString);
365 if (szSidString[0] ==
L'*')
367 DPRINT(
"Account Sid: %S\n", &szSidString[1]);
377 DPRINT(
"Account name: %S\n", szSidString);
379 ReferencedDomains =
NULL;
388 if (ReferencedDomains !=
NULL)
395 DPRINT1(
"LsaLookupNames2() failed (Status 0x%08lx)\n",
Status);
409 (AccountSid !=
NULL) ? AccountSid : Sids[0].
Sid,
414 DPRINT1(
"LsaAddAccountRights() failed (Status %08lx)\n",
Status);
423 if (AccountSid !=
NULL)
434 if (PolicyHandle !=
NULL)
455 DPRINT(
"ApplyRegistryValues()\n");
462 DPRINT1(
"SetupFindFirstLineW failed\n");
475 DPRINT1(
"SetupGetStringFieldW() failed\n");
479 DPRINT(
"RegistryPath: %S\n", szRegistryPath);
481 Ptr1 =
wcschr(szRegistryPath,
L'\\');
482 Ptr2 =
wcsrchr(szRegistryPath,
L'\\');
483 if (Ptr1 !=
NULL && Ptr2 !=
NULL && Ptr1 != Ptr2)
495 wcscpy(szValueName, Ptr2);
497 DPRINT(
"RootName: %S\n", szRootName);
498 DPRINT(
"KeyName: %S\n", szKeyName);
499 DPRINT(
"ValueName: %S\n", szValueName);
501 if (
_wcsicmp(szRootName,
L"Machine") == 0)
507 DPRINT1(
"Unsupported root key %S\n", szRootName);
522 DPRINT1(
"Invalid value type %lu\n", dwType);
563 DPRINT1(
"Failed to determine the required buffer size!\n");
578 DPRINT1(
"Failed to create the key %S (Error %lu)\n", szKeyName, dwError);
647 DWORD dwValue, dwError;
650 DPRINT(
"ApplyEventlogSettings(%p %S %S)\n",
651 hSecurityInf, pszSectionName, pszLogName);
654 L"System\\CurrentControlSet\\Services\\Eventlog",
664 DPRINT1(
"Failed to create the Eventlog Service key (Error %lu)\n", dwError);
679 DPRINT1(
"Failed to create the key %S (Error %lu)\n", pszLogName, dwError);
689 DPRINT(
"MaximumLogSize\n");
695 DPRINT(
"MaximumLogSize: %lu (kByte)\n", dwValue);
696 if (dwValue >= 64 && dwValue <= 4194240)
700 DPRINT(
"MaxSize: %lu\n", dwValue);
712 L"AuditLogRetentionPeriod",
724 else if (dwValue == 1)
738 else if (dwValue == 2)
746 DPRINT(
"Retention: %lu\n", dwValue);
758 L"RestrictGuestAccess",
765 if (dwValue == 0 || dwValue == 1)
767 DPRINT(
"RestrictGuestAccess: %lu\n", dwValue);
769 L"RestrictGuestAccess",
798 DPRINT(
"ApplyPasswordSettings()\n");
809 DPRINT1(
"LsaOpenPolicy() failed (Status: 0x%08lx)\n",
Status);
818 DPRINT1(
"LsaQueryInformationPolicy() failed (Status: 0x%08lx)\n",
Status);
838 DPRINT1(
"SamOpenDomain() failed (Status: 0x%08lx)\n",
Status);
844 (
PVOID*)&PasswordInfo);
847 DPRINT1(
"SamQueryInformationDomain() failed (Status %08lx)\n",
Status);
854 L"MaximumPasswordAge",
859 DPRINT(
"Value: %ld\n", nValue);
864 else if ((nValue >= 1) && (nValue < 1000))
875 L"MinimumPasswordAge",
880 DPRINT(
"Wert: %ld\n", nValue);
881 if ((nValue >= 0) && (nValue < 1000))
893 L"MinimumPasswordLength",
898 DPRINT(
"Value: %ld\n", nValue);
899 if ((nValue >= 0) && (nValue <= 65535))
910 L"PasswordHistorySize",
915 DPRINT(
"Value: %ld\n", nValue);
916 if ((nValue >= 0) && (nValue <= 65535))
926 L"PasswordComplexity",
944 L"ClearTextPassword",
967 DPRINT1(
"SamSetInformationDomain() failed (Status %08lx)\n",
Status);
972 if (PasswordInfo !=
NULL)
975 if (DomainHandle !=
NULL)
978 if (ServerHandle !=
NULL)
981 if (OrigInfo !=
NULL)
984 if (PolicyHandle !=
NULL)
1005 DPRINT(
"ApplyLockoutSettings()\n");
1016 DPRINT1(
"LsaOpenPolicy() failed (Status: 0x%08lx)\n",
Status);
1022 (
PVOID *)&OrigInfo);
1025 DPRINT1(
"LsaQueryInformationPolicy() failed (Status: 0x%08lx)\n",
Status);
1045 DPRINT1(
"SamOpenDomain() failed (Status: 0x%08lx)\n",
Status);
1051 (
PVOID*)&LockoutInfo);
1054 DPRINT1(
"SamQueryInformationDomain() failed (Status %08lx)\n",
Status);
1074 L"ResetLockoutCount",
1097 else if ((nValue >= 0) && (nValue < 100000))
1109 DPRINT1(
"SamSetInformationDomain() failed (Status %08lx)\n",
Status);
1114 if (LockoutInfo !=
NULL)
1117 if (DomainHandle !=
NULL)
1120 if (ServerHandle !=
NULL)
1123 if (OrigInfo !=
NULL)
1126 if (PolicyHandle !=
NULL)
1141 DPRINT1(
"SetLsaAnonymousNameLookup()\n");
1145 L"LSAAnonymousNameLookup",
1181 DPRINT(
"EnableAccount()\n");
1191 DPRINT1(
"No valid integer value\n");
1195 DPRINT(
"Value: %d\n", nValue);
1203 DPRINT1(
"SamOpenUser() failed (Status: 0x%08lx)\n",
Status);
1209 (
PVOID*)&ControlInfo);
1212 DPRINT1(
"SamQueryInformationUser() failed (Status: 0x%08lx)\n",
Status);
1230 DPRINT1(
"SamSetInformationUser() failed (Status: 0x%08lx)\n",
Status);
1234 if (ControlInfo !=
NULL)
1237 if (UserHandle !=
NULL)
1258 DPRINT(
"SetNewAccountName()\n");
1277 if (pszName ==
NULL)
1279 DPRINT1(
"HeapAlloc() failed\n");
1289 DPRINT1(
"No valid string value\n");
1293 DPRINT(
"NewAccountName: '%S'\n", pszName);
1301 DPRINT1(
"SamOpenUser() failed (Status: 0x%08lx)\n",
Status);
1317 DPRINT1(
"SamSetInformationUser() failed (Status: 0x%08lx)\n",
Status);
1321 if (UserHandle !=
NULL)
1324 if (pszName !=
NULL)
1342 DPRINT(
"ApplyAccountSettings()\n");
1353 DPRINT1(
"LsaOpenPolicy() failed (Status: 0x%08lx)\n",
Status);
1359 (
PVOID *)&OrigInfo);
1362 DPRINT1(
"LsaQueryInformationPolicy() failed (Status: 0x%08lx)\n",
Status);
1382 DPRINT1(
"SamOpenDomain() failed (Status: 0x%08lx)\n",
Status);
1391 L"EnableAdminAccount",
1397 L"EnableGuestAccount",
1403 L"NewAdministratorName",
1414 if (DomainHandle !=
NULL)
1417 if (ServerHandle !=
NULL)
1420 if (OrigInfo !=
NULL)
1423 if (PolicyHandle !=
NULL)
1435 WCHAR szOptionName[256];
1442 DPRINT(
"ApplyAuditEvents(%p)\n", hSecurityInf);
1449 DPRINT1(
"SetupFindFirstLineW failed\n");
1467 if (AuditOptions ==
NULL)
1469 DPRINT1(
"Failed to allocate the auditiing options array!\n");
1486 DPRINT1(
"SetupGetStringFieldW() failed\n");
1490 DPRINT(
"Option: '%S'\n", szOptionName);
1496 DPRINT1(
"SetupGetStringFieldW() failed\n");
1500 DPRINT(
"Value: %d\n", nValue);
1504 DPRINT1(
"Invalid audit option!\n");
1508 if (
_wcsicmp(szOptionName,
L"AuditSystemEvents") == 0)
1512 else if (
_wcsicmp(szOptionName,
L"AuditLogonEvents") == 0)
1516 else if (
_wcsicmp(szOptionName,
L"AuditObjectAccess") == 0)
1520 else if (
_wcsicmp(szOptionName,
L"AuditPrivilegeUse") == 0)
1524 else if (
_wcsicmp(szOptionName,
L"AuditProcessTracking") == 0)
1528 else if (
_wcsicmp(szOptionName,
L"AuditPolicyChange") == 0)
1532 else if (
_wcsicmp(szOptionName,
L"AuditAccountManage") == 0)
1536 else if (
_wcsicmp(szOptionName,
L"AuditDSAccess") == 0)
1540 else if (
_wcsicmp(szOptionName,
L"AuditAccountLogon") == 0)
1546 DPRINT1(
"Invalid auditing option '%S'\n", szOptionName);
1556 DPRINT1(
"LsaSetInformationPolicy() failed (Status 0x%08lx)\n",
Status);
1560 if (AuditOptions !=
NULL)
1563 if (PolicyHandle !=
NULL)
1572 PWSTR pszSecurityInf;
1577 pszSecurityInf =
L"defltwk.inf";
1632 DPRINT1(
"LsaOpenPolicy() failed (Status: 0x%08lx)\n",
Status);
1638 (
PVOID *)&OrigInfo);
1641 DPRINT1(
"LsaQueryInformationPolicy() failed (Status: 0x%08lx)\n",
Status);
1661 DPRINT1(
"SamOpenDomain() failed (Status: 0x%08lx)\n",
Status);
1683 DPRINT1(
"SamSetInformationUser() failed (Status %08lx)\n",
Status);
1689 (
PVOID*)&AccountNameInfo);
1692 DPRINT1(
"SamQueryInformationUser() failed (Status 0x%08lx)\n",
Status);
1723 if (AccountNameInfo !=
NULL)
1726 if (OrigInfo !=
NULL)
1729 if (PolicyHandle !=
NULL)
1732 if (UserHandle !=
NULL)
1735 if (DomainHandle !=
NULL)
1738 if (ServerHandle !=
NULL)
1741 DPRINT1(
"SYSSETUP: SetAdministratorPassword() done (Status %08lx)\n",
Status);
1750 WCHAR szAutoAdminLogon[2];
1757 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
1769 (
LPBYTE)szAutoAdminLogon,
1774 if (
wcscmp(szAutoAdminLogon,
L"1") == 0)
1777 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
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
VOID SetAutoAdminLogon(VOID)
static VOID InstallPrivileges(HINF hSecurityInf)
static VOID ApplyPasswordSettings(_In_ HINF hSecurityInf, _In_ PWSTR pszSectionName)
static VOID ApplyAuditEvents(_In_ HINF hSecurityInf)
static VOID InstallBuiltinAccounts(VOID)
NTSTATUS SetAdministratorPassword(LPCWSTR Password)
VOID InstallSecurity(VOID)
static VOID ApplyLockoutSettings(_In_ HINF hSecurityInf, _In_ PWSTR pszSectionName)
static NTSTATUS SetPrimaryDomain(LPCWSTR DomainName, PSID DomainSid)
static VOID ApplyRegistryValues(HINF hSecurityInf)
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)
static VOID SetLsaAnonymousNameLookup(_In_ HINF hSecurityInf, _In_ PWSTR pszSectionName)
static VOID ApplyEventlogSettings(_In_ HINF hSecurityInf, _In_ PWSTR pszSectionName, _In_ PWSTR pszLogName)
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)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
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
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#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