[NET][MC] Move NET USER strings from net.exe to netmsg.dll.
[reactos.git] / sdk / lib / conutils / utils.h
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
10 /**
11 * @file utils.h
12 * @ingroup ConUtils
13 *
14 * @brief General-purpose utility functions (wrappers around
15 * or reimplementations of Win32 APIs).
16 **/
17
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
33 K32LoadStringExW(
34 IN HINSTANCE hInstance OPTIONAL,
35 IN UINT uID,
36 IN LANGID LanguageId,
37 OUT LPWSTR lpBuffer,
38 IN INT nBufferMax);
39
40 INT
41 WINAPI
42 K32LoadStringW(
43 IN HINSTANCE hInstance OPTIONAL,
44 IN UINT uID,
45 OUT LPWSTR lpBuffer,
46 IN INT nBufferMax);
47
48 DWORD
49 WINAPI
50 FormatMessageSafeW(
51 IN DWORD dwFlags,
52 IN LPCVOID lpSource OPTIONAL,
53 IN DWORD dwMessageId,
54 IN DWORD dwLanguageId,
55 OUT LPWSTR lpBuffer,
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 */