ReactOS  0.4.14-dev-358-gbef841c
unicode.c
Go to the documentation of this file.
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 /**************************************************************************
14  * IsTextUnicode (ADVAPI32.@)
15  *
16  * Attempt to guess whether a text buffer is Unicode.
17  *
18  * PARAMS
19  * lpv [I] Text buffer to test
20  * iSize [I] Length of lpv
21  * lpiResult [O] Destination for test results
22  *
23  * RETURNS
24  * TRUE if the buffer is likely Unicode, FALSE otherwise.
25  */
28  IN INT iSize,
29  IN OUT LPINT lpiResult OPTIONAL)
30 {
31  return (RtlIsTextUnicode(lpv, iSize, lpiResult) != FALSE);
32 }
33 
34 /* EOF */
#define IN
Definition: typedefs.h:38
int32_t INT
Definition: typedefs.h:56
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI IsTextUnicode(IN CONST VOID *lpv, IN INT iSize, IN OUT LPINT lpiResult OPTIONAL)
Definition: unicode.c:27
#define WINAPI
Definition: msvc.h:8
BOOLEAN NTAPI RtlIsTextUnicode(CONST VOID *buf, INT len, INT *pf)
Definition: unicode.c:1279
#define OUT
Definition: typedefs.h:39
#define CONST
Definition: pedump.c:81
int * LPINT
Definition: windef.h:178
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68