![]() |
Public API Reference |
![]() |
Win32 tool functions. More...
#include "csextern.h"
#include "csutil/csunicode.h"
#include "csutil/util.h"
#include <winnls.h>
#include "sanity.inc"
Go to the source code of this file.
Classes | |
struct | cswinCtoA |
Small helper to convert an UTF-8 to an ANSI string, useful when passing arguments to a function. More... | |
struct | cswinWtoA |
Small helper to convert a wide to an ANSI string, useful when passing arguments to a function. More... | |
Enumerations | |
enum | cswinWindowsVersion { cswinWin9x = 30, cswinWinNT = 40, cswinWin2K = 50, cswinWinXP = 51, cswinWin2003 = 52, cswinWinVista = 60 } |
Windows versions cswinIsWinNT() can identify. More... | |
Functions | |
static wchar_t * | cswinAnsiToWide (const char *ansi, UINT codePage=CP_ACP) |
Convert an ANSI string to a wide string. | |
char * | cswinGetErrorMessage (HRESULT code) |
Retrieve the system's description for an error code. | |
wchar_t * | cswinGetErrorMessageW (HRESULT code) |
Retrieve the system's description for an error code. | |
bool | cswinIsWinNT (cswinWindowsVersion *version=0) |
Returns 'true' if the current Windows is from the NT strain, 'false' if from the 9x strain. | |
static char * | cswinWideToAnsi (const wchar_t *wide, UINT codePage=CP_ACP) |
Convert a wide string to an ANSI string. |
Win32 tool functions.
Definition in file wintools.h.
enum cswinWindowsVersion |
Windows versions cswinIsWinNT() can identify.
cswinWin9x |
Windows 95/98/ME. |
cswinWinNT |
Windows NT 4.0. |
cswinWin2K |
Windows 2000. |
cswinWinXP |
Windows XP. |
cswinWin2003 |
Windows Server 2003. |
cswinWinVista |
Windows Vista (or newer) |
Definition at line 161 of file wintools.h.
static wchar_t* cswinAnsiToWide | ( | const char * | ansi, |
UINT | codePage = CP_ACP |
||
) | [inline, static] |
Convert an ANSI string to a wide string.
Definition at line 41 of file wintools.h.
char* cswinGetErrorMessage | ( | HRESULT | code | ) |
Retrieve the system's description for an error code.
code | The error code, usually retrieved through GetLastError(). |
wchar_t* cswinGetErrorMessageW | ( | HRESULT | code | ) |
Retrieve the system's description for an error code.
code | The error code, usually retrieved through GetLastError(). |
bool cswinIsWinNT | ( | cswinWindowsVersion * | version = 0 | ) |
Returns 'true' if the current Windows is from the NT strain, 'false' if from the 9x strain.
version | Optionally returns more specifically what Windows is used. |
static char* cswinWideToAnsi | ( | const wchar_t * | wide, |
UINT | codePage = CP_ACP |
||
) | [inline, static] |
Convert a wide string to an ANSI string.
Definition at line 65 of file wintools.h.