Reactos
at master 79 lines 1.5 kB view raw
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-2021 ReactOS Team 7 * Copyright 2017-2021 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 28extern "C" { 29#endif 30 31INT 32WINAPI 33K32LoadStringExW( 34 IN HINSTANCE hInstance OPTIONAL, 35 IN UINT uID, 36 IN LANGID LanguageId, 37 OUT LPWSTR lpBuffer, 38 IN INT nBufferMax); 39 40INT 41WINAPI 42K32LoadStringW( 43 IN HINSTANCE hInstance OPTIONAL, 44 IN UINT uID, 45 OUT LPWSTR lpBuffer, 46 IN INT nBufferMax); 47 48DWORD 49WINAPI 50FormatMessageSafeW( 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 59LANGID 60ConSetThreadUILanguage( 61 IN LANGID LangId OPTIONAL); 62 63BOOL 64IsTTYHandle(IN HANDLE hHandle); 65 66BOOL 67IsConsoleHandle(IN HANDLE hHandle); 68 69 70// #include <wincon.h> 71 72 73#ifdef __cplusplus 74} 75#endif 76 77#endif /* __UTILS_H__ */ 78 79/* EOF */