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

Classes

struct  winstd::LocalFree_delete< _Ty >
 Deleter for unique_ptr using LocalFree. More...
 
struct  winstd::LocalFree_delete< _Ty[]>
 Deleter for unique_ptr to array of unknown size using LocalFree. More...
 
struct  winstd::GlobalFree_delete
 Deleter for unique_ptr using GlobalFree. More...
 
class  winstd::globalmem_accessor< T >
 Context scope automatic GlobalAlloc (un)access. More...
 
class  winstd::ref_unique_ptr< _Ty, _Dx >
 Helper class for returning pointers to std::unique_ptr. More...
 
class  winstd::ref_unique_ptr< _Ty[], _Dx >
 Helper class for returning pointers to std::unique_ptr (specialization for arrays) More...
 

Macros

#define __L(x)
 "L" stringizing macro
 
#define _L(x)
 Makes string Unicode.
 
#define WINSTD_STRING_IMPL(x)
 Stringizing macro helper.
 
#define WINSTD_STRING(x)
 Stringizing macro.
 
#define WINSTD_NONCOPYABLE(C)
 Declares a class as non-copyable.
 
#define WINSTD_NONMOVABLE(C)
 Declares a class as non-movable.
 
#define WINSTD_STACK_BUFFER_BYTES   1024
 Size of the stack buffer in bytes used for initial system function call.
 

Typedefs

typedef std::string winstd::tstring
 Multi-byte / Wide-character string (according to _UNICODE)
 

Functions

template<class _Ty , class _Dx >
ref_unique_ptr< _Ty, _Dx > winstd::get_ptr (std::unique_ptr< _Ty, _Dx > &owner) noexcept
 Helper function template for returning pointers to std::unique_ptr.
 
template<class _Ty , class _Dx >
ref_unique_ptr< _Ty[], _Dx > winstd::get_ptr (std::unique_ptr< _Ty[], _Dx > &owner) noexcept
 Helper function template for returning pointers to std::unique_ptr (specialization for arrays)
 

Detailed Description

Macro Definition Documentation

◆ __L

#define __L ( x)
Value:
L ## x

"L" stringizing macro

◆ _L

#define _L ( x)
Value:
__L(x)
#define __L(x)
"L" stringizing macro
Definition Common.h:44

Makes string Unicode.

◆ WINSTD_NONCOPYABLE

#define WINSTD_NONCOPYABLE ( C)
Value:
private: \
C (_In_ const C &h) noexcept; \
C& operator=(_In_ const C &h) noexcept;

Declares a class as non-copyable.

◆ WINSTD_NONMOVABLE

#define WINSTD_NONMOVABLE ( C)
Value:
private: \
C (_Inout_ C &&h) noexcept; \
C& operator=(_Inout_ C &&h) noexcept;

Declares a class as non-movable.

◆ WINSTD_STACK_BUFFER_BYTES

#define WINSTD_STACK_BUFFER_BYTES   1024

Size of the stack buffer in bytes used for initial system function call.

Some system functions with variable length output data fail for insufficient buffer sizes, and return an exact buffer length required. The function helpers use a fixed size stack buffer first. If the stack buffer really prooved sufficient, the helper allocates the exact length output on heap and copies the data without calling the system function again. Otherwise it allocates the exact length output on heap and retries.

Note
Decrease this value in case of stack overflow.

◆ WINSTD_STRING

#define WINSTD_STRING ( x)
Value:
#define WINSTD_STRING_IMPL(x)
Stringizing macro helper.
Definition Common.h:57

Stringizing macro.

◆ WINSTD_STRING_IMPL

#define WINSTD_STRING_IMPL ( x)
Value:
#x

Stringizing macro helper.

Function Documentation

◆ get_ptr() [1/2]

template<class _Ty , class _Dx >
ref_unique_ptr< _Ty, _Dx > winstd::get_ptr ( std::unique_ptr< _Ty, _Dx > & owner)
noexcept

Helper function template for returning pointers to std::unique_ptr.

Parameters
[in,out]ownerOriginal owner of the pointer
Returns
A helper wrapper class to handle returning a reference to the pointer

◆ get_ptr() [2/2]

template<class _Ty , class _Dx >
ref_unique_ptr< _Ty[], _Dx > winstd::get_ptr ( std::unique_ptr< _Ty[], _Dx > & owner)
noexcept

Helper function template for returning pointers to std::unique_ptr (specialization for arrays)

Parameters
[in,out]ownerOriginal owner of the pointer
Returns
A helper wrapper class to handle returning a reference to the pointer