ReactOS 0.4.16-dev-336-gb667d82
|
General-purpose utility functions (wrappers around or reimplementations of Win32 APIs). More...
#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include <winuser.h>
#include <wincon.h>
#include <strsafe.h>
#include <pseh/pseh2.h>
#include "utils.h"
Go to the source code of this file.
Macros | |
#define | UNICODE |
#define | _UNICODE |
Functions | ||||||||||||||||||||||
K32LoadStringExW | ||||||||||||||||||||||
Loads a string resource from the executable file associated with a specified module, copies the string into a buffer, and appends a terminating null character. This is basically the LoadString() API ripped from user32.dll to remove any dependency of ConUtils from user32.dll, and to add support for loading strings from other languages than the current one.
| ||||||||||||||||||||||
INT WINAPI | K32LoadStringExW (IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId, OUT LPWSTR lpBuffer, IN INT nBufferMax) | |||||||||||||||||||||
K32LoadStringW | ||||||||||||||||||||||
Loads a string resource from the executable file associated with a specified module, copies the string into a buffer, and appends a terminating null character. This is a restricted version of K32LoadStringExW().
| ||||||||||||||||||||||
INT WINAPI | K32LoadStringW (IN HINSTANCE hInstance OPTIONAL, IN UINT uID, OUT LPWSTR lpBuffer, IN INT nBufferMax) | |||||||||||||||||||||
FormatMessageSafeW | ||||||||||||||||||||||
Loads and formats a message string. The function requires a message definition as input. The message definition can come from a buffer passed to the function. It can come from a message table resource in an already-loaded module, or the caller can ask the function to search the system's message table resource(s) for the message definition. Please refer to the Win32 FormatMessage() function for more details.
| ||||||||||||||||||||||
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) | |||||||||||||||||||||
ConSetThreadUILanguage | ||||||||||||||||||||||
Sets the current thread's user interface language. Mostly used by console applications for selecting a language identifier that best supports the NT Console. This function dynamically loads and calls kernel32!SetThreadUILanguage() so as to be able to work on older environments where this API is not supported. The FormatMessage() API also bases itself on the thread's current language for its default behaviour (unless an explicit language identifier has been provided).
| ||||||||||||||||||||||
LANGID | ConSetThreadUILanguage (IN LANGID LangId OPTIONAL) | |||||||||||||||||||||
IsTTYHandle | ||||||||||||||||||||||
Checks whether a handle refers to a valid TTY object. A TTY object may be a console or a "communications" (e.g. serial) port.
| ||||||||||||||||||||||
BOOL | IsTTYHandle (IN HANDLE hHandle) | |||||||||||||||||||||
IsConsoleHandle | ||||||||||||||||||||||
Checks whether a handle refers to a valid Win32 console object.
| ||||||||||||||||||||||
BOOL | IsConsoleHandle (IN HANDLE hHandle) | |||||||||||||||||||||
General-purpose utility functions (wrappers around or reimplementations of Win32 APIs).
Definition in file utils.c.
Definition at line 352 of file utils.c.
Referenced by _tmain(), cmd_start(), Execute(), SetConsoleCPState(), and wmain().
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 at line 254 of file utils.c.
Referenced by ConMsgPrintfV(), and ConResMsgPrintfExV().
Definition at line 419 of file utils.c.
Definition at line 393 of file utils.c.
Referenced by ConClearLine(), ConClearScreen(), ConGetScreenInfo(), and ConRingBell().
INT WINAPI K32LoadStringExW | ( | IN HINSTANCE hInstance | OPTIONAL, |
IN UINT | uID, | ||
IN LANGID | LanguageId, | ||
OUT LPWSTR | lpBuffer, | ||
IN INT | nBufferMax | ||
) |
Definition at line 99 of file utils.c.
Referenced by ConResMsgPrintfExV(), ConResPrintfExV(), ConResPutsEx(), and K32LoadStringW().
INT WINAPI K32LoadStringW | ( | IN HINSTANCE hInstance | OPTIONAL, |
IN UINT | uID, | ||
OUT LPWSTR | lpBuffer, | ||
IN INT | nBufferMax | ||
) |
Definition at line 173 of file utils.c.
Referenced by ConResPagingEx(), HelpCommand(), HelpCommandList(), PagePrompt(), Usage(), WlanPrintCurrentStatus(), WlanScan(), and wmain().