ReactOS  0.4.14-dev-358-gbef841c
utils.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Console Utilities Library
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Base set of functions for loading string resources
5  * and message strings, and handle type identification.
6  * COPYRIGHT: Copyright 2017-2018 ReactOS Team
7  * Copyright 2017-2018 Hermes Belusca-Maito
8  */
9 
18 #ifndef __UTILS_H__
19 #define __UTILS_H__
20 
21 #pragma once
22 
23 #ifndef _UNICODE
24 #error The ConUtils library at the moment only supports compilation with _UNICODE defined!
25 #endif
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 INT
32 WINAPI
35  IN UINT uID,
36  IN LANGID LanguageId,
38  IN INT nBufferMax);
39 
40 INT
41 WINAPI
44  IN UINT uID,
46  IN INT nBufferMax);
47 
48 DWORD
49 WINAPI
52  IN LPCVOID lpSource OPTIONAL,
53  IN DWORD dwMessageId,
54  IN DWORD dwLanguageId,
56  IN DWORD nSize,
57  IN va_list *Arguments OPTIONAL);
58 
59 BOOL
60 IsTTYHandle(IN HANDLE hHandle);
61 
62 BOOL
63 IsConsoleHandle(IN HANDLE hHandle);
64 
65 
66 // #include <wincon.h>
67 
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif /* __UTILS_H__ */
74 
75 /* EOF */
#define IN
Definition: typedefs.h:38
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2031
WORD LANGID
Definition: typedefs.h:79
int32_t INT
Definition: typedefs.h:56
HINSTANCE hInstance
Definition: charmap.c:20
DWORD WINAPI FormatMessageSafeW(IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId, OUT LPWSTR lpBuffer, IN DWORD nSize, IN va_list *Arguments OPTIONAL)
Definition: utils.c:254
unsigned int BOOL
Definition: ntddk_ex.h:94
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
char * va_list
Definition: acmsvcex.h:78
BOOL IsConsoleHandle(IN HANDLE hHandle)
Definition: utils.c:368
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL IsTTYHandle(IN HANDLE hHandle)
Definition: utils.c:342
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
unsigned int UINT
Definition: ndis.h:50
INT WINAPI K32LoadStringW(IN HINSTANCE hInstance OPTIONAL, IN UINT uID, OUT LPWSTR lpBuffer, IN INT nBufferMax)
Definition: utils.c:173
INT WINAPI K32LoadStringExW(IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId, OUT LPWSTR lpBuffer, IN INT nBufferMax)
Definition: utils.c:99
CONST void * LPCVOID
Definition: windef.h:191
#define OUT
Definition: typedefs.h:39
WCHAR * LPWSTR
Definition: xmlstorage.h:184
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68