27 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
28 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
29 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
30 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
31 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
32 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
33 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
34 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0
38static const unsigned char UTF8Mask[6] = {0x7f, 0x1f, 0x0f, 0x07, 0x03, 0x01};
42 {0, 0x80, 0x800, 0x10000, 0x200000, 0x2000000, 0xFFFFFFFF};
97 DPRINT1(
"Failed to create basic NLS SD (Status 0x%08x)\n",
Status);
111 DPRINT1(
"Failed to create Admins SID (Status 0x%08x)\n",
Status);
122 DPRINT1(
"Failed to get DACL from descriptor (Status 0x%08x)\n",
Status);
134 DPRINT1(
"Failed to add allowed access ACE for Admins SID (Status 0x%08x)\n",
Status);
175 DPRINT1(
"Failed to create NLS directory security (Status 0x%08x)\n",
Status);
265 CurrentEntry = CurrentEntry->
Flink)
296 CHAR SectionName[40];
298 PBYTE SectionMapping;
324 sizeof(CodePage) /
sizeof(
WCHAR)))
337 sizeof(CodePage) /
sizeof(
WCHAR)))
346 if (CodePageEntry !=
NULL)
348 return CodePageEntry;
362 "\\Nls\\NlsSectionCP",
364 sizeof(SectionName)))
387 DPRINT1(
"CreateNlsSecurityDescriptor FAILED! (Status 0x%08x)\n",
Status);
454 if (SectionMapping ==
NULL)
462 if (CodePageEntry ==
NULL)
479 return CodePageEntry;
500 LPCSTR MbsEnd, MbsPtrSave;
501 UCHAR Char, TrailLength;
504 BOOL CharIsValid, StringIsValid =
TRUE;
505 const WCHAR InvalidChar = 0xFFFD;
514 if (WideCharCount == 0)
526 if ((Char & 0xC0) == 0x80)
529 StringIsValid =
FALSE;
534 if (TrailLength == 0)
536 StringIsValid =
FALSE;
542 WideChar = Char &
UTF8Mask[TrailLength];
548 CharIsValid = StringIsValid =
FALSE;
561 if (WideChar > 0xFFFF)
571 StringIsValid =
FALSE;
580 return WideCharCount;
590 *WideCharString++ = Char;
594 if ((Char & 0xC0) == 0x80)
596 *WideCharString++ = InvalidChar;
598 StringIsValid =
FALSE;
603 if (TrailLength == 0)
605 *WideCharString++ = InvalidChar;
606 StringIsValid =
FALSE;
612 WideChar = Char &
UTF8Mask[TrailLength];
618 CharIsValid = StringIsValid =
FALSE;
629 if (WideChar > 0xFFFF)
632 *WideCharString++ = 0xD800 | (WideChar >> 10);
636 if (
Count >= WideCharCount)
642 *WideCharString++ = 0xDC00 | (WideChar & 0x3FF);
646 *WideCharString++ = WideChar;
651 *WideCharString++ = InvalidChar;
653 StringIsValid =
FALSE;
659 *WideCharString = InvalidChar;
707 if (CodePageEntry ==
NULL)
738 while (TempString < MbsEnd)
745 if (((TempString + 1) == MbsEnd) || (*(TempString + 1) == 0))
764 WideChar = MultiByteTable[(
UCHAR)*TempString];
769 (WideChar >= 0xE000 && WideChar <= 0xF8FF))
781 if (WideCharCount == 0)
796 return WideCharCount;
807 *WideCharString++ = MultiByteTable[Char];
836 TempString++, TempLength--)
838 WideChar = MultiByteTable[(
UCHAR)*TempString];
843 (WideChar >= 0xE000 && WideChar <= 0xF8FF))
852 if (WideCharCount == 0)
853 return MultiByteCount;
856 for (TempLength = (WideCharCount < MultiByteCount) ? WideCharCount : MultiByteCount;
864 if (WideCharCount < MultiByteCount)
866 MultiByteCount = WideCharCount;
870 return MultiByteCount;
902 if (WideCharCount == 0)
904 return MultiByteCount;
907 WideCharMaxLen = WideCharCount > MultiByteCount ? MultiByteCount : WideCharCount;
914 WideCharString[
Count] = Char;
918 WideCharString[
Count] = Char + 0xf000;
921 if (MultiByteCount > WideCharMaxLen)
927 return WideCharMaxLen;
957 if (MultiByteCount == 0)
959 return WideCharCount;
962 MaxLen = MultiByteCount > WideCharCount ? WideCharCount : MultiByteCount;
965 Char = WideCharString[
Count];
972 if ((Char >= 0xf020) && (Char < 0xf100))
984 if (WideCharCount > MaxLen)
1021 if (MultiByteCount == 0)
1023 for (TempLength = 0; WideCharCount;
1024 WideCharCount--, WideCharString++)
1027 if (*WideCharString >= 0x80)
1030 if (*WideCharString >= 0x800)
1033 if (*WideCharString >= 0xd800 && *WideCharString < 0xdc00 &&
1034 WideCharCount >= 1 &&
1035 WideCharString[1] >= 0xdc00 && WideCharString[1] <= 0xe000)
1047 for (TempLength = MultiByteCount; WideCharCount; WideCharCount--, WideCharString++)
1049 Char = *WideCharString;
1077 if (Char >= 0xd800 && Char < 0xdc00 &&
1078 WideCharCount >= 1 &&
1079 WideCharString[1] >= 0xdc00 && WideCharString[1] < 0xe000)
1090 Char = (Char - 0xd800) << 10;
1091 Char |= *WideCharString - 0xdc00;
1094 ASSERT(Char <= 0x10ffff);
1118 return MultiByteCount - TempLength;
1203 if (CodePageEntry ==
NULL)
1216 if (
Flags || DefaultChar || UsedDefaultChar)
1218 BOOL TempUsedDefaultChar;
1223 if (!UsedDefaultChar)
1224 UsedDefaultChar = &TempUsedDefaultChar;
1226 *UsedDefaultChar =
FALSE;
1230 DefChar = DefaultChar[1] ? ((DefaultChar[0] << 8) | DefaultChar[1]) : DefaultChar[0];
1235 if (!MultiByteCount)
1237 for (TempLength = 0; WideCharCount; WideCharCount--, WideCharString++, TempLength++)
1244 DPRINT(
"WC_COMPOSITECHECK flag UNIMPLEMENTED\n");
1253 *UsedDefaultChar =
TRUE;
1265 for (TempLength = MultiByteCount;
1266 WideCharCount && TempLength;
1267 TempLength--, WideCharString++, WideCharCount--)
1274 DPRINT(
"WC_COMPOSITECHECK flag UNIMPLEMENTED\n");
1283 *UsedDefaultChar =
TRUE;
1290 if (TempLength == 1)
1307 return MultiByteCount - TempLength;
1311 if (!MultiByteCount)
1313 for (TempLength = 0; WideCharCount; WideCharCount--, WideCharString++, TempLength++)
1324 for (TempLength = MultiByteCount;
1325 WideCharCount && TempLength;
1326 TempLength--, WideCharString++, WideCharCount--)
1334 if (TempLength == 1)
1351 return MultiByteCount - TempLength;
1358 if (
Flags || DefaultChar || UsedDefaultChar)
1360 BOOL TempUsedDefaultChar;
1365 if (!UsedDefaultChar)
1366 UsedDefaultChar = &TempUsedDefaultChar;
1368 *UsedDefaultChar =
FALSE;
1371 if (!MultiByteCount)
1374 for (TempLength = 0; WideCharCount; TempLength++, WideCharString++, WideCharCount--)
1379 DPRINT(
"WC_COMPOSITECHECK flag UNIMPLEMENTED\n");
1382 if (!*UsedDefaultChar)
1394 DefChar = *DefaultChar;
1399 for (TempLength = MultiByteCount;
1400 WideCharCount && TempLength;
1406 DPRINT(
"WC_COMPOSITECHECK flag UNIMPLEMENTED\n");
1414 *UsedDefaultChar =
TRUE;
1425 return MultiByteCount - TempLength;
1429 if (!MultiByteCount)
1430 return WideCharCount;
1433 if (MultiByteCount < WideCharCount)
1436 WideCharCount = MultiByteCount;
1443 nReturn = WideCharCount;
1447 for (TempLength = WideCharCount; --TempLength >= 0; WideCharString++,
MultiByteString++)
1473 if (
Byte >= TableInfo->
LeadByte[
i] && Byte <= TableInfo->LeadByte[
i+1])
1559 WCHAR ValueNameBuffer[11];
1572 ValueName.MaximumLength =
sizeof(ValueNameBuffer);
1579 L"CurrentControlSet\\Control\\Nls\\CodePage");
1599 Kvpi, KvpiSize, &KvpiSize);
1635 if (CodePage == 0)
return FALSE;
1660 static const signed char base64_decoding_table[] =
1662 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1663 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1664 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
1665 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
1666 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1667 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
1668 -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
1669 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1
1675 DWORD byte_pair = 0;
1678 while (
src < source_end)
1683 if (
src >= source_end)
1700 signed char sextet = *
src;
1717 sextet = base64_decoding_table[sextet];
1727 byte_pair = (byte_pair << 6) | sextet;
1743 while (
src < source_end);
1801 MultiByteCount == 0 || WideCharCount < 0 ||
1802 (WideCharCount && (WideCharString ==
NULL ||
1810 if (MultiByteCount < 0)
1831 WideCharString, WideCharCount);
1851 static const BOOL directly_encodable_table[] =
1853 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
1854 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1855 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1,
1856 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,
1857 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1858 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
1859 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1860 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1863 return codepoint <= 0x7A ? directly_encodable_table[codepoint] :
FALSE;
1883 static const char base64_encoding_table[] =
1884 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1889 while (
src < source_end)
1917 DWORD byte_pair = 0;
1927 byte_pair = (byte_pair << 16) | *
src;
1951 byte_pair <<= (6 -
offset);
2028 for (
i = 0;
i < (
uID & 0x0F);
i++)
2058 DPRINT1(
"Resource not found: uID = %lu\n",
uID);
2080 if (CodePageEntry ==
NULL)
2094 DPRINT1(
"Invalid CP!: %lx\n", CodePage);
2159 if (CodePageEntry ==
NULL)
2161 DPRINT1(
"Could not get CodePage Entry! CodePageEntry = NULL\n");
2257 if (WideCharString ==
NULL ||
2258 WideCharCount == 0 ||
2268 if (WideCharCount < 0)
2270 WideCharCount =
lstrlenW(WideCharString) + 1;
2276 if (DefaultChar !=
NULL || UsedDefaultChar !=
NULL)
2291 if (DefaultChar !=
NULL || UsedDefaultChar !=
NULL)
2305 if ((DefaultChar!=
NULL) || (UsedDefaultChar!=
NULL))
2373 if (CodePageEntry !=
NULL)
2437 DPRINT1(
"Security descriptor size too small\n");
2445 0, 0, 0, 0, 0, 0, 0,
2449 DPRINT1(
"Failed to create World SID (Status 0x%08x)\n",
Status);
2458 DPRINT1(
"Failed to create security descriptor (Status 0x%08x)\n",
Status);
2478 DPRINT1(
"Failed to add allowed access ACE for World SID (Status 0x%08x)\n",
Status);
2486 DPRINT1(
"Failed to set DACL into descriptor (Status 0x%08x)\n",
Status);
NTSTATUS NTAPI NtCreateSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN PLARGE_INTEGER MaximumSize OPTIONAL, IN ULONG SectionPageProtection OPTIONAL, IN ULONG AllocationAttributes, IN HANDLE FileHandle OPTIONAL)
NTSTATUS NTAPI NtOpenSection(OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
static SID_IDENTIFIER_AUTHORITY NtAuthority
#define NLS_SIZEOF_ACE_AND_SIDS(n)
#define NLS_SECTION_SECURITY_DESCRIPTOR_SIZE
_In_ PFCB _In_ PCD_NAME DirName
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define ERROR_INSUFFICIENT_BUFFER
#define NT_SUCCESS(StatCode)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
LPVOID WINAPI LockResource(HGLOBAL handle)
HRSRC WINAPI FindResourceExW(HMODULE hModule, LPCWSTR type, LPCWSTR name, WORD lang)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
LCID WINAPI GetThreadLocale(void)
UINT WINAPI GetOEMCP(void)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
LCID WINAPI ConvertDefaultLocale(LCID lcid)
static INT WINAPI IntWideCharToMultiByteCP(UINT CodePage, DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount, LPCSTR DefaultChar, LPBOOL UsedDefaultChar)
BOOL WINAPI GetNLSVersion(IN NLS_FUNCTION Function, IN LCID Locale, IN OUT LPNLSVERSIONINFO lpVersionInformation)
static BOOL IntIsValidSBCSMapping(PCPTABLEINFO CodePageTable, DWORD Flags, WCHAR wch, UCHAR ch)
static const char UTF8Length[128]
static BOOL utf7_can_directly_encode(WCHAR codepoint)
BOOL WINAPI GetCPInfo(UINT CodePage, LPCPINFO CodePageInfo)
VOID FASTCALL NlsUninit(VOID)
BOOL WINAPI IsNLSDefinedString(IN NLS_FUNCTION Function, IN DWORD dwFlags, IN LPNLSVERSIONINFO lpVersionInformation, IN LPCWSTR lpString, IN INT cchStr)
VOID WINAPI NlsConvertIntegerToString(ULONG Value, ULONG Base, ULONG strsize, LPWSTR str, ULONG strsize2)
static INT WideCharToUtf7(const WCHAR *src, int srclen, char *dst, int dstlen)
BOOL WINAPI IsDBCSLeadByteEx(UINT CodePage, BYTE TestByte)
static BOOL utf7_write_c(char *dst, int dstlen, int *index, char character)
BOOL WINAPI ValidateLCType(int a1, unsigned int a2, int a3, int a4)
PCODEPAGE_ENTRY FASTCALL IntGetCodePageEntry(UINT CodePage)
UINT GetLocalisedText(IN UINT uID, IN LPWSTR lpszDest, IN UINT cchDest, IN LANGID lang)
BOOL WINAPI IsValidCodePage(UINT CodePage)
PCODEPAGE_ENTRY FASTCALL IntGetLoadedCodePageEntry(UINT CodePage)
BOOL WINAPI GetNLSVersionEx(IN NLS_FUNCTION function, IN LPCWSTR lpLocaleName, IN OUT LPNLSVERSIONINFOEX lpVersionInformation)
static CODEPAGE_ENTRY AnsiCodePage
ULONG WINAPI NlsGetCacheUpdateCount(VOID)
static const unsigned long UTF8LBound[]
UINT WINAPI SetCPGlobal(UINT CodePage)
static BOOL utf7_write_w(WCHAR *dst, int dstlen, int *index, WCHAR character)
BOOL WINAPI GetNlsSectionName(UINT CodePage, UINT Base, ULONG Unknown, LPSTR BaseName, LPSTR Result, ULONG ResultSize)
NTSTATUS WINAPI CreateNlsSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ SIZE_T DescriptorSize, _In_ ULONG AccessMask)
Creates a security descriptor for each NLS section. Typically used by BASESRV to give Everyone (World...
BOOL WINAPI IsValidUILanguage(LANGID langid)
BOOL FASTCALL NlsInit(VOID)
static INT WINAPI IntWideCharToMultiByteUTF8(UINT CodePage, DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount, LPCSTR DefaultChar, LPBOOL UsedDefaultChar)
static RTL_CRITICAL_SECTION CodePageListLock
VOID WINAPI GetLinguistLangSize(LPVOID lpUnknown)
BOOL WINAPI ValidateLocale(IN ULONG LocaleId)
static INT Utf7ToWideChar(const char *src, int srclen, WCHAR *dst, int dstlen)
static NTSTATUS CreateNlsDirectorySecurity(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ SIZE_T DescriptorSize)
Creates a security descriptor for the NLS object directory.
static BOOL IntIsValidDBCSMapping(PCPTABLEINFO CodePageTable, DWORD Flags, WCHAR wch, USHORT ch)
BOOL WINAPI GetCPFileNameFromRegistry(UINT CodePage, LPWSTR FileName, ULONG FileNameSize)
static INT WINAPI IntMultiByteToWideCharUTF8(DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
BOOL WINAPI NlsResetProcessLocale(VOID)
static CODEPAGE_ENTRY OemCodePage
static LIST_ENTRY CodePageListHead
static BOOL WINAPI IntIsLeadByte(PCPTABLEINFO TableInfo, BYTE Byte)
BOOL WINAPI GetCPInfoExA(UINT CodePage, DWORD dwFlags, LPCPINFOEXA lpCPInfoEx)
BOOL WINAPI GetCPInfoExW(UINT CodePage, DWORD dwFlags, LPCPINFOEXW lpCPInfoEx)
VOID WINAPI GetDefaultSortkeySize(LPVOID lpUnknown)
static INT WINAPI IntWideCharToMultiByteSYMBOL(DWORD Flags, LPCWSTR WideCharString, INT WideCharCount, LPSTR MultiByteString, INT MultiByteCount)
static INT WINAPI IntMultiByteToWideCharCP(UINT CodePage, DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
BOOL WINAPI IsDBCSLeadByte(BYTE TestByte)
static const unsigned char UTF8Mask[6]
static INT WINAPI IntMultiByteToWideCharSYMBOL(DWORD Flags, LPCSTR MultiByteString, INT MultiByteCount, LPWSTR WideCharString, INT WideCharCount)
_ACRTIMP size_t __cdecl strlen(const char *)
static SID_IDENTIFIER_AUTHORITY WorldAuthority
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
IN PDCB IN POEM_STRING IN PUNICODE_STRING UnicodeName
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
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
#define WC_COMPOSITECHECK
#define MB_ERR_INVALID_CHARS
#define WC_NO_BEST_FIT_CHARS
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define MAXIMUM_LEADBYTES
static const struct update_accum a1
static const struct update_accum a2
static const struct update_accum a3
static const struct update_accum a4
static DWORD LPDWORD LPCSTR DWORD srclen
#define InitializeObjectAttributes(p, n, a, r, s)
struct _SECURITY_DESCRIPTOR SECURITY_DESCRIPTOR
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
_In_ ACCESS_MASK AccessMask
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlCreateAcl(PACL Acl, ULONG AclSize, ULONG AclRevision)
_Out_ PCPTABLEINFO CodePageTable
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor(_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSYSAPI PVOID NTAPI RtlFreeSid(_In_ _Post_invalid_ PSID Sid)
NTSYSAPI NTSTATUS NTAPI RtlIntegerToChar(_In_ ULONG Value, _In_ ULONG Base, _In_ ULONG Length, _Out_ PCHAR String)
NTSYSAPI NTSTATUS NTAPI RtlGetDaclSecurityDescriptor(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN DaclPresent, _Out_ PACL *Dacl, _Out_ PBOOLEAN DaclDefaulted)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG DaclSize
_In_ BOOLEAN _In_opt_ PACL _In_opt_ BOOLEAN DaclDefaulted
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
#define DIRECTORY_CREATE_OBJECT
@ KeyValuePartialInformation
#define DIRECTORY_TRAVERSE
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI NtQueryValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
struct _KEY_VALUE_PARTIAL_INFORMATION KEY_VALUE_PARTIAL_INFORMATION
NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicodeString(ULONG Value, ULONG Base, PUNICODE_STRING String)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define DIRECTORY_ALL_ACCESS
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
#define FILE_GENERIC_READ
#define LOCALE_SYSTEM_DEFAULT
NTSYSAPI NTSTATUS NTAPI RtlAllocateAndInitializeSid(IN PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, IN UCHAR SubAuthorityCount, IN ULONG SubAuthority0, IN ULONG SubAuthority1, IN ULONG SubAuthority2, IN ULONG SubAuthority3, IN ULONG SubAuthority4, IN ULONG SubAuthority5, IN ULONG SubAuthority6, IN ULONG SubAuthority7, OUT PSID *Sid)
NTSTATUS NTAPI NtCreateDirectoryObject(OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
#define OBJ_CASE_INSENSITIVE
for(i=0;i< sizeof(testsuite)/sizeof(testsuite[0]);++i) ok(call_test(testsuite[i].func)
#define LANGIDFROMLCID(l)
#define SUBLANG_ENGLISH_US
#define STATUS_BUFFER_TOO_SMALL
CPTABLEINFO CodePageTable
UCHAR LeadByte[MAXIMUM_LEADBYTES]
USHORT MaximumCharacterSize
USHORT TransUniDefaultChar
struct _LIST_ENTRY * Flink
BYTE LeadByte[MAX_LEADBYTES]
BYTE DefaultChar[MAX_DEFAULTCHAR]
CHAR CodePageName[MAX_PATH]
WCHAR CodePageName[MAX_PATH]
_In_ SIZE_T DescriptorSize
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_OBJECT_PATH_NOT_FOUND
#define STATUS_UNSUCCESSFUL
#define STATUS_OBJECT_NAME_COLLISION
#define STATUS_OBJECT_NAME_NOT_FOUND
static const WCHAR lang[]
_Must_inspect_result_ _In_ WDFDEVICE _In_ PCUNICODE_STRING KeyName
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ PCUNICODE_STRING _In_ PCUNICODE_STRING _In_ LCID LocaleId
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
NTSYSAPI void WINAPI RtlInitCodePageTable(USHORT *, CPTABLEINFO *)
NTSYSAPI NTSTATUS WINAPI RtlAddAccessAllowedAce(PACL, DWORD, DWORD, PSID)
NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR, BOOLEAN, PACL, BOOLEAN)
#define ERROR_NO_UNICODE_TRANSLATION
#define ERROR_INVALID_FLAGS
_In_ DWORD _In_ int _In_ int _In_opt_ LPNLSVERSIONINFO lpVersionInformation
#define LOCALE_IDEFAULTANSICODEPAGE
#define LOCALE_IDEFAULTMACCODEPAGE
#define MAKEINTRESOURCEW(i)
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
_Must_inspect_result_ _In_ ULONG Flags
*BytesInMultiByteString PCHAR MultiByteString
#define SECURITY_BUILTIN_DOMAIN_RID
#define SECURITY_WORLD_SID_AUTHORITY
#define SECURITY_WORLD_RID
#define SECURITY_NT_AUTHORITY
#define SECURITY_DESCRIPTOR_REVISION
#define DOMAIN_ALIAS_RID_ADMINS