WinStd
Windows Win32 API using Standard C++
Loading...
Searching...
No Matches
Windows API

Classes

class  winstd::win_handle< INVALID >
 Windows HANDLE wrapper class. More...
 
class  winstd::library
 Module handle wrapper. More...
 
class  winstd::mutex_locker
 Locks given mutex in constructor and releases it in destructor. More...
 
struct  winstd::UnmapViewOfFile_delete
 Deleter for unique_ptr using UnmapViewOfFile. More...
 
class  winstd::critical_section
 Critical section wrapper. More...
 
class  winstd::find_file
 Find-file handle wrapper. More...
 
class  winstd::heap
 Heap handle wrapper. More...
 
class  winstd::heap_allocator< _Ty >
 HeapAlloc allocator. More...
 
class  winstd::actctx_activator
 Activates given activation context in constructor and deactivates it in destructor. More...
 
class  winstd::impersonator
 Base class for thread impersonation of another security context. More...
 
class  winstd::user_impersonator
 Lets the calling thread impersonate the security context of a logged-on user. More...
 
class  winstd::system_impersonator
 Lets the calling thread impersonate the security context of the SYSTEM user. More...
 
class  winstd::clipboard_opener
 Clipboard management. More...
 
class  winstd::console_ctrl_handler
 Console control handler stack management. More...
 
class  winstd::vmemory
 Memory in virtual address space of a process handle wrapper. More...
 
class  winstd::reg_key
 Registry key wrapper class. More...
 
class  winstd::security_id
 SID wrapper class. More...
 
class  winstd::process_information
 PROCESS_INFORMATION struct wrapper. More...
 
class  winstd::event_log
 Event log handle wrapper. More...
 
class  winstd::sc_handle
 SC_HANDLE wrapper class. More...
 

Macros

#define GuidToString   GuidToStringA
 Formats GUID and stores it in a std::wstring string.
 
#define StringToGuid   StringToGuidA
 Parses string with GUID and stores it to GUID.
 

Typedefs

typedef win_handle< NULL > winstd::process
 Process handle wrapper.
 
typedef win_handle< NULL > winstd::thread
 Thread handle wrapper.
 
typedef win_handle< INVALID_HANDLE_VALUE > winstd::process_snapshot
 Process snapshot handle wrapper.
 
typedef win_handle< NULL > winstd::mutex
 Mutex handle wrapper.
 
typedef win_handle< INVALID_HANDLE_VALUE > winstd::file
 File handle wrapper.
 
typedef win_handle< NULL > winstd::file_mapping
 File mapping.
 
typedef win_handle< NULL > winstd::event
 Event handle wrapper.
 

Functions

