b4e2ddb009d1884f0a06d64283a6c028f3c9baca
[reactos.git] / dll / win32 / advapi32 / misc / unicode.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: dll/win32/advapi32/misc/unicode.c
5 * PURPOSE: Unicode helper. Needed because RtlIsTextUnicode returns a
6 * BOOLEAN (byte) while IsTextUnicode returns a BOOL (long).
7 * The high bytes of the return value should be correctly set,
8 * hence a direct redirection cannot be done.
9 */
10
11 #include <advapi32.h>
12
13 WINE_DEFAULT_DEBUG_CHANNEL(advapi);
14
15 /**************************************************************************
16 * IsTextUnicode (ADVAPI32.@)
17 *
18 * Attempt to guess whether a text buffer is Unicode.
19 *
20 * PARAMS
21 * lpv [I] Text buffer to test
22 * iSize [I] Length of lpv
23 * lpiResult [O] Destination for test results
24 *
25 * RETURNS
26 * TRUE if the buffer is likely Unicode, FALSE otherwise.
27 */
28 BOOL WINAPI
29 IsTextUnicode(IN CONST VOID* lpv,
30 IN INT iSize,
31 IN OUT LPINT lpiResult OPTIONAL)
32 {
33 return (RtlIsTextUnicode(lpv, iSize, lpiResult) != FALSE);
34 }
35
36 /* EOF */