28#include <propvarutil.h>
80 if (IID_IUnknown == riid || IID_IPropertyStore == riid)
83 IUnknown* pUnk =
static_cast<IPropertyStore*
>(
this);
88 else if (IID_IPropertyStoreCapabilities == riid)
91 IUnknown* pUnk =
static_cast<IPropertyStore*
>(
this);
96 else if (IID_IInitializeWithStream == riid)
99 IUnknown* pUnk =
static_cast<IInitializeWithStream*
>(
this);
106 return E_NOINTERFACE;
112 return InterlockedIncrement( &
m_RefCnt );
131 HRESULT
hr = E_UNEXPECTED;
143 HRESULT
hr = E_UNEXPECTED;
155 HRESULT
hr = E_UNEXPECTED;
165HRESULT STDMETHODCALLTYPE
168 HRESULT
hr = E_UNEXPECTED;
171 hr = STG_E_ACCESSDENIED;
185HRESULT STDMETHODCALLTYPE
197 if ( grfMode & STGM_READWRITE )
198 return STG_E_ACCESSDENIED;
202 if ( FAILED( PSCreateMemoryPropertyStore( IID_PPV_ARGS( &
m_pCache ) ) ) )
213 delete pMetaInfoReader;
215 catch (
const std::exception& e)
229HRESULT GetItemData(
CMetaInfoReader *pMetaInfoReader, UINT nIndex, PROPVARIANT *pVarData )
278 PROPVARIANT propvarValues;
282 PropVariantClear( &propvarValues );
283 HRESULT
hr = GetItemData( pMetaInfoReader,
i, &propvarValues);
321 *ppvObject =
nullptr;
323 if ( IID_IUnknown == riid || IID_IClassFactory == riid )
325 IUnknown* pUnk =
this;
331 return E_NOINTERFACE;
337 return InterlockedIncrement( &
m_RefCnt );
355 IUnknown __RPC_FAR *pUnkOuter,
357 void __RPC_FAR *__RPC_FAR *ppvObject)
359 if ( pUnkOuter !=
nullptr )
360 return CLASS_E_NOAGGREGATION;
362 IUnknown* pUnk =
nullptr;
365 pUnk =
static_cast<IPropertyStore*
>(
new CPropertyHdl() );
369 return E_OUTOFMEMORY;
372 HRESULT
hr = pUnk->QueryInterface( riid, ppvObject );
404 return CLASS_E_CLASSNOTAVAILABLE;
406 if ( (riid != IID_IUnknown) && (riid != IID_IClassFactory) )
407 return E_NOINTERFACE;
virtual HRESULT STDMETHODCALLTYPE LockServer(BOOL fLock) override
virtual HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown __RPC_FAR *pUnkOuter, REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
virtual ULONG STDMETHODCALLTYPE Release() override
virtual ULONG STDMETHODCALLTYPE AddRef() override
CClassFactory(const CLSID &clsid)
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
static LONG s_ServerLocks
virtual HRESULT STDMETHODCALLTYPE SetValue(REFPROPERTYKEY key, REFPROPVARIANT propVar) override
virtual HRESULT STDMETHODCALLTYPE GetCount(DWORD *pcProps) override
void LoadProperties(CMetaInfoReader *pMetaInfoReader)
virtual HRESULT STDMETHODCALLTYPE GetValue(REFPROPERTYKEY key, PROPVARIANT *pPropVar) override
virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable(REFPROPERTYKEY key) override
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void __RPC_FAR *__RPC_FAR *ppvObject) override
virtual HRESULT STDMETHODCALLTYPE Commit() override
CPropertyHdl(LONG RefCnt=1)
virtual ULONG STDMETHODCALLTYPE AddRef() override
virtual HRESULT STDMETHODCALLTYPE GetAt(DWORD iProp, PROPERTYKEY *pkey) override
IPropertyStoreCache * m_pCache
virtual ULONG STDMETHODCALLTYPE Release() override
virtual HRESULT STDMETHODCALLTYPE Initialize(IStream *pStream, DWORD grfMode) override
#define META_INFO_DOCUMENT_STATISTIC
#define META_INFO_SUBJECT
#define META_INFO_KEYWORDS
#define META_INFO_DESCRIPTION
#define SAL_N_ELEMENTS(arr)
static HINSTANCE g_hModule
const PROPERTYKEY g_rgPROPERTIES[]
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
BOOL WINAPI DllMain(HINSTANCE hInst, ULONG, LPVOID)
size_t const gPropertyTableSize
const CLSID CLSID_PROPERTY_HANDLER
const wchar_t *typedef BOOL
void OutputDebugStringFormatW(LPCWSTR pFormat,...)