template<class _Traits , class _Ax >
static DWORD GetModuleFileNameA (HMODULE hModule, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string.
 
template<class _Traits , class _Ax >
static DWORD GetModuleFileNameW (HMODULE hModule, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string.
 
template<class _Traits , class _Ax >
static int GetWindowTextA (HWND hWnd, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Copies the text of the specified window's title bar (if it has one) into a std::wstring string.
 
template<class _Traits , class _Ax >
static int GetWindowTextW (HWND hWnd, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Copies the text of the specified window's title bar (if it has one) into a std::wstring string.
 
template<class _Ty , class _Ax >
static BOOL GetFileVersionInfoA (LPCSTR lptstrFilename, __reserved DWORD dwHandle, std::vector< _Ty, _Ax > &aValue) noexcept
 Retrieves version information for the specified file and stores it in a std::vector buffer.
 
template<class _Ty , class _Ax >
static BOOL GetFileVersionInfoW (LPCWSTR lptstrFilename, __reserved DWORD dwHandle, std::vector< _Ty, _Ax > &aValue) noexcept
 Retrieves version information for the specified file and stores it in a std::vector buffer.
 
template<class _Traits , class _Ax >
static DWORD ExpandEnvironmentStringsA (LPCSTR lpSrc, std::basic_string< char, _Traits, _Ax > &sValue)
 Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string.
 
template<class _Traits , class _Ax >
static DWORD ExpandEnvironmentStringsW (LPCWSTR lpSrc, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string.
 
template<class _Traits , class _Ax >
static VOID GuidToStringA (LPCGUID lpGuid, std::basic_string< char, _Traits, _Ax > &str) noexcept
 Formats GUID and stores it in a std::wstring string.
 
template<class _Traits , class _Ax >
static VOID GuidToStringW (LPCGUID lpGuid, std::basic_string< wchar_t, _Traits, _Ax > &str) noexcept
 Formats GUID and stores it in a std::wstring string.
 
static BOOL StringToGuidA (LPCSTR lpszGuid, LPGUID lpGuid, LPCSTR *lpszGuidEnd=NULL) noexcept
 Parses string with GUID and stores it to GUID.
 
static BOOL StringToGuidW (LPCWSTR lpszGuid, LPGUID lpGuid, LPCWSTR *lpszGuidEnd=NULL) noexcept
 Parses string with GUID and stores it to GUID.
 
template<class _Traits , class _Ax >
static LSTATUS RegQueryStringValue (HKEY hReg, LPCSTR pszName, std::basic_string< char, _Traits, _Ax > &sValue) noexcept
 Queries for a string value in the registry and stores it in a std::string string.
 
template<class _Traits , class _Ax >
static LSTATUS RegQueryStringValue (HKEY hReg, LPCWSTR pszName, std::basic_string< wchar_t, _Traits, _Ax > &sValue) noexcept
 Queries for a string value in the registry and stores it in a std::wstring string.
 
template<class _Ty , class _Ax >
static LSTATUS RegQueryValueExA (HKEY hKey, LPCSTR lpValueName, __reserved LPDWORD lpReserved, LPDWORD lpType, std::vector< _Ty, _Ax > &aData) noexcept
 Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer.
 
template<class _Ty , class _Ax >
static LSTATUS RegQueryValueExW (HKEY hKey, LPCWSTR lpValueName, __reserved LPDWORD lpReserved, LPDWORD lpType, std::vector< _Ty, _Ax > &aData) noexcept
 Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer.
 
template<class _Traits , class _Ax >
static LSTATUS RegLoadMUIStringA (HKEY hKey, LPCSTR pszValue, std::basic_string< char, _Traits, _Ax > &sOut, DWORD Flags, LPCSTR pszDirectory) noexcept
 Loads the specified string from the specified key and subkey, and stores it in a std::wstring string.
 
template<class _Traits , class _Ax >
static LSTATUS RegLoadMUIStringW (HKEY hKey, LPCWSTR pszValue, std::basic_string< wchar_t, _Traits, _Ax > &sOut, DWORD Flags, LPCWSTR pszDirectory) noexcept
 Loads the specified string from the specified key and subkey, and stores it in a std::wstring string.
 
template<class _Traits , class _Ax >
static int NormalizeString (NORM_FORM NormForm, LPCWSTR lpSrcString, int cwSrcLength, std::basic_string< wchar_t, _Traits, _Ax > &sDstString) noexcept
 Normalizes characters of a text string according to Unicode 4.0 TR#15.
 
template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int NormalizeString (NORM_FORM NormForm, const std::basic_string< wchar_t, _Traits1, _Ax1 > &sSrcString, std::basic_string< wchar_t, _Traits2, _Ax2 > &sDstString) noexcept
 Normalizes characters of a text string according to Unicode 4.0 TR#15.
 
template<class _Traits , class _Ax >
static int WINAPI LoadStringA (HINSTANCE hInstance, UINT uID, std::basic_string< char, _Traits, _Ax > &sBuffer) noexcept
 Loads a string resource from the executable file associated with a specified module.
 
template<class _Traits , class _Ax >
static int WINAPI LoadStringW (HINSTANCE hInstance, UINT uID, std::basic_string< wchar_t, _Traits, _Ax > &sBuffer) noexcept
 Loads a string resource from the executable file associated with a specified module.
 
static VOID OutputDebugStrV (LPCSTR lpOutputString, va_list arg) noexcept
 Formats and sends a string to the debugger for display.
 
static VOID OutputDebugStrV (LPCWSTR lpOutputString, va_list arg) noexcept
 Formats and sends a string to the debugger for display.
 
static VOID OutputDebugStr (LPCSTR lpOutputString,...) noexcept
 Formats and sends a string to the debugger for display.
 
static VOID OutputDebugStr (LPCWSTR lpOutputString,...) noexcept
 Formats and sends a string to the debugger for display.
 
template<class _Traits , class _Ax >
static int GetDateFormatA (LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCSTR lpFormat, std::basic_string< char, _Traits, _Ax > &sDate) noexcept
 Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date.
 
template<class _Traits , class _Ax >
static int GetDateFormatW (LCID Locale, DWORD dwFlags, const SYSTEMTIME *lpDate, LPCWSTR lpFormat, std::basic_string< wchar_t, _Traits, _Ax > &sDate) noexcept
 Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date.
 
template<class _Traits , class _Ax >
static BOOL LookupAccountSidA (LPCSTR lpSystemName, PSID lpSid, std::basic_string< char, _Traits, _Ax > *sName, std::basic_string< char, _Traits, _Ax > *sReferencedDomainName, PSID_NAME_USE peUse) noexcept
 Retrieves the name of the account for this SID and the name of the first domain on which this SID is found.
 
template<class _Traits , class _Ax >
static BOOL LookupAccountSidW (LPCWSTR lpSystemName, PSID lpSid, std::basic_string< wchar_t, _Traits, _Ax > *sName, std::basic_string< wchar_t, _Traits, _Ax > *sReferencedDomainName, PSID_NAME_USE peUse) noexcept
 Retrieves the name of the account for this SID and the name of the first domain on which this SID is found.
 
static BOOL CreateWellKnownSid (WELL_KNOWN_SID_TYPE WellKnownSidType, PSID DomainSid, std::unique_ptr< SID > &Sid)
 Creates a SID for predefined aliases.
 
template<class _Ty >
static BOOL GetTokenInformation (HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, std::unique_ptr< _Ty > &TokenInformation) noexcept
 Retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information.
 
template<class _Traits , class _Ax >
static BOOL QueryFullProcessImageNameA (HANDLE hProcess, DWORD dwFlags, std::basic_string< char, _Traits, _Ax > &sExeName)
 Retrieves the full name of the executable image for the specified process.
 
template<class _Traits , class _Ax >
static BOOL QueryFullProcessImageNameW (HANDLE hProcess, DWORD dwFlags, std::basic_string< wchar_t, _Traits, _Ax > &sExeName)
 Retrieves the full name of the executable image for the specified process.
 
static LSTATUS RegCreateKeyExA (HKEY hKey, LPCSTR lpSubKey, DWORD Reserved, LPSTR lpClass, DWORD dwOptions, REGSAM samDesired, CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, winstd::reg_key &result, LPDWORD lpdwDisposition)
 Creates the specified registry key. If the key already exists, the function opens it.
 
static LSTATUS RegCreateKeyExW (HKEY hKey, LPCWSTR lpSubKey, DWORD Reserved, LPWSTR lpClass, DWORD dwOptions, REGSAM samDesired, CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes, winstd::reg_key &result, LPDWORD lpdwDisposition)
 Creates the specified registry key. If the key already exists, the function opens it.
 
static LSTATUS RegOpenKeyExA (HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, winstd::reg_key &result)
 Opens the specified registry key.
 
static LSTATUS RegOpenKeyExW (HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, winstd::reg_key &result)
 Opens the specified registry key.
 
static BOOL OpenProcessToken (HANDLE ProcessHandle, DWORD DesiredAccess, winstd::win_handle< NULL > &TokenHandle)
 Opens the access token associated with a process.
 
static BOOL DuplicateTokenEx (HANDLE hExistingToken, DWORD dwDesiredAccess, LPSECURITY_ATTRIBUTES lpTokenAttributes, SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, TOKEN_TYPE TokenType, winstd::win_handle< NULL > &NewToken)
 Creates a new access token that duplicates an existing token. This function can create either a primary token or an impersonation token.
 
static BOOL AllocateAndInitializeSid (PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, winstd::security_id &Sid)
 Allocates and initializes a security identifier (SID) with up to eight subauthorities.
 
static DWORD SetEntriesInAclA (ULONG cCountOfExplicitEntries, PEXPLICIT_ACCESS_A pListOfExplicitEntries, PACL OldAcl, std::unique_ptr< ACL, winstd::LocalFree_delete< ACL > > &Acl)
 Creates a new access control list (ACL) by merging new access control or audit control information into an existing ACL structure.
 
static DWORD SetEntriesInAclW (ULONG cCountOfExplicitEntries, PEXPLICIT_ACCESS_W pListOfExplicitEntries, PACL OldAcl, std::unique_ptr< ACL, winstd::LocalFree_delete< ACL > > &Acl)
 Creates a new access control list (ACL) by merging new access control or audit control information into an existing ACL structure.
 
template<class _Traits , class _Ax >
BOOL GetThreadPreferredUILanguages (DWORD dwFlags, PULONG pulNumLanguages, std::basic_string< wchar_t, _Traits, _Ax > &sValue)
 Retrieves the thread preferred UI languages for the current thread.
 

Detailed Description

Macro Definition Documentation

◆ GuidToString

#define GuidToString   GuidToStringA

Formats GUID and stores it in a std::wstring string.

Parameters
[in]lpGuidPointer to GUID
[out]strString to store the result to

◆ StringToGuid

#define StringToGuid   StringToGuidA

Parses string with GUID and stores it to GUID.

Parameters
[in]lpszGuidString with GUID
[out]lpGuidGUID to store the result to
[out]lpszGuidEndIf non-NULL the pointer to the end of parsed GUID within lpszGuid is returned
Returns
  • TRUE if GUID successfuly parsed;
  • FALSE otherwise.

Typedef Documentation

◆ event

typedef win_handle<NULL> winstd::event

Event handle wrapper.

See also
CreateEventW function
OpenEventW function

◆ file

typedef win_handle<INVALID_HANDLE_VALUE> winstd::file

File handle wrapper.

See also
CreateFile function
CreateNamedPipe function

◆ file_mapping

File mapping.

See also
CreateFileMapping function

◆ mutex

typedef win_handle<NULL> winstd::mutex

Mutex handle wrapper.

See also
CreateMutexW function

◆ process

typedef win_handle<NULL> winstd::process

Process handle wrapper.

See also
OpenProcess function

◆ process_snapshot

typedef win_handle<INVALID_HANDLE_VALUE> winstd::process_snapshot

Process snapshot handle wrapper.

See also
CreateToolhelp32Snapshot function

◆ thread

typedef win_handle<NULL> winstd::thread

Thread handle wrapper.

See also
CreateThread function

Function Documentation

◆ AllocateAndInitializeSid()

static BOOL AllocateAndInitializeSid ( PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority,
BYTE nSubAuthorityCount,
DWORD nSubAuthority0,
DWORD nSubAuthority1,
DWORD nSubAuthority2,
DWORD nSubAuthority3,
DWORD nSubAuthority4,
DWORD nSubAuthority5,
DWORD nSubAuthority6,
DWORD nSubAuthority7,
winstd::security_id & Sid )
static

Allocates and initializes a security identifier (SID) with up to eight subauthorities.

See also
AllocateAndInitializeSid function

◆ CreateWellKnownSid()

static BOOL CreateWellKnownSid ( WELL_KNOWN_SID_TYPE WellKnownSidType,
PSID DomainSid,
std::unique_ptr< SID > & Sid )
static

Creates a SID for predefined aliases.

See also
CreateWellKnownSid function

◆ DuplicateTokenEx()

static BOOL DuplicateTokenEx ( HANDLE hExistingToken,
DWORD dwDesiredAccess,
LPSECURITY_ATTRIBUTES lpTokenAttributes,
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel,
TOKEN_TYPE TokenType,
winstd::win_handle< NULL > & NewToken )
static

Creates a new access token that duplicates an existing token. This function can create either a primary token or an impersonation token.

See also
DuplicateTokenEx function

◆ ExpandEnvironmentStringsA()

template<class _Traits , class _Ax >
static DWORD ExpandEnvironmentStringsA ( LPCSTR lpSrc,
std::basic_string< char, _Traits, _Ax > & sValue )
static

Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string.

See also
ExpandEnvironmentStrings function

◆ ExpandEnvironmentStringsW()

template<class _Traits , class _Ax >
static DWORD ExpandEnvironmentStringsW ( LPCWSTR lpSrc,
std::basic_string< wchar_t, _Traits, _Ax > & sValue )
static

Expands environment-variable strings, replaces them with the values defined for the current user, and stores it in a std::wstring string.

See also
ExpandEnvironmentStrings function

◆ GetDateFormatA()

template<class _Traits , class _Ax >
static int GetDateFormatA ( LCID Locale,
DWORD dwFlags,
const SYSTEMTIME * lpDate,
LPCSTR lpFormat,
std::basic_string< char, _Traits, _Ax > & sDate )
staticnoexcept

Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date.

See also
GetDateFormat function

◆ GetDateFormatW()

template<class _Traits , class _Ax >
static int GetDateFormatW ( LCID Locale,
DWORD dwFlags,
const SYSTEMTIME * lpDate,
LPCWSTR lpFormat,
std::basic_string< wchar_t, _Traits, _Ax > & sDate )
staticnoexcept

Formats a date as a date string for a locale specified by the locale identifier. The function formats either a specified date or the local system date.

See also
GetDateFormat function

◆ GetFileVersionInfoA()

template<class _Ty , class _Ax >
static BOOL GetFileVersionInfoA ( LPCSTR lptstrFilename,
__reserved DWORD dwHandle,
std::vector< _Ty, _Ax > & aValue )
staticnoexcept

Retrieves version information for the specified file and stores it in a std::vector buffer.

See also
GetFileVersionInfo function

◆ GetFileVersionInfoW()

template<class _Ty , class _Ax >
static BOOL GetFileVersionInfoW ( LPCWSTR lptstrFilename,
__reserved DWORD dwHandle,
std::vector< _Ty, _Ax > & aValue )
staticnoexcept

Retrieves version information for the specified file and stores it in a std::vector buffer.

See also
GetFileVersionInfo function

◆ GetModuleFileNameA()

template<class _Traits , class _Ax >
static DWORD GetModuleFileNameA ( HMODULE hModule,
std::basic_string< char, _Traits, _Ax > & sValue )
staticnoexcept

Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string.

See also
GetModuleFileName function

◆ GetModuleFileNameW()

template<class _Traits , class _Ax >
static DWORD GetModuleFileNameW ( HMODULE hModule,
std::basic_string< wchar_t, _Traits, _Ax > & sValue )
staticnoexcept

Retrieves the fully qualified path for the file that contains the specified module and stores it in a std::wstring string.

See also
GetModuleFileName function

◆ GetThreadPreferredUILanguages()

template<class _Traits , class _Ax >
BOOL GetThreadPreferredUILanguages ( DWORD dwFlags,
PULONG pulNumLanguages,
std::basic_string< wchar_t, _Traits, _Ax > & sValue )

Retrieves the thread preferred UI languages for the current thread.

See also
GetThreadPreferredUILanguages function

◆ GetTokenInformation()

template<class _Ty >
static BOOL GetTokenInformation ( HANDLE TokenHandle,
TOKEN_INFORMATION_CLASS TokenInformationClass,
std::unique_ptr< _Ty > & TokenInformation )
staticnoexcept

Retrieves a specified type of information about an access token. The calling process must have appropriate access rights to obtain the information.

See also
GetTokenInformation function

◆ GetWindowTextA()

template<class _Traits , class _Ax >
static int GetWindowTextA ( HWND hWnd,
std::basic_string< char, _Traits, _Ax > & sValue )
staticnoexcept

Copies the text of the specified window's title bar (if it has one) into a std::wstring string.

See also
GetWindowText function

◆ GetWindowTextW()

template<class _Traits , class _Ax >
static int GetWindowTextW ( HWND hWnd,
std::basic_string< wchar_t, _Traits, _Ax > & sValue )
staticnoexcept

Copies the text of the specified window's title bar (if it has one) into a std::wstring string.

See also
GetWindowText function

◆ GuidToStringA()

template<class _Traits , class _Ax >
static VOID GuidToStringA ( LPCGUID lpGuid,
std::basic_string< char, _Traits, _Ax > & str )
staticnoexcept

Formats GUID and stores it in a std::wstring string.

Parameters
[in]lpGuidPointer to GUID
[out]strString to store the result to

◆ GuidToStringW()

template<class _Traits , class _Ax >
static VOID GuidToStringW ( LPCGUID lpGuid,
std::basic_string< wchar_t, _Traits, _Ax > & str )
staticnoexcept

Formats GUID and stores it in a std::wstring string.

Parameters
[in]lpGuidPointer to GUID
[out]strString to store the result to

◆ LoadStringA()

template<class _Traits , class _Ax >
static int WINAPI LoadStringA ( HINSTANCE hInstance,
UINT uID,
std::basic_string< char, _Traits, _Ax > & sBuffer )
staticnoexcept

Loads a string resource from the executable file associated with a specified module.

See also
LoadString function

◆ LoadStringW()

template<class _Traits , class _Ax >
static int WINAPI LoadStringW ( HINSTANCE hInstance,
UINT uID,
std::basic_string< wchar_t, _Traits, _Ax > & sBuffer )
staticnoexcept

Loads a string resource from the executable file associated with a specified module.

See also
LoadString function

◆ LookupAccountSidA()

template<class _Traits , class _Ax >
static BOOL LookupAccountSidA ( LPCSTR lpSystemName,
PSID lpSid,
std::basic_string< char, _Traits, _Ax > * sName,
std::basic_string< char, _Traits, _Ax > * sReferencedDomainName,
PSID_NAME_USE peUse )
staticnoexcept

Retrieves the name of the account for this SID and the name of the first domain on which this SID is found.

See also
LookupAccountSid function

◆ LookupAccountSidW()

template<class _Traits , class _Ax >
static BOOL LookupAccountSidW ( LPCWSTR lpSystemName,
PSID lpSid,
std::basic_string< wchar_t, _Traits, _Ax > * sName,
std::basic_string< wchar_t, _Traits, _Ax > * sReferencedDomainName,
PSID_NAME_USE peUse )
staticnoexcept

Retrieves the name of the account for this SID and the name of the first domain on which this SID is found.

See also
LookupAccountSid function

◆ NormalizeString() [1/2]

template<class _Traits1 , class _Ax1 , class _Traits2 , class _Ax2 >
static int NormalizeString ( NORM_FORM NormForm,
const std::basic_string< wchar_t, _Traits1, _Ax1 > & sSrcString,
std::basic_string< wchar_t, _Traits2, _Ax2 > & sDstString )
staticnoexcept

Normalizes characters of a text string according to Unicode 4.0 TR#15.

See also
NormalizeString function

◆ NormalizeString() [2/2]

template<class _Traits , class _Ax >
static int NormalizeString ( NORM_FORM NormForm,
LPCWSTR lpSrcString,
int cwSrcLength,
std::basic_string< wchar_t, _Traits, _Ax > & sDstString )
staticnoexcept

Normalizes characters of a text string according to Unicode 4.0 TR#15.

See also
NormalizeString function

◆ OpenProcessToken()

static BOOL OpenProcessToken ( HANDLE ProcessHandle,
DWORD DesiredAccess,
winstd::win_handle< NULL > & TokenHandle )
static

Opens the access token associated with a process.

See also
OpenProcessToken function

◆ OutputDebugStr() [1/2]

static VOID OutputDebugStr ( LPCSTR lpOutputString,
... )
staticnoexcept

Formats and sends a string to the debugger for display.

See also
OutputDebugString function

◆ OutputDebugStr() [2/2]

static VOID OutputDebugStr ( LPCWSTR lpOutputString,
... )
staticnoexcept

Formats and sends a string to the debugger for display.

See also
OutputDebugString function

◆ OutputDebugStrV() [1/2]

static VOID OutputDebugStrV ( LPCSTR lpOutputString,
va_list arg )
staticnoexcept

Formats and sends a string to the debugger for display.

See also
OutputDebugString function

◆ OutputDebugStrV() [2/2]

static VOID OutputDebugStrV ( LPCWSTR lpOutputString,
va_list arg )
staticnoexcept

Formats and sends a string to the debugger for display.

See also
OutputDebugString function

◆ QueryFullProcessImageNameA()

template<class _Traits , class _Ax >
static BOOL QueryFullProcessImageNameA ( HANDLE hProcess,
DWORD dwFlags,
std::basic_string< char, _Traits, _Ax > & sExeName )
static

Retrieves the full name of the executable image for the specified process.

See also
QueryFullProcessImageNameA function

◆ QueryFullProcessImageNameW()

template<class _Traits , class _Ax >
static BOOL QueryFullProcessImageNameW ( HANDLE hProcess,
DWORD dwFlags,
std::basic_string< wchar_t, _Traits, _Ax > & sExeName )
static

Retrieves the full name of the executable image for the specified process.

See also
QueryFullProcessImageNameW function

◆ RegCreateKeyExA()

static LSTATUS RegCreateKeyExA ( HKEY hKey,
LPCSTR lpSubKey,
DWORD Reserved,
LPSTR lpClass,
DWORD dwOptions,
REGSAM samDesired,
CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
winstd::reg_key & result,
LPDWORD lpdwDisposition )
static

Creates the specified registry key. If the key already exists, the function opens it.

See also
RegCreateKeyEx function

◆ RegCreateKeyExW()

static LSTATUS RegCreateKeyExW ( HKEY hKey,
LPCWSTR lpSubKey,
DWORD Reserved,
LPWSTR lpClass,
DWORD dwOptions,
REGSAM samDesired,
CONST LPSECURITY_ATTRIBUTES lpSecurityAttributes,
winstd::reg_key & result,
LPDWORD lpdwDisposition )
static

Creates the specified registry key. If the key already exists, the function opens it.

See also
RegCreateKeyEx function

◆ RegLoadMUIStringA()

template<class _Traits , class _Ax >
static LSTATUS RegLoadMUIStringA ( HKEY hKey,
LPCSTR pszValue,
std::basic_string< char, _Traits, _Ax > & sOut,
DWORD Flags,
LPCSTR pszDirectory )
staticnoexcept

Loads the specified string from the specified key and subkey, and stores it in a std::wstring string.

See also
RegLoadMUIString function

◆ RegLoadMUIStringW()

template<class _Traits , class _Ax >
static LSTATUS RegLoadMUIStringW ( HKEY hKey,
LPCWSTR pszValue,
std::basic_string< wchar_t, _Traits, _Ax > & sOut,
DWORD Flags,
LPCWSTR pszDirectory )
staticnoexcept

Loads the specified string from the specified key and subkey, and stores it in a std::wstring string.

See also
RegLoadMUIString function

◆ RegOpenKeyExA()

static LSTATUS RegOpenKeyExA ( HKEY hKey,
LPCSTR lpSubKey,
DWORD ulOptions,
REGSAM samDesired,
winstd::reg_key & result )
static

Opens the specified registry key.

See also
RegOpenKeyEx function

◆ RegOpenKeyExW()

static LSTATUS RegOpenKeyExW ( HKEY hKey,
LPCWSTR lpSubKey,
DWORD ulOptions,
REGSAM samDesired,
winstd::reg_key & result )
static

Opens the specified registry key.

See also
RegOpenKeyEx function

◆ RegQueryStringValue() [1/2]

template<class _Traits , class _Ax >
static LSTATUS RegQueryStringValue ( HKEY hReg,
LPCSTR pszName,
std::basic_string< char, _Traits, _Ax > & sValue )
staticnoexcept

Queries for a string value in the registry and stores it in a std::string string.

REG_EXPAND_SZ are expanded using ExpandEnvironmentStrings() before storing to sValue.

Parameters
[in]hRegA handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right.
[in]pszNameThe name of the registry value. If lpValueName is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any.
[out]sValueString to store the value to
Returns
  • ERROR_SUCCESS when query succeeds;
  • ERROR_INVALID_DATA when the registy value type is not REG_SZ, REG_MULTI_SZ, or REG_EXPAND_SZ;
  • ERROR_OUTOFMEMORY when the memory allocation for the sValue buffer fails;
  • Error code when query fails. See RegQueryValueEx() for the list of error codes.
See also
RegQueryValueEx function
ExpandEnvironmentStrings function

◆ RegQueryStringValue() [2/2]

template<class _Traits , class _Ax >
static LSTATUS RegQueryStringValue ( HKEY hReg,
LPCWSTR pszName,
std::basic_string< wchar_t, _Traits, _Ax > & sValue )
staticnoexcept

Queries for a string value in the registry and stores it in a std::wstring string.

REG_EXPAND_SZ are expanded using ExpandEnvironmentStrings() before storing to sValue.

Parameters
[in]hRegA handle to an open registry key. The key must have been opened with the KEY_QUERY_VALUE access right.
[in]pszNameThe name of the registry value. If lpValueName is NULL or an empty string, "", the function retrieves the type and data for the key's unnamed or default value, if any.
[out]sValueString to store the value to
Returns
  • ERROR_SUCCESS when query succeeds;
  • ERROR_INVALID_DATA when the registy value type is not REG_SZ, REG_MULTI_SZ, or REG_EXPAND_SZ;
  • ERROR_OUTOFMEMORY when the memory allocation for the sValue buffer fails;
  • Error code when query fails. See RegQueryValueEx() for the list of error codes.
See also
RegQueryValueEx function
ExpandEnvironmentStrings function

◆ RegQueryValueExA()

template<class _Ty , class _Ax >
static LSTATUS RegQueryValueExA ( HKEY hKey,
LPCSTR lpValueName,
__reserved LPDWORD lpReserved,
LPDWORD lpType,
std::vector< _Ty, _Ax > & aData )
staticnoexcept

Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer.

See also
RegQueryValueEx function

◆ RegQueryValueExW()

template<class _Ty , class _Ax >
static LSTATUS RegQueryValueExW ( HKEY hKey,
LPCWSTR lpValueName,
__reserved LPDWORD lpReserved,
LPDWORD lpType,
std::vector< _Ty, _Ax > & aData )
staticnoexcept

Retrieves the type and data for the specified value name associated with an open registry key and stores the data in a std::vector buffer.

See also
RegQueryValueEx function

◆ SetEntriesInAclA()

static DWORD SetEntriesInAclA ( ULONG cCountOfExplicitEntries,
PEXPLICIT_ACCESS_A pListOfExplicitEntries,
PACL OldAcl,
std::unique_ptr< ACL, winstd::LocalFree_delete< ACL > > & Acl )
static

Creates a new access control list (ACL) by merging new access control or audit control information into an existing ACL structure.

See also
SetEntriesInAclW function

◆ SetEntriesInAclW()

static DWORD SetEntriesInAclW ( ULONG cCountOfExplicitEntries,
PEXPLICIT_ACCESS_W pListOfExplicitEntries,
PACL OldAcl,
std::unique_ptr< ACL, winstd::LocalFree_delete< ACL > > & Acl )
static

Creates a new access control list (ACL) by merging new access control or audit control information into an existing ACL structure.

See also
SetEntriesInAclW function

◆ StringToGuidA()

static BOOL StringToGuidA ( LPCSTR lpszGuid,
LPGUID lpGuid,
LPCSTR * lpszGuidEnd = NULL )
staticnoexcept

Parses string with GUID and stores it to GUID.

Parameters
[in]lpszGuidString with GUID
[out]lpGuidGUID to store the result to
[out]lpszGuidEndIf non-NULL the pointer to the end of parsed GUID within lpszGuid is returned
Returns
  • TRUE if GUID successfuly parsed;
  • FALSE otherwise.

◆ StringToGuidW()

static BOOL StringToGuidW ( LPCWSTR lpszGuid,
LPGUID lpGuid,
LPCWSTR * lpszGuidEnd = NULL )
staticnoexcept

Parses string with GUID and stores it to GUID.

Parameters
[in]lpszGuidString with GUID
[out]lpGuidGUID to store the result to
[out]lpszGuidEndIf non-NULL the pointer to the end of parsed GUID within lpszGuid is returned
Returns
  • TRUE if GUID successfuly parsed;
  • FALSE otherwise.