ReactOS  0.4.15-dev-1377-ga59cecd
propstore.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "propsys.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "initguid.h"
#include "propsys_private.h"
Include dependency graph for propstore.c:

Go to the source code of this file.

Classes

struct  propstore_value
 
struct  propstore_format
 
struct  PropertyStore
 

Macros

#define COBJMACROS
 

Functions

 DEFINE_GUID (FMTID_NamedProperties, 0xd5cdd505, 0x2e9c, 0x101b, 0x93, 0x97, 0x08, 0x00, 0x2b, 0x2c, 0xf9, 0xae)
 
 WINE_DEFAULT_DEBUG_CHANNEL (propsys)
 
static PropertyStoreimpl_from_IPropertyStoreCache (IPropertyStoreCache *iface)
 
static HRESULT WINAPI PropertyStore_QueryInterface (IPropertyStoreCache *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI PropertyStore_AddRef (IPropertyStoreCache *iface)
 
static void destroy_format (propstore_format *format)
 
static ULONG WINAPI PropertyStore_Release (IPropertyStoreCache *iface)
 
static HRESULT WINAPI PropertyStore_GetCount (IPropertyStoreCache *iface, DWORD *cProps)
 
static HRESULT WINAPI PropertyStore_GetAt (IPropertyStoreCache *iface, DWORD iProp, PROPERTYKEY *pkey)
 
static HRESULT PropertyStore_LookupValue (PropertyStore *This, REFPROPERTYKEY key, BOOL insert, propstore_value **result)
 
static HRESULT WINAPI PropertyStore_GetValue (IPropertyStoreCache *iface, REFPROPERTYKEY key, PROPVARIANT *pv)
 
static HRESULT WINAPI PropertyStore_SetValue (IPropertyStoreCache *iface, REFPROPERTYKEY key, REFPROPVARIANT propvar)
 
static HRESULT WINAPI PropertyStore_Commit (IPropertyStoreCache *iface)
 
static HRESULT WINAPI PropertyStore_GetState (IPropertyStoreCache *iface, REFPROPERTYKEY key, PSC_STATE *pstate)
 
static HRESULT WINAPI PropertyStore_GetValueAndState (IPropertyStoreCache *iface, REFPROPERTYKEY key, PROPVARIANT *ppropvar, PSC_STATE *pstate)
 
static HRESULT WINAPI PropertyStore_SetState (IPropertyStoreCache *iface, REFPROPERTYKEY key, PSC_STATE pstate)
 
static HRESULT WINAPI PropertyStore_SetValueAndState (IPropertyStoreCache *iface, REFPROPERTYKEY key, const PROPVARIANT *ppropvar, PSC_STATE state)
 
HRESULT PropertyStore_CreateInstance (IUnknown *pUnkOuter, REFIID iid, void **ppv)
 

Variables

static const IPropertyStoreCacheVtbl PropertyStore_Vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file propstore.c.

Function Documentation

◆ DEFINE_GUID()

DEFINE_GUID ( FMTID_NamedProperties  ,
0xd5cdd505  ,
0x2e9c  ,
0x101b  ,
0x93  ,
0x97  ,
0x08  ,
0x00  ,
0x2b  ,
0x2c  ,
0xf9  ,
0xae   
)

◆ destroy_format()

static void destroy_format ( propstore_format format)
static

Definition at line 100 of file propstore.c.

101 {
102  propstore_value *cursor, *cursor2;
104  {
105  PropVariantClear(&cursor->propvar);
107  }
109 }
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: ole2.c:2968
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define GetProcessHeap()
Definition: compat.h:595
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
const char cursor[]
Definition: icontest.c:13
#define HeapFree(x, y, z)
Definition: compat.h:594

Referenced by PropertyStore_Release().

◆ impl_from_IPropertyStoreCache()

static PropertyStore* impl_from_IPropertyStoreCache ( IPropertyStoreCache iface)
inlinestatic

Definition at line 61 of file propstore.c.

62 {
63  return CONTAINING_RECORD(iface, PropertyStore, IPropertyStoreCache_iface);
64 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by PropertyStore_AddRef(), PropertyStore_GetAt(), PropertyStore_GetCount(), PropertyStore_GetState(), PropertyStore_GetValue(), PropertyStore_GetValueAndState(), PropertyStore_QueryInterface(), PropertyStore_Release(), PropertyStore_SetState(), PropertyStore_SetValue(), and PropertyStore_SetValueAndState().

◆ PropertyStore_AddRef()

static ULONG WINAPI PropertyStore_AddRef ( IPropertyStoreCache iface)
static

Definition at line 90 of file propstore.c.

91 {
94 
95  TRACE("(%p) refcount=%u\n", iface, ref);
96 
97  return ref;
98 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ PropertyStore_Commit()

static HRESULT WINAPI PropertyStore_Commit ( IPropertyStoreCache iface)
static

Definition at line 326 of file propstore.c.

327 {
328  FIXME("%p: stub\n", iface);
329  return S_OK;
330 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define S_OK
Definition: intsafe.h:51

◆ PropertyStore_CreateInstance()

HRESULT PropertyStore_CreateInstance ( IUnknown pUnkOuter,
REFIID  iid,
void **  ppv 
)

Definition at line 451 of file propstore.c.

452 {
454  HRESULT ret;
455 
456  TRACE("(%p,%s,%p)\n", pUnkOuter, debugstr_guid(iid), ppv);
457 
458  *ppv = NULL;
459 
460  if (pUnkOuter) return CLASS_E_NOAGGREGATION;
461 
462  This = HeapAlloc(GetProcessHeap(), 0, sizeof(PropertyStore));
463  if (!This) return E_OUTOFMEMORY;
464 
465  This->IPropertyStoreCache_iface.lpVtbl = &PropertyStore_Vtbl;
466  This->ref = 1;
468  This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PropertyStore.lock");
469  list_init(&This->formats);
470 
471  ret = IPropertyStoreCache_QueryInterface(&This->IPropertyStoreCache_iface, iid, ppv);
472  IPropertyStoreCache_Release(&This->IPropertyStoreCache_iface);
473 
474  return ret;
475 }
#define DWORD_PTR
Definition: treelist.c:76
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG HRESULT
Definition: typedefs.h:79
int ret
static const IPropertyStoreCacheVtbl PropertyStore_Vtbl
Definition: propstore.c:436
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define NULL
Definition: types.h:112
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149

Referenced by InMemoryPropertyStoreFactory_CreateInstance(), and PSCreateMemoryPropertyStore().

◆ PropertyStore_GetAt()

static HRESULT WINAPI PropertyStore_GetAt ( IPropertyStoreCache iface,
DWORD  iProp,
PROPERTYKEY *  pkey 
)
static

Definition at line 154 of file propstore.c.

156 {
158  propstore_format *format=NULL, *format_candidate;
160  HRESULT hr;
161 
162  TRACE("%p,%d,%p\n", iface, iProp, pkey);
163 
164  if (!pkey)
165  return E_POINTER;
166 
167  EnterCriticalSection(&This->lock);
168 
169  LIST_FOR_EACH_ENTRY(format_candidate, &This->formats, propstore_format, entry)
170  {
171  if (format_candidate->count > iProp)
172  {
173  format = format_candidate;
174  pkey->fmtid = format->fmtid;
175  break;
176  }
177 
178  iProp -= format_candidate->count;
179  }
180 
181  if (format)
182  {
184  {
185  if (iProp == 0)
186  {
187  pkey->pid = value->pid;
188  break;
189  }
190 
191  iProp--;
192  }
193 
194  hr = S_OK;
195  }
196  else
197  hr = E_INVALIDARG;
198 
199  LeaveCriticalSection(&This->lock);
200 
201  return hr;
202 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define E_INVALIDARG
Definition: ddrawi.h:101
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
uint32_t entry
Definition: isohybrid.c:63
GLsizei const GLfloat * value
Definition: glext.h:6069
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define E_POINTER
Definition: winerror.h:2365

◆ PropertyStore_GetCount()

static HRESULT WINAPI PropertyStore_GetCount ( IPropertyStoreCache iface,
DWORD cProps 
)
static

Definition at line 131 of file propstore.c.

133 {
136 
137  TRACE("%p,%p\n", iface, cProps);
138 
139  if (!cProps)
140  return E_POINTER;
141 
142  *cProps = 0;
143 
144  EnterCriticalSection(&This->lock);
145 
147  *cProps += format->count;
148 
149  LeaveCriticalSection(&This->lock);
150 
151  return S_OK;
152 }
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t entry
Definition: isohybrid.c:63
#define S_OK
Definition: intsafe.h:51
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define E_POINTER
Definition: winerror.h:2365

◆ PropertyStore_GetState()

static HRESULT WINAPI PropertyStore_GetState ( IPropertyStoreCache iface,
REFPROPERTYKEY  key,
PSC_STATE *  pstate 
)
static

Definition at line 332 of file propstore.c.

334 {
337  HRESULT hr;
338 
339  TRACE("%p,%p,%p\n", iface, key, pstate);
340 
341  EnterCriticalSection(&This->lock);
342 
344 
345  if (SUCCEEDED(hr))
346  *pstate = value->state;
347 
348  LeaveCriticalSection(&This->lock);
349 
350  if (FAILED(hr))
351  *pstate = PSC_NORMAL;
352 
353  return hr;
354 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define FALSE
Definition: types.h:117
if SUCCEEDED(hr)
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static HRESULT PropertyStore_LookupValue(PropertyStore *This, REFPROPERTYKEY key, BOOL insert, propstore_value **result)
Definition: propstore.c:204
GLsizei const GLfloat * value
Definition: glext.h:6069
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
Definition: path.c:41

◆ PropertyStore_GetValue()

static HRESULT WINAPI PropertyStore_GetValue ( IPropertyStoreCache iface,
REFPROPERTYKEY  key,
PROPVARIANT *  pv 
)
static

Definition at line 269 of file propstore.c.

271 {
274  HRESULT hr;
275 
276  TRACE("%p,%p,%p\n", iface, key, pv);
277 
278  if (!pv)
279  return E_POINTER;
280 
281  EnterCriticalSection(&This->lock);
282 
284 
285  if (SUCCEEDED(hr))
286  hr = PropVariantCopy(pv, &value->propvar);
287  else if (hr == TYPE_E_ELEMENTNOTFOUND)
288  {
289  PropVariantInit(pv);
290  hr = S_OK;
291  }
292 
293  LeaveCriticalSection(&This->lock);
294 
295  return hr;
296 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define FALSE
Definition: types.h:117
if SUCCEEDED(hr)
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
Definition: ole2.c:3086
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static HRESULT PropertyStore_LookupValue(PropertyStore *This, REFPROPERTYKEY key, BOOL insert, propstore_value **result)
Definition: propstore.c:204
GLsizei const GLfloat * value
Definition: glext.h:6069
#define S_OK
Definition: intsafe.h:51
#define TYPE_E_ELEMENTNOTFOUND
Definition: winerror.h:2539
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define E_POINTER
Definition: winerror.h:2365
Definition: path.c:41

◆ PropertyStore_GetValueAndState()

static HRESULT WINAPI PropertyStore_GetValueAndState ( IPropertyStoreCache iface,
REFPROPERTYKEY  key,
PROPVARIANT *  ppropvar,
PSC_STATE *  pstate 
)
static

Definition at line 356 of file propstore.c.

358 {
361  HRESULT hr;
362 
363  TRACE("%p,%p,%p,%p\n", iface, key, ppropvar, pstate);
364 
365  EnterCriticalSection(&This->lock);
366 
368 
369  if (SUCCEEDED(hr))
370  hr = PropVariantCopy(ppropvar, &value->propvar);
371 
372  if (SUCCEEDED(hr))
373  *pstate = value->state;
374 
375  LeaveCriticalSection(&This->lock);
376 
377  if (FAILED(hr))
378  {
379  PropVariantInit(ppropvar);
380  *pstate = PSC_NORMAL;
381  }
382 
383  return hr;
384 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define FALSE
Definition: types.h:117
if SUCCEEDED(hr)
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
Definition: ole2.c:3086
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static HRESULT PropertyStore_LookupValue(PropertyStore *This, REFPROPERTYKEY key, BOOL insert, propstore_value **result)
Definition: propstore.c:204
GLsizei const GLfloat * value
Definition: glext.h:6069
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
Definition: path.c:41

◆ PropertyStore_LookupValue()

static HRESULT PropertyStore_LookupValue ( PropertyStore This,
REFPROPERTYKEY  key,
BOOL  insert,
propstore_value **  result 
)
static

Definition at line 204 of file propstore.c.

206 {
207  propstore_format *format=NULL, *format_candidate;
208  propstore_value *value=NULL, *value_candidate;
209 
210  if (IsEqualGUID(&key->fmtid, &FMTID_NamedProperties))
211  {
212  /* This is used in the property store format [MS-PROPSTORE]
213  * for named values and probably gets special treatment. */
214  ERR("don't know how to handle FMTID_NamedProperties\n");
215  return E_FAIL;
216  }
217 
218  LIST_FOR_EACH_ENTRY(format_candidate, &This->formats, propstore_format, entry)
219  {
220  if (IsEqualGUID(&format_candidate->fmtid, &key->fmtid))
221  {
222  format = format_candidate;
223  break;
224  }
225  }
226 
227  if (!format)
228  {
229  if (!insert)
230  return TYPE_E_ELEMENTNOTFOUND;
231 
233  if (!format)
234  return E_OUTOFMEMORY;
235 
236  format->fmtid = key->fmtid;
237  list_init(&format->values);
238  list_add_tail(&This->formats, &format->entry);
239  }
240 
241  LIST_FOR_EACH_ENTRY(value_candidate, &format->values, propstore_value, entry)
242  {
243  if (value_candidate->pid == key->pid)
244  {
245  value = value_candidate;
246  break;
247  }
248  }
249 
250  if (!value)
251  {
252  if (!insert)
253  return TYPE_E_ELEMENTNOTFOUND;
254 
256  if (!value)
257  return E_OUTOFMEMORY;
258 
259  value->pid = key->pid;
260  list_add_tail(&format->values, &value->entry);
261  format->count++;
262  }
263 
264  *result = value;
265 
266  return S_OK;
267 }
GLuint64EXT * result
Definition: glext.h:11304
static int insert
Definition: xmllint.c:144
#define E_FAIL
Definition: ddrawi.h:102
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
uint32_t entry
Definition: isohybrid.c:63
GLsizei const GLfloat * value
Definition: glext.h:6069
#define ERR(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
#define TYPE_E_ELEMENTNOTFOUND
Definition: winerror.h:2539
Definition: path.c:41

Referenced by PropertyStore_GetState(), PropertyStore_GetValue(), PropertyStore_GetValueAndState(), PropertyStore_SetState(), PropertyStore_SetValue(), and PropertyStore_SetValueAndState().

◆ PropertyStore_QueryInterface()

static HRESULT WINAPI PropertyStore_QueryInterface ( IPropertyStoreCache iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 66 of file propstore.c.

68 {
70  TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
71 
72  if (!ppv) return E_INVALIDARG;
73 
74  if (IsEqualIID(&IID_IUnknown, iid) || IsEqualIID(&IID_IPropertyStore, iid) ||
75  IsEqualIID(&IID_IPropertyStoreCache, iid))
76  {
77  *ppv = &This->IPropertyStoreCache_iface;
78  }
79  else
80  {
81  FIXME("No interface for %s\n", debugstr_guid(iid));
82  *ppv = NULL;
83  return E_NOINTERFACE;
84  }
85 
86  IUnknown_AddRef((IUnknown*)*ppv);
87  return S_OK;
88 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_INVALIDARG
Definition: ddrawi.h:101
#define debugstr_guid
Definition: kernel32.h:35
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:51
#define NULL
Definition: types.h:112
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ PropertyStore_Release()

static ULONG WINAPI PropertyStore_Release ( IPropertyStoreCache iface)
static

Definition at line 111 of file propstore.c.

112 {
115 
116  TRACE("(%p) refcount=%u\n", iface, ref);
117 
118  if (ref == 0)
119  {
120  propstore_format *cursor, *cursor2;
121  This->lock.DebugInfo->Spare[0] = 0;
122  DeleteCriticalSection(&This->lock);
126  }
127 
128  return ref;
129 }
Definition: send.c:48
GLenum GLint ref
Definition: glext.h:6028
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define InterlockedDecrement
Definition: armddk.h:52
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
const char cursor[]
Definition: icontest.c:13
static void destroy_format(propstore_format *format)
Definition: propstore.c:100
unsigned int ULONG
Definition: retypes.h:1
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ PropertyStore_SetState()

static HRESULT WINAPI PropertyStore_SetState ( IPropertyStoreCache iface,
REFPROPERTYKEY  key,
PSC_STATE  pstate 
)
static

Definition at line 386 of file propstore.c.

388 {
391  HRESULT hr;
392 
393  TRACE("%p,%p,%d\n", iface, key, pstate);
394 
395  EnterCriticalSection(&This->lock);
396 
398 
399  if (SUCCEEDED(hr))
400  value->state = pstate;
401 
402  LeaveCriticalSection(&This->lock);
403 
404  return hr;
405 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define FALSE
Definition: types.h:117
if SUCCEEDED(hr)
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static HRESULT PropertyStore_LookupValue(PropertyStore *This, REFPROPERTYKEY key, BOOL insert, propstore_value **result)
Definition: propstore.c:204
GLsizei const GLfloat * value
Definition: glext.h:6069
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
Definition: path.c:41

◆ PropertyStore_SetValue()

static HRESULT WINAPI PropertyStore_SetValue ( IPropertyStoreCache iface,
REFPROPERTYKEY  key,
REFPROPVARIANT  propvar 
)
static

Definition at line 298 of file propstore.c.

300 {
303  HRESULT hr;
304  PROPVARIANT temp;
305 
306  TRACE("%p,%p,%p\n", iface, key, propvar);
307 
308  EnterCriticalSection(&This->lock);
309 
311 
312  if (SUCCEEDED(hr))
313  hr = PropVariantCopy(&temp, propvar);
314 
315  if (SUCCEEDED(hr))
316  {
317  PropVariantClear(&value->propvar);
318  value->propvar = temp;
319  }
320 
321  LeaveCriticalSection(&This->lock);
322 
323  return hr;
324 }
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: ole2.c:2968
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
if SUCCEEDED(hr)
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
Definition: ole2.c:3086
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static HRESULT PropertyStore_LookupValue(PropertyStore *This, REFPROPERTYKEY key, BOOL insert, propstore_value **result)
Definition: propstore.c:204
GLsizei const GLfloat * value
Definition: glext.h:6069
static calc_node_t temp
Definition: rpn_ieee.c:38
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
Definition: path.c:41

◆ PropertyStore_SetValueAndState()

static HRESULT WINAPI PropertyStore_SetValueAndState ( IPropertyStoreCache iface,
REFPROPERTYKEY  key,
const PROPVARIANT *  ppropvar,
PSC_STATE  state 
)
static

Definition at line 407 of file propstore.c.

409 {
412  HRESULT hr;
413  PROPVARIANT temp;
414 
415  TRACE("%p,%p,%p,%d\n", iface, key, ppropvar, state);
416 
417  EnterCriticalSection(&This->lock);
418 
420 
421  if (SUCCEEDED(hr))
422  hr = PropVariantCopy(&temp, ppropvar);
423 
424  if (SUCCEEDED(hr))
425  {
426  PropVariantClear(&value->propvar);
427  value->propvar = temp;
428  value->state = state;
429  }
430 
431  LeaveCriticalSection(&This->lock);
432 
433  return hr;
434 }
HRESULT hr
Definition: shlfolder.c:183
#define TRUE
Definition: types.h:120
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
Definition: ole2.c:2968
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
if SUCCEEDED(hr)
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
Definition: ole2.c:3086
static PropertyStore * impl_from_IPropertyStoreCache(IPropertyStoreCache *iface)
Definition: propstore.c:61
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:79
static HRESULT PropertyStore_LookupValue(PropertyStore *This, REFPROPERTYKEY key, BOOL insert, propstore_value **result)
Definition: propstore.c:204
static int state
Definition: maze.c:121
GLsizei const GLfloat * value
Definition: glext.h:6069
static calc_node_t temp
Definition: rpn_ieee.c:38
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
Definition: path.c:41

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( propsys  )

Variable Documentation

◆ PropertyStore_Vtbl

const IPropertyStoreCacheVtbl PropertyStore_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI PropertyStore_SetValue(IPropertyStoreCache *iface, REFPROPERTYKEY key, REFPROPVARIANT propvar)
Definition: propstore.c:298
static HRESULT WINAPI PropertyStore_SetState(IPropertyStoreCache *iface, REFPROPERTYKEY key, PSC_STATE pstate)
Definition: propstore.c:386
static ULONG WINAPI PropertyStore_Release(IPropertyStoreCache *iface)
Definition: propstore.c:111
static ULONG WINAPI PropertyStore_AddRef(IPropertyStoreCache *iface)
Definition: propstore.c:90
static HRESULT WINAPI PropertyStore_GetValueAndState(IPropertyStoreCache *iface, REFPROPERTYKEY key, PROPVARIANT *ppropvar, PSC_STATE *pstate)
Definition: propstore.c:356
static HRESULT WINAPI PropertyStore_GetCount(IPropertyStoreCache *iface, DWORD *cProps)
Definition: propstore.c:131
static HRESULT WINAPI PropertyStore_GetState(IPropertyStoreCache *iface, REFPROPERTYKEY key, PSC_STATE *pstate)
Definition: propstore.c:332
static HRESULT WINAPI PropertyStore_GetValue(IPropertyStoreCache *iface, REFPROPERTYKEY key, PROPVARIANT *pv)
Definition: propstore.c:269
static HRESULT WINAPI PropertyStore_QueryInterface(IPropertyStoreCache *iface, REFIID iid, void **ppv)
Definition: propstore.c:66
static HRESULT WINAPI PropertyStore_SetValueAndState(IPropertyStoreCache *iface, REFPROPERTYKEY key, const PROPVARIANT *ppropvar, PSC_STATE state)
Definition: propstore.c:407
static HRESULT WINAPI PropertyStore_GetAt(IPropertyStoreCache *iface, DWORD iProp, PROPERTYKEY *pkey)
Definition: propstore.c:154
static HRESULT WINAPI PropertyStore_Commit(IPropertyStoreCache *iface)
Definition: propstore.c:326

Definition at line 436 of file propstore.c.

Referenced by PropertyStore_CreateInstance().