foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
CGlobalLockScope

#include <win-objects.h>

Public Member Functions

 CGlobalLockScope (HGLOBAL p_handle)
 
 ~CGlobalLockScope ()
 
void * GetPtr () const
 
t_size GetSize () const
 

Private Attributes

HGLOBAL m_handle
 
void * m_ptr
 

Detailed Description

Definition at line 73 of file win-objects.h.

Constructor & Destructor Documentation

CGlobalLockScope::CGlobalLockScope ( HGLOBAL  p_handle)

Definition at line 158 of file win-objects.cpp.

158  : m_handle(p_handle), m_ptr(GlobalLock(p_handle)) {
159  if (m_ptr == NULL) throw std::bad_alloc();
160 }
HGLOBAL m_handle
Definition: win-objects.h:81
CGlobalLockScope::~CGlobalLockScope ( )

Definition at line 161 of file win-objects.cpp.

161  {
162  if (m_ptr != NULL) GlobalUnlock(m_handle);
163 }
HGLOBAL m_handle
Definition: win-objects.h:81

Member Function Documentation

void* CGlobalLockScope::GetPtr ( ) const
inline

Definition at line 77 of file win-objects.h.

77 {return m_ptr;}
t_size CGlobalLockScope::GetSize ( ) const
inline

Definition at line 78 of file win-objects.h.

78 {return GlobalSize(m_handle);}
HGLOBAL m_handle
Definition: win-objects.h:81

Field Documentation

HGLOBAL CGlobalLockScope::m_handle
private

Definition at line 81 of file win-objects.h.

void* CGlobalLockScope::m_ptr
private

Definition at line 80 of file win-objects.h.


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