ReactOS  0.4.14-dev-337-gf981a68
propbag.c File Reference
#include "mshtml_private.h"
Include dependency graph for propbag.c:

Go to the source code of this file.

Classes

struct  PropertyBag
 
struct  param_prop_t
 

Functions

static void free_prop (param_prop_t *prop)
 
static param_prop_tfind_prop (PropertyBag *prop_bag, const WCHAR *name)
 
static HRESULT add_prop (PropertyBag *prop_bag, const WCHAR *name, const WCHAR *value)
 
static PropertyBagimpl_from_IPropertyBag (IPropertyBag *iface)
 
static HRESULT WINAPI PropertyBag_QueryInterface (IPropertyBag *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PropertyBag_AddRef (IPropertyBag *iface)
 
static ULONG WINAPI PropertyBag_Release (IPropertyBag *iface)
 
static HRESULT WINAPI PropertyBag_Read (IPropertyBag *iface, LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog)
 
static HRESULT WINAPI PropertyBag_Write (IPropertyBag *iface, LPCOLESTR pszPropName, VARIANT *pVar)
 
static PropertyBagimpl_from_IPropertyBag2 (IPropertyBag2 *iface)
 
static HRESULT WINAPI PropertyBag2_QueryInterface (IPropertyBag2 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PropertyBag2_AddRef (IPropertyBag2 *iface)
 
static ULONG WINAPI PropertyBag2_Release (IPropertyBag2 *iface)
 
static HRESULT WINAPI PropertyBag2_Read (IPropertyBag2 *iface, ULONG cProperties, PROPBAG2 *pPropBag, IErrorLog *pErrLog, VARIANT *pvarValue, HRESULT *phrError)
 
static HRESULT WINAPI PropertyBag2_Write (IPropertyBag2 *iface, ULONG cProperties, PROPBAG2 *pPropBag, VARIANT *pvarValue)
 
static HRESULT WINAPI PropertyBag2_CountProperties (IPropertyBag2 *iface, ULONG *pcProperties)
 
static HRESULT WINAPI PropertyBag2_GetPropertyInfo (IPropertyBag2 *iface, ULONG iProperty, ULONG cProperties, PROPBAG2 *pPropBag, ULONG *pcProperties)
 
static HRESULT WINAPI PropertyBag2_LoadObject (IPropertyBag2 *iface, LPCOLESTR pstrName, DWORD dwHint, IUnknown *pUnkObject, IErrorLog *pErrLog)
 
static HRESULT fill_props (nsIDOMHTMLElement *nselem, PropertyBag *prop_bag)
 
HRESULT create_param_prop_bag (nsIDOMHTMLElement *nselem, IPropertyBag **ret)
 

Variables

static const IPropertyBagVtbl PropertyBagVtbl
 
static const IPropertyBag2Vtbl PropertyBag2Vtbl
 

Function Documentation

◆ add_prop()

static HRESULT add_prop ( PropertyBag prop_bag,
const WCHAR name,
const WCHAR value 
)
static

Definition at line 57 of file propbag.c.

58 {
59  param_prop_t *prop;
60 
61  if(!name || !value)
62  return S_OK;
63 
64  TRACE("%p %s %s\n", prop_bag, debugstr_w(name), debugstr_w(value));
65 
66  prop = heap_alloc(sizeof(*prop));
67  if(!prop)
68  return E_OUTOFMEMORY;
69 
70  prop->name = heap_strdupW(name);
71  prop->value = heap_strdupW(value);
72  if(!prop->name || !prop->value) {
73  list_init(&prop->entry);
74  free_prop(prop);
75  return E_OUTOFMEMORY;
76  }
77 
78  list_add_tail(&prop_bag->props, &prop->entry);
79  return S_OK;
80 }
static void free_prop(param_prop_t *prop)
Definition: propbag.c:36
struct list props
Definition: propbag.c:27
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
__WINE_SERVER_LIST_INLINE void list_add_tail(struct list *list, struct list *elem)
Definition: list.h:102
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static WCHAR * heap_strdupW(const WCHAR *str)
Definition: propsheet.c:178
#define debugstr_w
Definition: kernel32.h:32
WCHAR * value
Definition: propbag.c:33
#define TRACE(s)
Definition: solgame.cpp:4
struct list entry
Definition: propbag.c:31
#define S_OK
Definition: intsafe.h:59
WCHAR * name
Definition: propbag.c:32
Definition: name.c:36
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149

Referenced by fill_props().

◆ create_param_prop_bag()

HRESULT create_param_prop_bag ( nsIDOMHTMLElement nselem,
IPropertyBag **  ret 
)

Definition at line 317 of file propbag.c.

318 {
319  PropertyBag *prop_bag;
320  HRESULT hres;
321 
322  prop_bag = heap_alloc(sizeof(*prop_bag));
323  if(!prop_bag)
324  return E_OUTOFMEMORY;
325 
326  prop_bag->IPropertyBag_iface.lpVtbl = &PropertyBagVtbl;
327  prop_bag->IPropertyBag2_iface.lpVtbl = &PropertyBag2Vtbl;
328  prop_bag->ref = 1;
329 
330  list_init(&prop_bag->props);
331  hres = fill_props(nselem, prop_bag);
332  if(FAILED(hres) || list_empty(&prop_bag->props)) {
333  IPropertyBag_Release(&prop_bag->IPropertyBag_iface);
334  *ret = NULL;
335  return hres;
336  }
337 
338  *ret = &prop_bag->IPropertyBag_iface;
339  return S_OK;
340 }
IPropertyBag2 IPropertyBag2_iface
Definition: propbag.c:23
struct list props
Definition: propbag.c:27
static HRESULT fill_props(nsIDOMHTMLElement *nselem, PropertyBag *prop_bag)
Definition: propbag.c:254
static const IPropertyBag2Vtbl PropertyBag2Vtbl
Definition: propbag.c:243
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const IPropertyBagVtbl PropertyBagVtbl
Definition: propbag.c:174
smooth NULL
Definition: ftsmooth.c:416
LONG ref
Definition: propbag.c:25
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
IPropertyBag IPropertyBag_iface
Definition: propbag.c:22
int ret
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
#define S_OK
Definition: intsafe.h:59
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149

Referenced by load_prop_bag().

◆ fill_props()

static HRESULT fill_props ( nsIDOMHTMLElement nselem,
PropertyBag prop_bag 
)
static

Definition at line 254 of file propbag.c.

255 {
256  const PRUnichar *name, *value;
257  nsAString name_str, value_str;
259  nsIDOMHTMLElement *param_elem;
260  UINT32 length, i;
261  nsIDOMNode *nsnode;
262  nsresult nsres;
263  HRESULT hres = S_OK;
264 
265  static const PRUnichar nameW[] = {'n','a','m','e',0};
266  static const PRUnichar paramW[] = {'p','a','r','a','m',0};
267  static const PRUnichar valueW[] = {'v','a','l','u','e',0};
268 
269  nsAString_InitDepend(&name_str, paramW);
270  nsres = nsIDOMHTMLElement_GetElementsByTagName(nselem, &name_str, &params);
271  nsAString_Finish(&name_str);
272  if(NS_FAILED(nsres))
273  return E_FAIL;
274 
275  nsres = nsIDOMHTMLCollection_GetLength(params, &length);
276  if(NS_FAILED(nsres))
277  length = 0;
278 
279  for(i=0; i < length; i++) {
280  nsres = nsIDOMHTMLCollection_Item(params, i, &nsnode);
281  if(NS_FAILED(nsres)) {
282  hres = E_FAIL;
283  break;
284  }
285 
286  nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIDOMHTMLElement, (void**)&param_elem);
287  nsIDOMNode_Release(nsnode);
288  if(NS_FAILED(nsres)) {
289  hres = E_FAIL;
290  break;
291  }
292 
293  nsres = get_elem_attr_value(param_elem, nameW, &name_str, &name);
294  if(NS_SUCCEEDED(nsres)) {
295  nsres = get_elem_attr_value(param_elem, valueW, &value_str, &value);
296  if(NS_SUCCEEDED(nsres)) {
297  hres = add_prop(prop_bag, name, value);
299  }
300 
301  nsAString_Finish(&name_str);
302  }
303 
304  nsIDOMHTMLElement_Release(param_elem);
305  if(FAILED(hres))
306  break;
307  if(NS_FAILED(nsres)) {
308  hres = E_FAIL;
309  break;
310  }
311  }
312 
313  nsIDOMHTMLCollection_Release(params);
314  return hres;
315 }
nsresult get_elem_attr_value(nsIDOMHTMLElement *nselem, const WCHAR *name, nsAString *val_str, const PRUnichar **val)
Definition: htmlelem.c:143
static HRESULT add_prop(PropertyBag *prop_bag, const WCHAR *name, const WCHAR *value)
Definition: propbag.c:57
#define E_FAIL
Definition: ddrawi.h:102
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLenum const GLfloat * params
Definition: glext.h:5645
unsigned int UINT32
static const WCHAR valueW[]
Definition: object.c:48
#define NS_FAILED(res)
static const WCHAR nameW[]
Definition: main.c:46
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define NS_SUCCEEDED(res)
GLsizei const GLfloat * value
Definition: glext.h:6069
#define S_OK
Definition: intsafe.h:59
static UNICODE_STRING value_str
Definition: reg.c:1328
void nsAString_InitDepend(nsAString *, const PRUnichar *) DECLSPEC_HIDDEN
Definition: nsembed.c:826
void nsAString_Finish(nsAString *) DECLSPEC_HIDDEN
Definition: nsembed.c:836
Definition: name.c:36
HRESULT nsresult
Definition: nsiface.idl:39
WCHAR PRUnichar
Definition: nsiface.idl:48
GLuint const GLchar * name
Definition: glext.h:6031

Referenced by create_param_prop_bag().

◆ find_prop()

static param_prop_t* find_prop ( PropertyBag prop_bag,
const WCHAR name 
)
static

Definition at line 45 of file propbag.c.

46 {
47  param_prop_t *iter;
48 
49  LIST_FOR_EACH_ENTRY(iter, &prop_bag->props, param_prop_t, entry) {
50  if(!strcmpiW(iter->name, name))
51  return iter;
52  }
53 
54  return NULL;
55 }
struct list props
Definition: propbag.c:27
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
smooth NULL
Definition: ftsmooth.c:416
uint32_t entry
Definition: isohybrid.c:63
#define strcmpiW(s1, s2)
Definition: unicode.h:39
WCHAR * name
Definition: propbag.c:32
Definition: name.c:36

Referenced by PropertyBag_Read().

◆ free_prop()

static void free_prop ( param_prop_t prop)
static

Definition at line 36 of file propbag.c.

37 {
38  list_remove(&prop->entry);
39 
40  heap_free(prop->name);
41  heap_free(prop->value);
42  heap_free(prop);
43 }
WCHAR * value
Definition: propbag.c:33
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
struct list entry
Definition: propbag.c:31
WCHAR * name
Definition: propbag.c:32
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by add_prop(), and PropertyBag_Release().

◆ impl_from_IPropertyBag()

static PropertyBag* impl_from_IPropertyBag ( IPropertyBag iface)
inlinestatic

Definition at line 82 of file propbag.c.

83 {
84  return CONTAINING_RECORD(iface, PropertyBag, IPropertyBag_iface);
85 }
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 PropertyBag_AddRef(), PropertyBag_QueryInterface(), PropertyBag_Read(), PropertyBag_Release(), and PropertyBag_Write().

◆ impl_from_IPropertyBag2()

static PropertyBag* impl_from_IPropertyBag2 ( IPropertyBag2 iface)
inlinestatic

Definition at line 182 of file propbag.c.

183 {
184  return CONTAINING_RECORD(iface, PropertyBag, IPropertyBag2_iface);
185 }
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 PropertyBag2_AddRef(), PropertyBag2_CountProperties(), PropertyBag2_GetPropertyInfo(), PropertyBag2_LoadObject(), PropertyBag2_QueryInterface(), PropertyBag2_Read(), PropertyBag2_Release(), and PropertyBag2_Write().

◆ PropertyBag2_AddRef()

static ULONG WINAPI PropertyBag2_AddRef ( IPropertyBag2 iface)
static

Definition at line 193 of file propbag.c.

194 {
196  return IPropertyBag_AddRef(&This->IPropertyBag_iface);
197 }
static PropertyBag * impl_from_IPropertyBag2(IPropertyBag2 *iface)
Definition: propbag.c:182

◆ PropertyBag2_CountProperties()

static HRESULT WINAPI PropertyBag2_CountProperties ( IPropertyBag2 iface,
ULONG pcProperties 
)
static

Definition at line 220 of file propbag.c.

221 {
223  FIXME("(%p)->(%p)\n", This, pcProperties);
224  return E_NOTIMPL;
225 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PropertyBag * impl_from_IPropertyBag2(IPropertyBag2 *iface)
Definition: propbag.c:182

◆ PropertyBag2_GetPropertyInfo()

static HRESULT WINAPI PropertyBag2_GetPropertyInfo ( IPropertyBag2 iface,
ULONG  iProperty,
ULONG  cProperties,
PROPBAG2 *  pPropBag,
ULONG pcProperties 
)
static

Definition at line 227 of file propbag.c.

229 {
231  FIXME("(%p)->(%u %u %p %p)\n", This, iProperty, cProperties, pPropBag, pcProperties);
232  return E_NOTIMPL;
233 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PropertyBag * impl_from_IPropertyBag2(IPropertyBag2 *iface)
Definition: propbag.c:182

◆ PropertyBag2_LoadObject()

static HRESULT WINAPI PropertyBag2_LoadObject ( IPropertyBag2 iface,
LPCOLESTR  pstrName,
DWORD  dwHint,
IUnknown pUnkObject,
IErrorLog pErrLog 
)
static

Definition at line 235 of file propbag.c.

237 {
239  FIXME("(%p)->(%s %x %p %p)\n", This, debugstr_w(pstrName), dwHint, pUnkObject, pErrLog);
240  return E_NOTIMPL;
241 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PropertyBag * impl_from_IPropertyBag2(IPropertyBag2 *iface)
Definition: propbag.c:182

◆ PropertyBag2_QueryInterface()

static HRESULT WINAPI PropertyBag2_QueryInterface ( IPropertyBag2 iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 187 of file propbag.c.

188 {
190  return IPropertyBag_QueryInterface(&This->IPropertyBag_iface, riid, ppv);
191 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static PropertyBag * impl_from_IPropertyBag2(IPropertyBag2 *iface)
Definition: propbag.c:182

◆ PropertyBag2_Read()

static HRESULT WINAPI PropertyBag2_Read ( IPropertyBag2 iface,
ULONG  cProperties,
PROPBAG2 *  pPropBag,
IErrorLog pErrLog,
VARIANT pvarValue,
HRESULT phrError 
)
static

Definition at line 205 of file propbag.c.

207 {
209  FIXME("(%p)->(%d %p %p %p %p)\n", This, cProperties, pPropBag, pErrLog, pvarValue, phrError);
210  return E_NOTIMPL;
211 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static PropertyBag * impl_from_IPropertyBag2(IPropertyBag2 *iface)
Definition: propbag.c:182

◆ PropertyBag2_Release()

static ULONG WINAPI PropertyBag2_Release ( IPropertyBag2 iface)
static

Definition at line 199 of file propbag.c.

200 {
202  return IPropertyBag_Release(&This->IPropertyBag_iface);
203 }
static PropertyBag * impl_from_IPropertyBag2(IPropertyBag2 *iface)
Definition: propbag.c:182

◆ PropertyBag2_Write()

static HRESULT WINAPI PropertyBag2_Write ( IPropertyBag2 iface,
ULONG  cProperties,
PROPBAG2 *  pPropBag,
VARIANT pvarValue 
)
static

Definition at line 213 of file propbag.c.

214 {
216  FIXME("(%p)->(%d %p %s)\n", This, cProperties, pPropBag, debugstr_variant(pvarValue));
217  return E_NOTIMPL;
218 }
#define FIXME(fmt,...)
Definition: debug.h:110
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define E_NOTIMPL
Definition: ddrawi.h:99
static PropertyBag * impl_from_IPropertyBag2(IPropertyBag2 *iface)
Definition: propbag.c:182

◆ PropertyBag_AddRef()

static ULONG WINAPI PropertyBag_AddRef ( IPropertyBag iface)
static

Definition at line 110 of file propbag.c.

111 {
114 
115  TRACE("(%p) ref=%d\n", This, ref);
116 
117  return ref;
118 }
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
static PropertyBag * impl_from_IPropertyBag(IPropertyBag *iface)
Definition: propbag.c:82

◆ PropertyBag_QueryInterface()

static HRESULT WINAPI PropertyBag_QueryInterface ( IPropertyBag iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 87 of file propbag.c.

88 {
90 
92  TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
93  *ppv = &This->IPropertyBag_iface;
94  }else if(IsEqualGUID(&IID_IPropertyBag, riid)) {
95  TRACE("(%p)->(IID_IPropertyBag %p)\n", This, ppv);
96  *ppv = &This->IPropertyBag_iface;
97  }else if(IsEqualGUID(&IID_IPropertyBag2, riid)) {
98  TRACE("(%p)->(IID_IPropertyBag2 %p)\n", This, ppv);
99  *ppv = &This->IPropertyBag2_iface;
100  }else {
101  WARN("Unsopported interface %s\n", debugstr_guid(riid));
102  *ppv = NULL;
103  return E_NOINTERFACE;
104  }
105 
106  IUnknown_AddRef((IUnknown*)*ppv);
107  return S_OK;
108 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
#define WARN(fmt,...)
Definition: debug.h:111
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IPropertyBag
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
static PropertyBag * impl_from_IPropertyBag(IPropertyBag *iface)
Definition: propbag.c:82

◆ PropertyBag_Read()

static HRESULT WINAPI PropertyBag_Read ( IPropertyBag iface,
LPCOLESTR  pszPropName,
VARIANT pVar,
IErrorLog pErrorLog 
)
static

Definition at line 136 of file propbag.c.

137 {
139  param_prop_t *prop;
140  VARIANT v;
141 
142  TRACE("(%p)->(%s %p %p)\n", This, debugstr_w(pszPropName), pVar, pErrorLog);
143 
144  prop = find_prop(This, pszPropName);
145  if(!prop) {
146  TRACE("Not found\n");
147  return E_INVALIDARG;
148  }
149 
150  V_BSTR(&v) = SysAllocString(prop->value);
151  if(!V_BSTR(&v))
152  return E_OUTOFMEMORY;
153 
154  if(V_VT(pVar) != VT_BSTR) {
155  HRESULT hres;
156 
157  V_VT(&v) = VT_BSTR;
158  hres = VariantChangeType(pVar, &v, 0, V_VT(pVar));
160  return hres;
161  }
162 
163  V_BSTR(pVar) = V_BSTR(&v);
164  return S_OK;
165 }
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:965
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static param_prop_t * find_prop(PropertyBag *prop_bag, const WCHAR *name)
Definition: propbag.c:45
#define debugstr_w
Definition: kernel32.h:32
WCHAR * value
Definition: propbag.c:33
#define E_INVALIDARG
Definition: ddrawi.h:101
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:241
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define S_OK
Definition: intsafe.h:59
const GLdouble * v
Definition: gl.h:2040
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:274
static PropertyBag * impl_from_IPropertyBag(IPropertyBag *iface)
Definition: propbag.c:82

◆ PropertyBag_Release()

static ULONG WINAPI PropertyBag_Release ( IPropertyBag iface)
static

Definition at line 120 of file propbag.c.

121 {
124 
125  TRACE("(%p) ref=%d\n", This, ref);
126 
127  if(!ref) {
128  while(!list_empty(&This->props))
129  free_prop(LIST_ENTRY(This->props.next, param_prop_t, entry));
130  heap_free(This);
131  }
132 
133  return ref;
134 }
static void free_prop(param_prop_t *prop)
Definition: propbag.c:36
Definition: send.c:47
long LONG
Definition: pedump.c:60
GLenum GLint ref
Definition: glext.h:6028
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
uint32_t entry
Definition: isohybrid.c:63
__WINE_SERVER_LIST_INLINE int list_empty(const struct list *list)
Definition: list.h:143
static PropertyBag * impl_from_IPropertyBag(IPropertyBag *iface)
Definition: propbag.c:82
#define LIST_ENTRY(type)
Definition: queue.h:175
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

◆ PropertyBag_Write()

static HRESULT WINAPI PropertyBag_Write ( IPropertyBag iface,
LPCOLESTR  pszPropName,
VARIANT pVar 
)
static

Definition at line 167 of file propbag.c.

168 {
170  FIXME("(%p)->(%s %s)\n", This, debugstr_w(pszPropName), debugstr_variant(pVar));
171  return E_NOTIMPL;
172 }
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define E_NOTIMPL
Definition: ddrawi.h:99
static PropertyBag * impl_from_IPropertyBag(IPropertyBag *iface)
Definition: propbag.c:82

Variable Documentation

◆ PropertyBag2Vtbl

const IPropertyBag2Vtbl PropertyBag2Vtbl
static
Initial value:
= {
}
static ULONG WINAPI PropertyBag2_Release(IPropertyBag2 *iface)
Definition: propbag.c:199
static ULONG WINAPI PropertyBag2_AddRef(IPropertyBag2 *iface)
Definition: propbag.c:193
static HRESULT WINAPI PropertyBag2_Read(IPropertyBag2 *iface, ULONG cProperties, PROPBAG2 *pPropBag, IErrorLog *pErrLog, VARIANT *pvarValue, HRESULT *phrError)
Definition: propbag.c:205
static HRESULT WINAPI PropertyBag2_LoadObject(IPropertyBag2 *iface, LPCOLESTR pstrName, DWORD dwHint, IUnknown *pUnkObject, IErrorLog *pErrLog)
Definition: propbag.c:235
static HRESULT WINAPI PropertyBag2_CountProperties(IPropertyBag2 *iface, ULONG *pcProperties)
Definition: propbag.c:220
static HRESULT WINAPI PropertyBag2_Write(IPropertyBag2 *iface, ULONG cProperties, PROPBAG2 *pPropBag, VARIANT *pvarValue)
Definition: propbag.c:213
static HRESULT WINAPI PropertyBag2_QueryInterface(IPropertyBag2 *iface, REFIID riid, void **ppv)
Definition: propbag.c:187
static HRESULT WINAPI PropertyBag2_GetPropertyInfo(IPropertyBag2 *iface, ULONG iProperty, ULONG cProperties, PROPBAG2 *pPropBag, ULONG *pcProperties)
Definition: propbag.c:227

Definition at line 243 of file propbag.c.

Referenced by create_param_prop_bag().

◆ PropertyBagVtbl

const IPropertyBagVtbl PropertyBagVtbl
static
Initial value:
= {
}
static ULONG WINAPI PropertyBag_AddRef(IPropertyBag *iface)
Definition: propbag.c:110
static ULONG WINAPI PropertyBag_Release(IPropertyBag *iface)
Definition: propbag.c:120
static HRESULT WINAPI PropertyBag_Write(IPropertyBag *iface, LPCOLESTR pszPropName, VARIANT *pVar)
Definition: propbag.c:167
static HRESULT WINAPI PropertyBag_Read(IPropertyBag *iface, LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog)
Definition: propbag.c:136
static HRESULT WINAPI PropertyBag_QueryInterface(IPropertyBag *iface, REFIID riid, void **ppv)
Definition: propbag.c:87

Definition at line 174 of file propbag.c.

Referenced by create_param_prop_bag().