kernel32: Add a define for UNICODE_STRING_MAX_CHARS.

This commit is contained in:
Paul Vriens 2009-12-14 13:58:24 +01:00 committed by Alexandre Julliard
parent 9db754fe10
commit 4d6b74758f
2 changed files with 4 additions and 2 deletions

View file

@ -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);

View file

@ -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))