WinStd
Windows Win32 API using Standard C++
Loading...
Searching...
No Matches
winstd::globalmem_accessor< T > Class Template Reference

Context scope automatic GlobalAlloc (un)access. More...

#include <WinStd/Common.h>

Public Member Functions

 globalmem_accessor (HGLOBAL hMem)
 Locks a global memory object and returns a pointer to the first byte of the object's memory block.
 
virtual ~globalmem_accessor ()
 Decrements the lock count associated with a memory object.
 
T * data () const noexcept
 Return data pointer.
 

Protected Attributes

HGLOBAL m_h
 memory handle
 
T * m_data
 memory pointer
 

Detailed Description

template<class T>
class winstd::globalmem_accessor< T >

Context scope automatic GlobalAlloc (un)access.

Constructor & Destructor Documentation

◆ globalmem_accessor()

template<class T >
winstd::globalmem_accessor< T >::globalmem_accessor ( HGLOBAL hMem)
inline

Locks a global memory object and returns a pointer to the first byte of the object's memory block.

See also
GlobalLock function

◆ ~globalmem_accessor()

template<class T >
virtual winstd::globalmem_accessor< T >::~globalmem_accessor ( )
inlinevirtual

Decrements the lock count associated with a memory object.

See also
GlobalUnlock function

The documentation for this class was generated from the following file: