kernel32: Add a define for UNICODE_STRING_MAX_CHARS.
This commit is contained in:
parent
9db754fe10
commit
4d6b74758f
@ -364,8 +364,8 @@ DWORD WINAPI ExpandEnvironmentStringsW( LPCWSTR src, LPWSTR dst, DWORD len )
|
||||
RtlInitUnicodeString(&us_src, src);
|
||||
|
||||
/* make sure we don't overflow the maximum UNICODE_STRING size */
|
||||
if (len > 0x7fff)
|
||||
len = 0x7fff;
|
||||
if (len > UNICODE_STRING_MAX_CHARS)
|
||||
len = UNICODE_STRING_MAX_CHARS;
|
||||
|
||||
us_dst.Length = 0;
|
||||
us_dst.MaximumLength = len * sizeof(WCHAR);
|
||||
|
@ -617,6 +617,8 @@ typedef struct _MEMORY_BASIC_INFORMATION
|
||||
#define MAXWORD 0xffff
|
||||
#define MAXDWORD 0xffffffff
|
||||
|
||||
#define UNICODE_STRING_MAX_CHARS 32767
|
||||
|
||||
#define FIELD_OFFSET(type, field) \
|
||||
((LONG)(INT_PTR)&(((type *)0)->field))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user