ReactOS 0.4.17-dev-966-gf06eace
mediacatenum.c
Go to the documentation of this file.
1/*
2 * IEnumMoniker implementation for DEVENUM.dll
3 *
4 * Copyright (C) 2002 Robert Shearman
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 *
20 * NOTES ON THIS FILE:
21 * - Implements IEnumMoniker interface which enumerates through moniker
22 * objects created from HKEY_CLASSES/CLSID/{DEVICE_CLSID}/Instance
23 */
24
25#include "devenum_private.h"
26
27#include "wine/debug.h"
28
30
31BOOL array_reserve(void **elements, unsigned int *capacity, unsigned int count, unsigned int size)
32{
33 unsigned int max_capacity, new_capacity;
34 void *new_elements;
35
36 if (count <= *capacity)
37 return TRUE;
38
39 max_capacity = ~0u / size;
40 if (count > max_capacity)
41 return FALSE;
42
43 new_capacity = max(8, *capacity);
44 while (new_capacity < count && new_capacity <= max_capacity / 2)
45 new_capacity *= 2;
46 if (new_capacity < count)
47 new_capacity = count;
48
49 if (!(new_elements = realloc(*elements, new_capacity * size)))
50 {
51 ERR("Failed to allocate memory.\n");
52 return FALSE;
53 }
54
55 *elements = new_elements;
56 *capacity = new_capacity;
57 return TRUE;
58}
59
60typedef struct
61{
63 CLSID class;
65 IEnumDMO *dmo_enum, *dmo_enum2;
71
72static inline struct moniker *impl_from_IPropertyBag(IPropertyBag *iface)
73{
74 return CONTAINING_RECORD(iface, struct moniker, IPropertyBag_iface);
75}
76
78{
79 struct moniker *moniker = impl_from_IPropertyBag(iface);
80
81 TRACE("moniker %p, iid %s, out %p.\n", moniker, debugstr_guid(iid), out);
82
83 if (!out)
84 return E_POINTER;
85
87 {
88 *out = iface;
89 IPropertyBag_AddRef(iface);
90 return S_OK;
91 }
92
93 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
94 *out = NULL;
95 return E_NOINTERFACE;
96}
97
99{
100 struct moniker *moniker = impl_from_IPropertyBag(iface);
101 return IMoniker_AddRef(&moniker->IMoniker_iface);
102}
103
105{
106 struct moniker *moniker = impl_from_IPropertyBag(iface);
107 return IMoniker_Release(&moniker->IMoniker_iface);
108}
109
111 const WCHAR *name, VARIANT *var, IErrorLog *errorlog)
112{
113 struct moniker *moniker = impl_from_IPropertyBag(iface);
114 WCHAR dmo_name[80];
115 DWORD size, type;
116 HKEY parent, key;
117 WCHAR path[78];
118 void *data;
119 HRESULT hr;
120 LONG ret;
121
122 TRACE("moniker %p, name %s, var %p, errorlog %p.\n", moniker, debugstr_w(name), var, errorlog);
123
124 if (!name || !var)
125 return E_POINTER;
126
127 switch (moniker->type)
128 {
129 case DEVICE_DMO:
130 if (!wcscmp(name, L"FriendlyName"))
131 {
132 if (SUCCEEDED(hr = DMOGetName(&moniker->clsid, dmo_name)))
133 {
134 V_VT(var) = VT_BSTR;
135 V_BSTR(var) = SysAllocString(dmo_name);
136 }
137 return hr;
138 }
139 if (!wcscmp(name, L"FilterData"))
140 {
141 DMO_PARTIAL_MEDIATYPE *types = NULL, *new_array;
142 ULONG count = 1, input_count, output_count, i;
143 REGFILTERPINS2 reg_pins[2] = {{0}};
144 REGFILTER2 reg_filter = {0};
145 REGPINTYPES *reg_types;
146 HRESULT hr;
147
148 do
149 {
150 count *= 2;
151 if (!(new_array = realloc(types, 2 * count * sizeof(*types))))
152 {
153 free(types);
154 return E_OUTOFMEMORY;
155 }
156 types = new_array;
157
158 if (FAILED(hr = DMOGetTypes(&moniker->clsid, count, &input_count, types,
159 count, &output_count, types + count)))
160 {
161 free(types);
162 return hr;
163 }
164 } while (input_count == count || output_count == count);
165
166 if (!(reg_types = malloc(2 * count * sizeof(*reg_types))))
167 {
168 free(types);
169 return hr;
170 }
171
172 for (i = 0; i < input_count; ++i)
173 {
174 reg_types[i].clsMajorType = &types[i].type;
175 reg_types[i].clsMinorType = &types[i].subtype;
176 }
177 for (i = 0; i < output_count; ++i)
178 {
179 reg_types[count + i].clsMajorType = &types[count + i].type;
180 reg_types[count + i].clsMinorType = &types[count + i].subtype;
181 }
182 reg_pins[0].cInstances = 1;
183 reg_pins[0].nMediaTypes = input_count;
184 reg_pins[0].lpMediaType = reg_types;
185 reg_pins[1].dwFlags = REG_PINFLAG_B_OUTPUT;
186 reg_pins[1].cInstances = 1;
187 reg_pins[1].nMediaTypes = output_count;
188 reg_pins[1].lpMediaType = reg_types + count;
189 reg_filter.dwVersion = 2;
190 reg_filter.dwMerit = MERIT_NORMAL + 0x800;
191 reg_filter.cPins2 = 2;
192 reg_filter.rgPins2 = reg_pins;
193
194 hr = create_filter_data(var, &reg_filter);
195 free(reg_types);
196 free(types);
197 return hr;
198 }
200
201 case DEVICE_FILTER:
202 wcscpy(path, L"CLSID\\");
203 if (moniker->has_class)
204 {
206 wcscat(path, L"\\Instance");
207 }
208#ifdef __REACTOS__
210#else
212#endif
213 return HRESULT_FROM_WIN32(ret);
214 break;
215
216 case DEVICE_CODEC:
217 wcscpy(path, L"Software\\Microsoft\\ActiveMovie\\devenum\\");
218 if (moniker->has_class)
220#ifdef __REACTOS__
222#else
224#endif
225 return HRESULT_FROM_WIN32(ret);
226 break;
227
229 }
230
233 if (ret)
234 return HRESULT_FROM_WIN32(ret);
235
236 if ((ret = RegQueryValueExW(key, name, NULL, NULL, NULL, &size)))
237 {
239 return HRESULT_FROM_WIN32(ret);
240 }
241
242 data = malloc(size);
243 if ((ret = RegQueryValueExW(key, name, NULL, &type, data, &size)))
244 {
246 free(data);
247 return HRESULT_FROM_WIN32(ret);
248 }
250
251 switch (type)
252 {
253 case REG_SZ:
254 if (V_VT(var) == VT_EMPTY)
255 V_VT(var) = VT_BSTR;
256 if (V_VT(var) != VT_BSTR)
257 {
258 WARN("Invalid type %s.\n", debugstr_vt(V_VT(var)));
259 return E_INVALIDARG;
260 }
261 V_BSTR(var) = SysAllocStringLen(data, size / sizeof(WCHAR) - 1);
262 free(data);
263 return S_OK;
264 case REG_DWORD:
265 if (V_VT(var) == VT_EMPTY)
266 V_VT(var) = VT_I4;
267 if (V_VT(var) != VT_I4)
268 {
269 WARN("Invalid type %s.\n", debugstr_vt(V_VT(var)));
270 return E_INVALIDARG;
271 }
272 V_I4(var) = *(DWORD *)data;
273 free(data);
274 return S_OK;
275 case REG_BINARY:
276 {
277 SAFEARRAYBOUND bound = {.cElements = size};
278 void *array_data;
279
280 if (V_VT(var) == VT_EMPTY)
281 V_VT(var) = VT_ARRAY | VT_UI1;
282 if (V_VT(var) != (VT_ARRAY | VT_UI1))
283 {
284 WARN("Invalid type %s.\n", debugstr_vt(V_VT(var)));
285 return E_INVALIDARG;
286 }
287
288 if (!(V_ARRAY(var) = SafeArrayCreate(VT_UI1, 1, &bound)))
289 {
290 free(data);
291 return E_OUTOFMEMORY;
292 }
293
294 SafeArrayAccessData(V_ARRAY(var), &array_data);
295 memcpy(array_data, data, size);
297 free(data);
298 return S_OK;
299 }
300 default:
301 FIXME("Unhandled type %#lx.\n", type);
302 free(data);
303 return E_NOTIMPL;
304 }
305}
306
308{
309 struct moniker *moniker = impl_from_IPropertyBag(iface);
310 HKEY parent, key;
311 WCHAR path[78];
312 LONG ret;
313
314 TRACE("moniker %p, name %s, var %s.\n", moniker, debugstr_w(name), debugstr_variant(var));
315
316 switch (moniker->type)
317 {
318 case DEVICE_DMO:
319 return E_ACCESSDENIED;
320
321 case DEVICE_FILTER:
322 wcscpy(path, L"CLSID\\");
323 if (moniker->has_class)
324 {
326 wcscat(path, L"\\Instance");
327 }
328#ifdef __REACTOS__ /* ReactOS denies zero access opens */
330#else
332#endif
333 return HRESULT_FROM_WIN32(ret);
334 break;
335
336 case DEVICE_CODEC:
337 wcscpy(path, L"Software\\Microsoft\\ActiveMovie\\devenum\\");
338 if (moniker->has_class)
340#ifdef __REACTOS__ /* ReactOS denies zero access opens */
342#else
344#endif
345 return HRESULT_FROM_WIN32(ret);
346 break;
347
349 }
352 if (ret)
353 return HRESULT_FROM_WIN32(ret);
354
355 switch (V_VT(var))
356 {
357 case VT_BSTR:
359 (wcslen(V_BSTR(var)) + 1) * sizeof(WCHAR));
360 break;
361 case VT_I4:
362 ret = RegSetValueExW(key, name, 0, REG_DWORD, (BYTE *)&V_I4(var), sizeof(DWORD));
363 break;
364 case VT_ARRAY | VT_UI1:
365 {
366 LONG lbound, ubound;
367 void *array_data;
368 SafeArrayGetLBound(V_ARRAY(var), 1, &lbound);
369 SafeArrayGetUBound(V_ARRAY(var), 1, &ubound);
370 SafeArrayAccessData(V_ARRAY(var), &array_data);
371 ret = RegSetValueExW(key, name, 0, REG_BINARY, array_data, ubound - lbound + 1);
373 break;
374 }
375 default:
376 WARN("Unhandled type %s.\n", debugstr_vt(V_VT(var)));
377 return E_INVALIDARG;
378 }
379
381 return S_OK;
382}
383
384static const IPropertyBagVtbl IPropertyBag_Vtbl =
385{
391};
392
393static inline struct moniker *impl_from_IMoniker(IMoniker *iface)
394{
395 return CONTAINING_RECORD(iface, struct moniker, IMoniker_iface);
396}
397
399{
400 TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
401
402 if (!ppv)
403 return E_POINTER;
404
408 IsEqualGUID(riid, &IID_IMoniker))
409 {
410 *ppv = iface;
411 IMoniker_AddRef(iface);
412 return S_OK;
413 }
414
415 FIXME("- no interface IID: %s\n", debugstr_guid(riid));
416 *ppv = NULL;
417 return E_NOINTERFACE;
418}
419
421{
422 struct moniker *moniker = impl_from_IMoniker(iface);
424
425 TRACE("%p increasing refcount to %lu.\n", moniker, refcount);
426
427 return refcount;
428}
429
431{
432 struct moniker *This = impl_from_IMoniker(iface);
433 ULONG refcount = InterlockedDecrement(&This->ref);
434
435 TRACE("%p decreasing refcount to %lu.\n", This, refcount);
436
437 if (!refcount)
438 {
439 free(This->name);
440 free(This);
441 }
442 return refcount;
443}
444
446{
447 struct moniker *This = impl_from_IMoniker(iface);
448
449 TRACE("(%p)->(%p)\n", This, pClassID);
450
451 if (pClassID == NULL)
452 return E_INVALIDARG;
453
454 *pClassID = CLSID_CDeviceMoniker;
455
456 return S_OK;
457}
458
460{
461 FIXME("(%p)->(): stub\n", iface);
462
463 return S_FALSE;
464}
465
467{
468 FIXME("(%p)->(%p): stub\n", iface, pStm);
469
470 return E_NOTIMPL;
471}
472
473static HRESULT WINAPI moniker_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty)
474{
475 FIXME("(%p)->(%p, %s): stub\n", iface, pStm, fClearDirty ? "true" : "false");
476
477 return STG_E_CANTSAVE;
478}
479
481{
482 FIXME("(%p)->(%p): stub\n", iface, pcbSize);
483
484 ZeroMemory(pcbSize, sizeof(*pcbSize));
485
486 return S_OK;
487}
488
490 IMoniker *left, REFIID iid, void **out)
491{
492 struct moniker *moniker = impl_from_IMoniker(iface);
493 IPersistPropertyBag *persist_bag;
494 IUnknown *unk;
495 CLSID clsid;
496 VARIANT var;
497 HRESULT hr;
498
499 TRACE("moniker %p, bind_ctx %p, left %p, iid %s, out %p.\n",
500 moniker, bind_ctx, left, debugstr_guid(iid), out);
501
502 if (!out)
503 return E_POINTER;
504
505 *out = NULL;
506
507 if (moniker->type == DEVICE_DMO)
508 {
509 IDMOWrapperFilter *wrapper;
510
511 if (FAILED(hr = CoCreateInstance(&CLSID_DMOWrapperFilter, NULL,
512 CLSCTX_INPROC_SERVER, &IID_IDMOWrapperFilter, (void **)&wrapper)))
513 return hr;
514
515 if (SUCCEEDED(hr = IDMOWrapperFilter_Init(wrapper, &moniker->clsid, &moniker->class)))
516 {
517 hr = IDMOWrapperFilter_QueryInterface(wrapper, iid, out);
518 }
519 IDMOWrapperFilter_Release(wrapper);
520 return hr;
521 }
522
524 V_VT(&var) = VT_BSTR;
525 if (FAILED(hr = IPropertyBag_Read(&moniker->IPropertyBag_iface, L"CLSID", &var, NULL)))
526 return hr;
527
530 if (FAILED(hr))
531 return hr;
532
533 if (FAILED(hr = CoCreateInstance(&clsid, NULL, CLSCTX_ALL, &IID_IUnknown, (void **)&unk)))
534 return hr;
535
536 if (SUCCEEDED(IUnknown_QueryInterface(unk, &IID_IPersistPropertyBag, (void **)&persist_bag)))
537 {
538 hr = IPersistPropertyBag_Load(persist_bag, &moniker->IPropertyBag_iface, NULL);
539 IPersistPropertyBag_Release(persist_bag);
540 }
541
542 if (SUCCEEDED(hr))
543 hr = IUnknown_QueryInterface(unk, iid, out);
544
545 IUnknown_Release(unk);
546
547 return hr;
548}
549
551 IMoniker *pmkToLeft, REFIID riid, void **out)
552{
553 struct moniker *moniker = impl_from_IMoniker(iface);
554
555 TRACE("moniker %p, left %p, iid %s, out %p.\n", moniker, pmkToLeft, debugstr_guid(riid), out);
556
557 *out = NULL;
558
559 if (pmkToLeft)
560 return MK_E_NOSTORAGE;
561
562 if (pbc != NULL)
563 {
564 static DWORD reported;
565 if (!reported)
566 {
567 FIXME("ignoring IBindCtx %p\n", pbc);
568 reported++;
569 }
570 }
571
573 {
575 IPropertyBag_AddRef(&moniker->IPropertyBag_iface);
576 return S_OK;
577 }
578
579 return MK_E_NOSTORAGE;
580}
581
583 DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
584{
585 struct moniker *moniker = impl_from_IMoniker(iface);
586
587 TRACE("moniker %p, bind_ctx %p, how_far %#lx, left %p, reduced %p.\n",
588 moniker, pbc, dwReduceHowFar, ppmkToLeft, ppmkReduced);
589
590 if (ppmkToLeft)
591 *ppmkToLeft = NULL;
592 *ppmkReduced = iface;
593
595}
596
598 BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
599{
600 FIXME("(%p)->(%p, %s, %p): stub\n", iface, pmkRight, fOnlyIfNotGeneric ? "true" : "false", ppmkComposite);
601
602 /* FIXME: use CreateGenericComposite? */
603 *ppmkComposite = NULL;
604
605 return E_NOTIMPL;
606}
607
608static HRESULT WINAPI moniker_Enum(IMoniker *iface, BOOL fForward,
609 IEnumMoniker **ppenumMoniker)
610{
611 FIXME("(%p)->(%s, %p): stub\n", iface, fForward ? "true" : "false", ppenumMoniker);
612
613 *ppenumMoniker = NULL;
614
615 return S_OK;
616}
617
618static HRESULT WINAPI moniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker)
619{
620 CLSID clsid;
621 LPOLESTR this_name, other_name;
622 IBindCtx *bind;
623 HRESULT res;
624
625 TRACE("(%p)->(%p)\n", iface, pmkOtherMoniker);
626
627 if (!pmkOtherMoniker)
628 return E_INVALIDARG;
629
630 IMoniker_GetClassID(pmkOtherMoniker, &clsid);
631 if (!IsEqualCLSID(&clsid, &CLSID_CDeviceMoniker))
632 return S_FALSE;
633
634 res = CreateBindCtx(0, &bind);
635 if (FAILED(res))
636 return res;
637
638 res = S_FALSE;
639 if (SUCCEEDED(IMoniker_GetDisplayName(iface, bind, NULL, &this_name)) &&
640 SUCCEEDED(IMoniker_GetDisplayName(pmkOtherMoniker, bind, NULL, &other_name)))
641 {
642 int result = wcsicmp(this_name, other_name);
643 CoTaskMemFree(this_name);
644 CoTaskMemFree(other_name);
645 if (!result)
646 res = S_OK;
647 }
648 IBindCtx_Release(bind);
649 return res;
650}
651
652static HRESULT WINAPI moniker_Hash(IMoniker *iface, DWORD *pdwHash)
653{
654 TRACE("(%p)->(%p)\n", iface, pdwHash);
655
656 *pdwHash = 0;
657
658 return S_OK;
659}
660
662 IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
663{
664 FIXME("(%p)->(%p, %p, %p): stub\n", iface, pbc, pmkToLeft, pmkNewlyRunning);
665
666 return S_FALSE;
667}
668
670 IMoniker *pmkToLeft, FILETIME *pFileTime)
671{
672 TRACE("(%p)->(%p, %p, %p)\n", iface, pbc, pmkToLeft, pFileTime);
673
674 pFileTime->dwLowDateTime = 0xFFFFFFFF;
675 pFileTime->dwHighDateTime = 0x7FFFFFFF;
676
677 return MK_E_UNAVAILABLE;
678}
679
681{
682 TRACE("(%p)->(%p)\n", iface, ppmk);
683
684 *ppmk = NULL;
685
686 return MK_E_NOINVERSE;
687}
688
690 IMoniker *pmkOtherMoniker, IMoniker **ppmkPrefix)
691{
692 TRACE("(%p)->(%p, %p)\n", iface, pmkOtherMoniker, ppmkPrefix);
693
694 *ppmkPrefix = NULL;
695
696 return MK_E_NOPREFIX;
697}
698
700 IMoniker **ppmkRelPath)
701{
702 TRACE("(%p)->(%p, %p)\n", iface, pmkOther, ppmkRelPath);
703
704 *ppmkRelPath = pmkOther;
705
706 return MK_S_HIM;
707}
708
710 IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
711{
712 struct moniker *This = impl_from_IMoniker(iface);
713 WCHAR *buffer;
714
715 TRACE("(%p)->(%p, %p, %p)\n", iface, pbc, pmkToLeft, ppszDisplayName);
716
717 *ppszDisplayName = NULL;
718
719 if (This->type == DEVICE_DMO)
720 {
721 buffer = CoTaskMemAlloc((12 + 2 * CHARS_IN_GUID + 1) * sizeof(WCHAR));
722 if (!buffer) return E_OUTOFMEMORY;
723
724 wcscpy(buffer, L"@device:dmo:");
727 }
728 else
729 {
730 buffer = CoTaskMemAlloc((11 + (This->has_class ? CHARS_IN_GUID : 0)
731 + wcslen(This->name) + 1) * sizeof(WCHAR));
732 if (!buffer) return E_OUTOFMEMORY;
733
734 if (This->type == DEVICE_FILTER)
735 wcscpy(buffer, L"@device:sw:");
736 else if (This->type == DEVICE_CODEC)
737 wcscpy(buffer, L"@device:cm:");
738
739 if (This->has_class)
740 {
742 wcscat(buffer, L"\\");
743 }
744 wcscat(buffer, This->name);
745 }
746
747 *ppszDisplayName = buffer;
748 return S_OK;
749}
750
752 IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
753{
754 FIXME("(%p)->(%p, %p, %s, %p, %p)\n", iface, pbc, pmkToLeft, debugstr_w(pszDisplayName), pchEaten, ppmkOut);
755
756 *pchEaten = 0;
757 *ppmkOut = NULL;
758
759 return MK_E_SYNTAX;
760}
761
763{
764 TRACE("(%p)->(%p)\n", iface, pdwMksys);
765
766 return S_FALSE;
767}
768
769static const IMonikerVtbl IMoniker_Vtbl =
770{
794};
795
796struct moniker *filter_moniker_create(const GUID *class, const WCHAR *name)
797{
798 struct moniker *object;
799
800 if (!(object = calloc(1, sizeof(*object))))
801 return NULL;
802
803 object->IMoniker_iface.lpVtbl = &IMoniker_Vtbl;
804 object->IPropertyBag_iface.lpVtbl = &IPropertyBag_Vtbl;
805 object->ref = 1;
806 object->type = DEVICE_FILTER;
807 if (class)
808 object->class = *class;
809 object->has_class = !!class;
810 object->name = wcsdup(name);
811
812 return object;
813}
814
815struct moniker *codec_moniker_create(const GUID *class, const WCHAR *name)
816{
817 struct moniker *object;
818
819 if (!(object = calloc(1, sizeof(*object))))
820 return NULL;
821
822 object->IMoniker_iface.lpVtbl = &IMoniker_Vtbl;
823 object->IPropertyBag_iface.lpVtbl = &IPropertyBag_Vtbl;
824 object->ref = 1;
825 object->type = DEVICE_CODEC;
826 if (class)
827 object->class = *class;
828 object->has_class = !!class;
829 object->name = wcsdup(name);
830
831 return object;
832}
833
834struct moniker *dmo_moniker_create(const GUID class, const GUID clsid)
835{
836 struct moniker *object;
837
838 if (!(object = calloc(1, sizeof(*object))))
839 return NULL;
840
841 object->IMoniker_iface.lpVtbl = &IMoniker_Vtbl;
842 object->IPropertyBag_iface.lpVtbl = &IPropertyBag_Vtbl;
843 object->ref = 1;
844 object->type = DEVICE_DMO;
845 object->class = class;
846 object->clsid = clsid;
847
848 return object;
849}
850
852{
853 return CONTAINING_RECORD(iface, EnumMonikerImpl, IEnumMoniker_iface);
854}
855
857{
858 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
859
860 if (!ppv)
861 return E_POINTER;
862
865 {
866 *ppv = iface;
867 IEnumMoniker_AddRef(iface);
868 return S_OK;
869 }
870
871 FIXME("- no interface IID: %s\n", debugstr_guid(riid));
872 *ppv = NULL;
873 return E_NOINTERFACE;
874}
875
877{
878 EnumMonikerImpl *enumerator = impl_from_IEnumMoniker(iface);
879 ULONG refcount = InterlockedIncrement(&enumerator->ref);
880
881 TRACE("%p increasing refcount to %lu.\n", enumerator, refcount);
882
883 return refcount;
884}
885
887{
889 ULONG refcount = InterlockedDecrement(&This->ref);
890
891 TRACE("%p decreasing refcount to %lu.\n", This, refcount);
892
893 if (!refcount)
894 {
895 if (This->dmo_enum)
896 IEnumDMO_Release(This->dmo_enum);
897 if (This->dmo_enum2)
898 IEnumDMO_Release(This->dmo_enum2);
899 RegCloseKey(This->sw_key);
900 RegCloseKey(This->cm_key);
901 free(This);
902 return 0;
903 }
904 return refcount;
905}
906
908{
909 GUID clsid;
910
911 if (IsEqualGUID(&enum_moniker->class, &CLSID_LegacyAmFilterCategory))
912 {
913 if (enum_moniker->dmo_enum && IEnumDMO_Next(enum_moniker->dmo_enum, 1, &clsid, NULL, NULL) == S_OK)
914 return dmo_moniker_create(DMOCATEGORY_AUDIO_DECODER, clsid);
915 if (enum_moniker->dmo_enum2 && IEnumDMO_Next(enum_moniker->dmo_enum2, 1, &clsid, NULL, NULL) == S_OK)
916 return dmo_moniker_create(DMOCATEGORY_VIDEO_DECODER, clsid);
917 }
918 else
919 {
920 if (enum_moniker->dmo_enum && IEnumDMO_Next(enum_moniker->dmo_enum, 1, &clsid, NULL, NULL) == S_OK)
921 return dmo_moniker_create(enum_moniker->class, clsid);
922 }
923
924 return NULL;
925}
926
928 ULONG *pceltFetched)
929{
931 WCHAR buffer[MAX_PATH + 1];
932 struct moniker *moniker;
933 LONG res;
934 ULONG fetched = 0;
935 HKEY hkey;
936
937 TRACE("enumerator %p, count %lu, monikers %p, ret_count %p.\n", This, celt, rgelt, pceltFetched);
938
939 while (fetched < celt)
940 {
941 /* FIXME: try PNP devices first */
942
943 /* try DMOs */
945 ;
946 /* try DirectShow filters */
947 else if (!(res = RegEnumKeyW(This->sw_key, This->sw_index, buffer, ARRAY_SIZE(buffer))))
948 {
949 This->sw_index++;
950 if ((res = RegOpenKeyExW(This->sw_key, buffer, 0, KEY_QUERY_VALUE, &hkey)))
951 break;
952
954 }
955 /* then try codecs */
956 else if (!(res = RegEnumKeyW(This->cm_key, This->cm_index, buffer, ARRAY_SIZE(buffer))))
957 {
958 This->cm_index++;
959
960 if ((res = RegOpenKeyExW(This->cm_key, buffer, 0, KEY_QUERY_VALUE, &hkey)))
961 break;
962
964 }
965 else
966 break;
967
968 if (!moniker)
969 return E_OUTOFMEMORY;
970
971 rgelt[fetched++] = &moniker->IMoniker_iface;
972 }
973
974 TRACE("Returning %lu monikers.\n", fetched);
975
976 if (pceltFetched)
977 *pceltFetched = fetched;
978
979 if (fetched != celt)
980 return S_FALSE;
981 else
982 return S_OK;
983}
984
986{
988
989 TRACE("enumerator %p, count %lu.\n", This, celt);
990
991 while (celt--)
992 {
993 /* FIXME: try PNP devices first */
994
995 /* try DMOs */
996 if (This->dmo_enum && IEnumDMO_Skip(This->dmo_enum, 1) == S_OK)
997 ;
998 else if (This->dmo_enum2 && IEnumDMO_Skip(This->dmo_enum2, 1) == S_OK)
999 ;
1000 /* try DirectShow filters */
1001 else if (RegEnumKeyW(This->sw_key, This->sw_index, NULL, 0) != ERROR_NO_MORE_ITEMS)
1002 {
1003 This->sw_index++;
1004 }
1005 /* then try codecs */
1006 else if (RegEnumKeyW(This->cm_key, This->cm_index, NULL, 0) != ERROR_NO_MORE_ITEMS)
1007 {
1008 This->cm_index++;
1009 }
1010 else
1011 return S_FALSE;
1012 }
1013
1014 return S_OK;
1015}
1016
1018{
1020
1021 TRACE("(%p)->()\n", iface);
1022
1023 if (This->dmo_enum)
1024 IEnumDMO_Reset(This->dmo_enum);
1025 if (This->dmo_enum2)
1026 IEnumDMO_Reset(This->dmo_enum2);
1027 This->sw_index = 0;
1028 This->cm_index = 0;
1029
1030 return S_OK;
1031}
1032
1034{
1035 FIXME("(%p)->(%p): stub\n", iface, ppenum);
1036
1037 return E_NOTIMPL;
1038}
1039
1040/**********************************************************************
1041 * IEnumMoniker_Vtbl
1042 */
1043static const IEnumMonikerVtbl IEnumMoniker_Vtbl =
1044{
1052};
1053
1055{
1057 WCHAR buffer[78];
1058
1059 if (!(object = calloc(1, sizeof(*object))))
1060 return E_OUTOFMEMORY;
1061
1062 object->IEnumMoniker_iface.lpVtbl = &IEnumMoniker_Vtbl;
1063 object->ref = 1;
1064 object->class = *class;
1065
1066 wcscpy(buffer, L"CLSID\\");
1068 wcscat(buffer, L"\\Instance");
1070 object->sw_key = NULL;
1071
1072 wcscpy(buffer, L"Software\\Microsoft\\ActiveMovie\\devenum\\");
1075 object->cm_key = NULL;
1076
1077 if (IsEqualGUID(class, &CLSID_LegacyAmFilterCategory))
1078 {
1079 if (FAILED(DMOEnum(&DMOCATEGORY_AUDIO_DECODER, 0, 0, NULL, 0, NULL, &object->dmo_enum)))
1080 object->dmo_enum = NULL;
1081 if (FAILED(DMOEnum(&DMOCATEGORY_VIDEO_DECODER, 0, 0, NULL, 0, NULL, &object->dmo_enum2)))
1082 object->dmo_enum2 = NULL;
1083 }
1084 else
1085 {
1086 if (FAILED(DMOEnum(class, 0, 0, NULL, 0, NULL, &object->dmo_enum)))
1087 object->dmo_enum = NULL;
1088 }
1089
1090 *out = &object->IEnumMoniker_iface;
1091
1092 return S_OK;
1093}
#define REG_SZ
Definition: layer.c:22
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
REGPINTYPES
Definition: axextend.idl:194
@ REG_PINFLAG_B_OUTPUT
Definition: axextend.idl:221
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
#define RegCloseKey(hKey)
Definition: registry.h:49
#define CHARS_IN_GUID
HRESULT create_filter_data(VARIANT *var, REGFILTER2 *rgf)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
@ DEVICE_FILTER
@ DEVICE_DMO
@ DEVICE_CODEC
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
LONG WINAPI RegEnumKeyW(HKEY hKey, DWORD dwIndex, LPWSTR lpName, DWORD cbName)
Definition: reg.c:2393
INT WINAPI StringFromGUID2(REFGUID guid, LPOLESTR str, INT cmax)
Definition: combase.c:1525
HRESULT WINAPI CLSIDFromString(LPCOLESTR str, LPCLSID clsid)
Definition: combase.c:1470
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
void *WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: malloc.c:381
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
#define MAX_PATH
Definition: compat.h:34
@ VT_BSTR
Definition: compat.h:2303
@ VT_ARRAY
Definition: compat.h:2341
@ VT_I4
Definition: compat.h:2298
@ VT_EMPTY
Definition: compat.h:2295
@ VT_UI1
Definition: compat.h:2311
#define wcsicmp
Definition: compat.h:15
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2988
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1977
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY *psa, UINT nDim, LONG *plUbound)
Definition: safearray.c:1033
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1137
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1168
HRESULT WINAPI SafeArrayGetLBound(SAFEARRAY *psa, UINT nDim, LONG *plLbound)
Definition: safearray.c:1066
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
Definition: safearray.c:600
HRESULT WINAPI DMOEnum(REFGUID category, DWORD flags, DWORD cInTypes, const DMO_PARTIAL_MEDIATYPE *pInTypes, DWORD cOutTypes, const DMO_PARTIAL_MEDIATYPE *pOutTypes, IEnumDMO **ppEnum)
Definition: dmoreg.c:674
HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR name[80])
Definition: dmoreg.c:282
HRESULT WINAPI DMOGetTypes(REFCLSID clsid, ULONG input_count, ULONG *ret_input_count, DMO_PARTIAL_MEDIATYPE *input, ULONG output_count, ULONG *ret_output_count, DMO_PARTIAL_MEDIATYPE *output)
Definition: dmoreg.c:722
static const char * debugstr_variant(const VARIANT *var)
Definition: dom.c:505
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
r parent
Definition: btrfs.c:3010
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLuint res
Definition: glext.h:9613
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLint left
Definition: glext.h:7726
GLuint64EXT * result
Definition: glext.h:11304
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
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 * u
Definition: glfuncs.h:240
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
static HRESULT WINAPI moniker_Hash(IMoniker *iface, DWORD *pdwHash)
Definition: mediacatenum.c:652
static ULONG WINAPI enum_moniker_AddRef(IEnumMoniker *iface)
Definition: mediacatenum.c:876
static HRESULT WINAPI property_bag_Read(IPropertyBag *iface, const WCHAR *name, VARIANT *var, IErrorLog *errorlog)
Definition: mediacatenum.c:110
static HRESULT WINAPI moniker_BindToObject(IMoniker *iface, IBindCtx *bind_ctx, IMoniker *left, REFIID iid, void **out)
Definition: mediacatenum.c:489
static const IEnumMonikerVtbl IEnumMoniker_Vtbl
static struct moniker * impl_from_IPropertyBag(IPropertyBag *iface)
Definition: mediacatenum.c:72
static HRESULT WINAPI moniker_Enum(IMoniker *iface, BOOL fForward, IEnumMoniker **ppenumMoniker)
Definition: mediacatenum.c:608
static struct moniker * impl_from_IMoniker(IMoniker *iface)
Definition: mediacatenum.c:393
static HRESULT WINAPI moniker_IsRunning(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, IMoniker *pmkNewlyRunning)
Definition: mediacatenum.c:661
static HRESULT WINAPI moniker_Load(IMoniker *iface, IStream *pStm)
Definition: mediacatenum.c:466
static HRESULT WINAPI enum_moniker_Reset(IEnumMoniker *iface)
static HRESULT WINAPI moniker_ComposeWith(IMoniker *iface, IMoniker *pmkRight, BOOL fOnlyIfNotGeneric, IMoniker **ppmkComposite)
Definition: mediacatenum.c:597
static EnumMonikerImpl * impl_from_IEnumMoniker(IEnumMoniker *iface)
Definition: mediacatenum.c:851
static HRESULT WINAPI moniker_GetTimeOfLastChange(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, FILETIME *pFileTime)
Definition: mediacatenum.c:669
static HRESULT WINAPI enum_moniker_QueryInterface(IEnumMoniker *iface, REFIID riid, void **ppv)
Definition: mediacatenum.c:856
static HRESULT WINAPI moniker_Reduce(IMoniker *iface, IBindCtx *pbc, DWORD dwReduceHowFar, IMoniker **ppmkToLeft, IMoniker **ppmkReduced)
Definition: mediacatenum.c:582
static ULONG WINAPI moniker_Release(IMoniker *iface)
Definition: mediacatenum.c:430
static HRESULT WINAPI moniker_RelativePathTo(IMoniker *iface, IMoniker *pmkOther, IMoniker **ppmkRelPath)
Definition: mediacatenum.c:699
static HRESULT WINAPI enum_moniker_Next(IEnumMoniker *iface, ULONG celt, IMoniker **rgelt, ULONG *pceltFetched)
Definition: mediacatenum.c:927
static ULONG WINAPI property_bag_Release(IPropertyBag *iface)
Definition: mediacatenum.c:104
static HRESULT WINAPI moniker_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR pszDisplayName, ULONG *pchEaten, IMoniker **ppmkOut)
Definition: mediacatenum.c:751
struct moniker * filter_moniker_create(const GUID *class, const WCHAR *name)
Definition: mediacatenum.c:796
static const IPropertyBagVtbl IPropertyBag_Vtbl
Definition: mediacatenum.c:384
BOOL array_reserve(void **elements, unsigned int *capacity, unsigned int count, unsigned int size)
Definition: mediacatenum.c:31
static HRESULT WINAPI moniker_BindToStorage(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, REFIID riid, void **out)
Definition: mediacatenum.c:550
static ULONG WINAPI property_bag_AddRef(IPropertyBag *iface)
Definition: mediacatenum.c:98
static struct moniker * get_dmo_moniker(EnumMonikerImpl *enum_moniker)
Definition: mediacatenum.c:907
static HRESULT WINAPI enum_moniker_Clone(IEnumMoniker *iface, IEnumMoniker **ppenum)
static HRESULT WINAPI moniker_GetSizeMax(IMoniker *iface, ULARGE_INTEGER *pcbSize)
Definition: mediacatenum.c:480
static HRESULT WINAPI moniker_IsEqual(IMoniker *iface, IMoniker *pmkOtherMoniker)
Definition: mediacatenum.c:618
static HRESULT WINAPI moniker_QueryInterface(IMoniker *iface, REFIID riid, void **ppv)
Definition: mediacatenum.c:398
static HRESULT WINAPI moniker_IsSystemMoniker(IMoniker *iface, DWORD *pdwMksys)
Definition: mediacatenum.c:762
static HRESULT WINAPI moniker_IsDirty(IMoniker *iface)
Definition: mediacatenum.c:459
static HRESULT WINAPI moniker_CommonPrefixWith(IMoniker *iface, IMoniker *pmkOtherMoniker, IMoniker **ppmkPrefix)
Definition: mediacatenum.c:689
HRESULT enum_moniker_create(REFCLSID class, IEnumMoniker **out)
static HRESULT WINAPI property_bag_QueryInterface(IPropertyBag *iface, REFIID iid, void **out)
Definition: mediacatenum.c:77
struct moniker * codec_moniker_create(const GUID *class, const WCHAR *name)
Definition: mediacatenum.c:815
static ULONG WINAPI moniker_AddRef(IMoniker *iface)
Definition: mediacatenum.c:420
static const IMonikerVtbl IMoniker_Vtbl
Definition: mediacatenum.c:769
static HRESULT WINAPI property_bag_Write(IPropertyBag *iface, const WCHAR *name, VARIANT *var)
Definition: mediacatenum.c:307
static ULONG WINAPI enum_moniker_Release(IEnumMoniker *iface)
Definition: mediacatenum.c:886
static HRESULT WINAPI moniker_GetClassID(IMoniker *iface, CLSID *pClassID)
Definition: mediacatenum.c:445
struct moniker * dmo_moniker_create(const GUID class, const GUID clsid)
Definition: mediacatenum.c:834
static HRESULT WINAPI enum_moniker_Skip(IEnumMoniker *iface, ULONG celt)
Definition: mediacatenum.c:985
static HRESULT WINAPI moniker_Inverse(IMoniker *iface, IMoniker **ppmk)
Definition: mediacatenum.c:680
static HRESULT WINAPI moniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft, LPOLESTR *ppszDisplayName)
Definition: mediacatenum.c:709
static HRESULT WINAPI moniker_Save(IMoniker *iface, IStream *pStm, BOOL fClearDirty)
Definition: mediacatenum.c:473
#define ZeroMemory
Definition: minwinbase.h:31
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
const char * var
Definition: shader.c:5879
const CLSID * clsid
Definition: msctf.cpp:50
#define REG_BINARY
Definition: nt_native.h:1499
#define KEY_READ
Definition: nt_native.h:1026
#define KEY_CREATE_SUB_KEY
Definition: nt_native.h:1021
#define KEY_QUERY_VALUE
Definition: nt_native.h:1019
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1022
#define KEY_WRITE
Definition: nt_native.h:1034
#define DEFAULT_UNREACHABLE
HRESULT WINAPI CreateBindCtx(DWORD reserved, IBindCtx **bind_context)
Definition: bindctx.c:491
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:240
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:341
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define V_I4(A)
Definition: oleauto.h:247
const GUID IID_IPropertyBag
const GUID IID_IEnumMoniker
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
const GUID IID_IPersist
Definition: proxy.cpp:14
const GUID IID_IPersistStream
Definition: proxy.cpp:13
const GUID IID_IPersistPropertyBag
Definition: proxy.cpp:11
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
#define calloc
Definition: rosglue.h:14
#define REG_DWORD
Definition: sdbapi.c:615
wcscat
wcscpy
INT WSAAPI bind(IN SOCKET s, IN CONST struct sockaddr *name, IN INT namelen)
Definition: socklife.c:36
#define TRACE(s)
Definition: solgame.cpp:4
IEnumDMO * dmo_enum
Definition: mediacatenum.c:65
IEnumMoniker IEnumMoniker_iface
Definition: mediacatenum.c:62
DWORD dwVersion
Definition: axextend.idl:238
DWORD dwMerit
Definition: axextend.idl:239
const REGFILTERPINS2 * rgPins2
Definition: axextend.idl:253
ULONG cPins2
Definition: axextend.idl:252
const REGPINTYPES * lpMediaType
Definition: axextend.idl:230
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65
Definition: copy.c:22
WCHAR * name
CLSID class
IPropertyBag IPropertyBag_iface
IMoniker IMoniker_iface
CLSID clsid
BOOL has_class
enum device_type type
Definition: name.c:39
Definition: cmds.c:130
#define max(a, b)
Definition: svc.c:63
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:626
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:547
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210
#define MK_S_REDUCED_TO_SELF
Definition: winerror.h:3892
#define MK_E_UNAVAILABLE
Definition: winerror.h:3894
#define STG_E_CANTSAVE
Definition: winerror.h:3687
#define E_NOINTERFACE
Definition: winerror.h:3479
#define MK_E_NOINVERSE
Definition: winerror.h:3907
#define E_ACCESSDENIED
Definition: winerror.h:4116
#define MK_E_NOPREFIX
Definition: winerror.h:3909
#define MK_E_SYNTAX
Definition: winerror.h:3896
#define MK_S_HIM
Definition: winerror.h:3897
#define E_POINTER
Definition: winerror.h:3480
#define MK_E_NOSTORAGE
Definition: winerror.h:3908
#define ERROR_NOT_FOUND
Definition: winerror.h:1014
#define HKEY_CURRENT_USER
Definition: winreg.h:11
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
unsigned char BYTE
Definition: xxhash.c:193