9#ifndef _STRALIGN_USE_SECURE_CRT
10#define _STRALIGN_USE_SECURE_CRT 0
18#if defined (__amd64__) || defined (__arm__)
19#define WSTR_ALIGNED(s) TRUE
21#define WSTR_ALIGNED(s) (((DWORD_PTR)(s) & 1) == 0)
26#define ua_CharUpperW CharUpperW
27#define ua_lstrcmpiW lstrcmpiW
28#define ua_lstrcmpW lstrcmpW
29#define ua_lstrlenW lstrlenW
30#define ua_wcschr wcschr
31#define ua_wcsicmp wcsicmp
32#define ua_wcslen wcslen
33#define ua_wcsrchr wcsrchr
36#if !defined (__CRT__NO_INLINE) && !defined (__CYGWIN__)
39#define ua_wcscpy wcscpy
45#define WSTR_ALIGNED(s) (((DWORD_PTR)(s) & (sizeof(WCHAR)-1))==0)
60#ifndef __CRT__NO_INLINE
78#ifndef __CRT__NO_INLINE
103#if defined(_WSTRING_DEFINED)
112#if defined(__cplusplus) && defined(_WConst_Return)
119#ifndef __CRT__NO_INLINE
128#if defined(__cplusplus) && defined(_WConst_Return)
152#ifndef __CRT__NO_INLINE
162#define __UA_WCSLEN ua_wcslen
165#define __UA_WSTRSIZE(s) ((__UA_WCSLEN(s)+1)*sizeof(WCHAR))
166#define __UA_STACKCOPY(p,s) memcpy(_alloca(s),p,s)
168#if defined (__amd64__) || defined (__arm__) || defined (_X86_)
169#define WSTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCWSTR)(s))
171#define WSTR_ALIGNED_STACK_COPY(d,s) { PCUWSTR __ua_src; ULONG __ua_size; PWSTR __ua_dst; __ua_src = (s); if(WSTR_ALIGNED(__ua_src)) { __ua_dst = (PWSTR)__ua_src; } else { __ua_size = __UA_WSTRSIZE(__ua_src); __ua_dst = (PWSTR)_alloca(__ua_size); memcpy(__ua_dst,__ua_src,__ua_size); } *(d) = (PCWSTR)__ua_dst; }
174#define ASTR_ALIGNED_STACK_COPY(d,s) (*(d) = (PCSTR)(s))
176#if !defined (_X86_) && !defined (__amd64__) && !defined (__arm__)
177#define __UA_STRUC_ALIGNED(t,s) (((DWORD_PTR)(s) & (TYPE_ALIGNMENT(t)-1))==0)
178#define STRUC_ALIGNED_STACK_COPY(t,s) __UA_STRUC_ALIGNED(t,s) ? ((t const *)(s)) : ((t const *)__UA_STACKCOPY((s),sizeof(t)))
180#define STRUC_ALIGNED_STACK_COPY(t,s) ((CONST t *)(s))
184#define TSTR_ALIGNED_STACK_COPY(d,s) WSTR_ALIGNED_STACK_COPY(d,s)
185#define TSTR_ALIGNED(x) WSTR_ALIGNED(x)
186#define ua_CharUpper ua_CharUpperW
187#define ua_lstrcmp ua_lstrcmpW
188#define ua_lstrcmpi ua_lstrcmpiW
189#define ua_lstrlen ua_lstrlenW
190#define ua_tcscpy ua_wcscpy
192#define TSTR_ALIGNED_STACK_COPY(d,s) ASTR_ALIGNED_STACK_COPY(d,s)
193#define TSTR_ALIGNED(x) TRUE
194#define ua_CharUpper CharUpperA
195#define ua_lstrcmp lstrcmpA
196#define ua_lstrcmpi lstrcmpiA
197#define ua_lstrlen lstrlenA
198#define ua_tcscpy strcpy
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
_In_ const STRING * String2
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
_Null_terminated_ WCHAR UNALIGNED * LPUWSTR
_Null_terminated_ CONST WCHAR UNALIGNED * LPCUWSTR
_Null_terminated_ WCHAR UNALIGNED * PUWSTR
_Null_terminated_ CONST WCHAR UNALIGNED * PCUWSTR
_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)
PUWSTR __cdecl uaw_wcschr(PCUWSTR String, WCHAR Character)
int WINAPI uaw_lstrcmpW(PCUWSTR String1, PCUWSTR String2)
int WINAPI uaw_lstrcmpiW(PCUWSTR String1, PCUWSTR String2)
PUWSTR __cdecl uaw_wcscpy(PUWSTR Destination, PCUWSTR Source)
size_t __cdecl uaw_wcslen(PCUWSTR String)
int WINAPI uaw_lstrlenW(LPCUWSTR String)
int __cdecl uaw_wcsicmp(PCUWSTR String1, PCUWSTR String2)
int ua_wcsicmp(LPCUWSTR String1, LPCUWSTR String2)
LPUWSTR WINAPI uaw_CharUpperW(LPUWSTR String)
PUWSTR __cdecl uaw_wcsrchr(PCUWSTR String, WCHAR Character)
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
LPWSTR WINAPI CharUpperW(_Inout_ LPWSTR)