ReactOS 0.4.15-dev-8116-gf69e256
CBasePropertyBag Class Reference
Inheritance diagram for CBasePropertyBag:
Collaboration diagram for CBasePropertyBag:

Public Member Functions

 CBasePropertyBag (DWORD dwMode)
 
virtual ~CBasePropertyBag ()
 
STDMETHODIMP QueryInterface (REFIID riid, void **ppvObject) override
 
 STDMETHODIMP_ (ULONG) AddRef() override
 
 STDMETHODIMP_ (ULONG) Release() override
 
- Public Member Functions inherited from IPropertyBag
HRESULT Read ([in] LPCOLESTR pszPropName, [in, out] VARIANT *pVar, [in] IErrorLog *pErrorLog)
 
HRESULT RemoteRead ([in] LPCOLESTR pszPropName, [out] VARIANT *pVar, [in] IErrorLog *pErrorLog, [in] DWORD varType, [in] IUnknown *pUnkObj)
 
HRESULT Write ([in] LPCOLESTR pszPropName, [in] VARIANT *pVar)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Protected Attributes

LONG m_cRefs
 
DWORD m_dwMode
 

Additional Inherited Members

- Public Types inherited from IPropertyBag
typedef IPropertyBagLPPROPERTYBAG
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 27 of file propbag.cpp.

Constructor & Destructor Documentation

◆ CBasePropertyBag()

CBasePropertyBag::CBasePropertyBag ( DWORD  dwMode)
inline

Definition at line 38 of file propbag.cpp.

39 : m_cRefs(0)
40 , m_dwMode(dwMode)
41 {
42 }

◆ ~CBasePropertyBag()

virtual CBasePropertyBag::~CBasePropertyBag ( )
inlinevirtual

Definition at line 44 of file propbag.cpp.

44{ }

Member Function Documentation

◆ QueryInterface()

STDMETHODIMP CBasePropertyBag::QueryInterface ( REFIID  riid,
void **  ppvObject 
)
inlineoverride

Implements IUnknown.

Definition at line 47 of file propbag.cpp.

48 {
49 if (!ppvObject)
50 return E_POINTER;
51
52#if (_WIN32_WINNT < _WIN32_WINNT_VISTA)
53 if (::IsEqualGUID(riid, IID_IPropertyBag2))
54 {
55 AddRef();
56 *ppvObject = static_cast<IPropertyBag2*>(this);
57 return S_OK;
58 }
59#endif
61 {
62 AddRef();
63 *ppvObject = static_cast<IPropertyBag*>(this);
64 return S_OK;
65 }
66
67 ERR("%p: %s: E_NOINTERFACE\n", this, debugstr_guid(&riid));
68 return E_NOINTERFACE;
69 }
const GUID IID_IUnknown
#define ERR(fmt,...)
Definition: debug.h:113
REFIID riid
Definition: atlbase.h:39
ULONG AddRef()
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
const GUID IID_IPropertyBag
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365

◆ STDMETHODIMP_() [1/2]

CBasePropertyBag::STDMETHODIMP_ ( ULONG  )
inlineoverride

Definition at line 70 of file propbag.cpp.

71 {
72 return ::InterlockedIncrement(&m_cRefs);
73 }

◆ STDMETHODIMP_() [2/2]

CBasePropertyBag::STDMETHODIMP_ ( ULONG  )
inlineoverride

Definition at line 74 of file propbag.cpp.

75 {
77 {
78 delete this;
79 return 0;
80 }
81 return m_cRefs;
82 }
#define InterlockedDecrement
Definition: armddk.h:52

Member Data Documentation

◆ m_cRefs

LONG CBasePropertyBag::m_cRefs
protected

Definition at line 34 of file propbag.cpp.

Referenced by STDMETHODIMP_().

◆ m_dwMode


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