diff --git a/winpr/include/winpr/stream.h b/winpr/include/winpr/stream.h index 730540e24..4a0005948 100644 --- a/winpr/include/winpr/stream.h +++ b/winpr/include/winpr/stream.h @@ -332,6 +332,38 @@ static INLINE BOOL Stream_SafeSeek(wStream* s, size_t size) return TRUE; } +static INLINE BOOL Stream_Read_UTF16_String(wStream* s, WCHAR* dst, size_t length) +{ + size_t x; + + if (!s || !dst) + return FALSE; + + if (Stream_GetRemainingLength(s) / sizeof(WCHAR) < length) + return FALSE; + + for (x=0; x