foobar2000 SDK  2015-01-14
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 71 of file win-objects.h.

Constructor & Destructor Documentation

CGlobalLockScope::CGlobalLockScope ( HGLOBAL  p_handle)

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

155  : m_handle(p_handle), m_ptr(GlobalLock(p_handle)) {
156  if (m_ptr == NULL) throw std::bad_alloc();
157 }
HGLOBAL m_handle
Definition: win-objects.h:79
CGlobalLockScope::~CGlobalLockScope ( )

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

158  {
159  if (m_ptr != NULL) GlobalUnlock(m_handle);
160 }
HGLOBAL m_handle
Definition: win-objects.h:79

Member Function Documentation

void* CGlobalLockScope::GetPtr ( ) const
inline

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

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

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

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

Field Documentation

HGLOBAL CGlobalLockScope::m_handle
private

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

void* CGlobalLockScope::m_ptr
private

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


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