52063c25bf4ebe573c286b88bb5830b6ee26e49f
[reactos.git] / sdk / lib / conutils / utils.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Utilities Library
4 * FILE: sdk/lib/conutils/utils.h
5 * PURPOSE: Base set of functions for loading string resources
6 * and message strings, and handle type identification.
7 * PROGRAMMERS: - Hermes Belusca-Maito (for the library);
8 * - All programmers who wrote the different console applications
9 * from which I took those functions and improved them.
10 */
11
12 #ifndef __UTILS_H__
13 #define __UTILS_H__
14
15 #ifndef _UNICODE
16 #error The ConUtils library at the moment only supports compilation with _UNICODE defined!
17 #endif
18
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 /*
24 * General-purpose utility functions (wrappers around,
25 * or reimplementations of, Win32 APIs).
26 */
27
28 INT
29 WINAPI
30 K32LoadStringW(
31 IN HINSTANCE hInstance OPTIONAL,
32 IN UINT uID,
33 OUT LPWSTR lpBuffer,
34 IN INT nBufferMax);
35
36 DWORD
37 WINAPI
38 FormatMessageSafeW(
39 IN DWORD dwFlags,
40 IN LPCVOID lpSource OPTIONAL,
41 IN DWORD dwMessageId,
42 IN DWORD dwLanguageId,
43 OUT LPWSTR lpBuffer,
44 IN DWORD nSize,
45 IN va_list *Arguments OPTIONAL);
46
47 BOOL
48 IsTTYHandle(IN HANDLE hHandle);
49
50 BOOL
51 IsConsoleHandle(IN HANDLE hHandle);
52
53
54 // #include <wincon.h>
55
56
57 #ifdef __cplusplus
58 }
59 #endif
60 #endif /* __UTILS_H__ */