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 /* 20 * General-purpose utility functions (wrappers around, 21 * or reimplementations of, Win32 APIs). 22 */ 23 24 INT 25 WINAPI 26 K32LoadStringW( 27 IN HINSTANCE hInstance OPTIONAL, 28 IN UINT uID, 29 OUT LPWSTR lpBuffer, 30 IN INT nBufferMax); 31 32 DWORD 33 WINAPI 34 FormatMessageSafeW( 35 IN DWORD dwFlags, 36 IN LPCVOID lpSource OPTIONAL, 37 IN DWORD dwMessageId, 38 IN DWORD dwLanguageId, 39 OUT LPWSTR lpBuffer, 40 IN DWORD nSize, 41 IN va_list *Arguments OPTIONAL); 42 43 BOOL 44 IsTTYHandle(IN HANDLE hHandle); 45 46 BOOL 47 IsConsoleHandle(IN HANDLE hHandle); 48 49 50 // #include <wincon.h> 51 52 53 #endif /* __UTILS_H__ */ 54