WinStd
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
Classes | Macros | Typedefs
Windows API

Integrates WinStd classes with Microsoft Windows API. More...

Classes

class  winstd::win_handle< INVALID >
 Windows HANDLE wrapper class. More...
 
class  winstd::library
 Module handle wrapper. More...
 
class  winstd::process
 Process handle wrapper. More...
 
class  winstd::file
 File handle wrapper. More...
 
class  winstd::file_mapping
 File mapping. More...
 
struct  winstd::UnmapViewOfFile_delete< _Ty >
 Deleter for unique_ptr using UnmapViewOfFile. More...
 
struct  winstd::UnmapViewOfFile_delete< _Ty[]>
 Deleter for unique_ptr to array of unknown size using UnmapViewOfFile. More...
 
class  winstd::event
 Event handle wrapper. 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::user_impersonator
 Lets the calling thread impersonate the security context of a logged-on user. 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 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...
 

Macros

#define WINSTD_WINHANDLE_IMPL(C, INVAL)
 Implements default constructors and operators to prevent their auto-generation by compiler. More...
 
#define GuidToString   GuidToStringA
 Formats GUID and stores it in a std::wstring string. More...
 
#define StringToGuid   StringToGuidA
 Parses string with GUID and stores it to GUID. More...
 

Typedefs

typedef win_handle< NULL > winstd::thread
 Thread handle wrapper. More...
 
typedef win_handle< INVALID_HANDLE_VALUE > winstd::process_snapshot
 Process snapshot handle wrapper. More...
 

Detailed Description

Integrates WinStd classes with Microsoft Windows API.

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.

◆ WINSTD_WINHANDLE_IMPL

#define WINSTD_WINHANDLE_IMPL (   C,
  INVAL 
)
Value:
public: \
C ( ) noexcept { } \
C (_In_opt_ handle_type h) noexcept : win_handle<INVAL>( h ) { } \
C (_Inout_ C &&h) noexcept : win_handle<INVAL>(std::move(h)) { } \
C& operator=(_In_opt_ handle_type h) noexcept { win_handle<INVAL>::operator=( h ); return *this; } \
C& operator=(_Inout_ C &&h) noexcept { win_handle<INVAL>::operator=(std::move(h)); return *this; } \
WINSTD_NONCOPYABLE(C)

Implements default constructors and operators to prevent their auto-generation by compiler.

Typedef Documentation

◆ 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