ReactOS 0.4.16-dev-737-g3368adc
info.c
Go to the documentation of this file.
1/*
2 * Copyright 2009 Vincent Povirk for CodeWeavers
3 * Copyright 2012 Dmitry Timoshkov
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#include <stdarg.h>
21
22#define COBJMACROS
23
24#include "windef.h"
25#include "winbase.h"
26#include "winreg.h"
27#include "objbase.h"
28
29#include "wincodecs_private.h"
30
31#include "wine/debug.h"
32#include "wine/list.h"
33#include "wine/rbtree.h"
34
36
37typedef struct {
43
45 UINT buffer_size, WCHAR *buffer, UINT *actual_size)
46{
47 LONG ret;
48 DWORD cbdata=buffer_size * sizeof(WCHAR);
49
50 if (!actual_size)
51 return E_INVALIDARG;
52
53 ret = RegQueryValueExW(classkey, value, 0, NULL, (void *)buffer, &cbdata);
54
56 {
57 *actual_size = 0;
58 return S_OK;
59 }
60
61 if (ret == 0 || ret == ERROR_MORE_DATA)
62 *actual_size = cbdata/sizeof(WCHAR);
63
64 if (!buffer && buffer_size != 0)
65 /* Yes, native returns the correct size in this case. */
66 return E_INVALIDARG;
67
68 if (ret == ERROR_MORE_DATA)
70
71 return HRESULT_FROM_WIN32(ret);
72}
73
75 GUID *result)
76{
77 LONG ret;
78 WCHAR guid_string[39];
79 DWORD cbdata = sizeof(guid_string);
80 HRESULT hr;
81
82 if (!result)
83 return E_INVALIDARG;
84
86 guid_string, &cbdata);
87
88 if (ret != ERROR_SUCCESS)
89 return HRESULT_FROM_WIN32(ret);
90
91 if (cbdata < sizeof(guid_string))
92 {
93 ERR("incomplete GUID value\n");
94 return E_FAIL;
95 }
96
97 hr = CLSIDFromString(guid_string, result);
98
99 return hr;
100}
101
103 void *result)
104{
105 LONG ret;
106 DWORD cbdata = sizeof(DWORD);
107
108 if (!result)
109 return E_INVALIDARG;
110
112 result, &cbdata);
113
115 {
116 *(UINT *)result = 0;
117 return S_OK;
118 }
119
120 return HRESULT_FROM_WIN32(ret);
121}
122
123static HRESULT ComponentInfo_GetGuidList(HKEY classkey, LPCWSTR subkeyname,
124 UINT buffersize, GUID *buffer, UINT *actual_size)
125{
126 LONG ret;
127 HKEY subkey;
128 UINT items_returned;
129 WCHAR guid_string[39];
130 DWORD guid_string_size;
132
133 if (!actual_size)
134 return E_INVALIDARG;
135
136 ret = RegOpenKeyExW(classkey, subkeyname, 0, KEY_READ, &subkey);
138 {
139 *actual_size = 0;
140 return S_OK;
141 }
142 else if (ret != ERROR_SUCCESS) return HRESULT_FROM_WIN32(ret);
143
144 if (buffer)
145 {
146 items_returned = 0;
147 guid_string_size = 39;
148 while (items_returned < buffersize)
149 {
150 ret = RegEnumKeyExW(subkey, items_returned, guid_string,
151 &guid_string_size, NULL, NULL, NULL, NULL);
152
153 if (ret != ERROR_SUCCESS)
154 {
156 break;
157 }
158
159 if (guid_string_size != 38)
160 {
161 hr = E_FAIL;
162 break;
163 }
164
165 hr = CLSIDFromString(guid_string, &buffer[items_returned]);
166 if (FAILED(hr))
167 break;
168
169 items_returned++;
170 guid_string_size = 39;
171 }
172
174 hr = S_OK;
175
176 *actual_size = items_returned;
177 }
178 else
179 {
180 ret = RegQueryInfoKeyW(subkey, NULL, NULL, NULL, (DWORD *)actual_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
181 if (ret != ERROR_SUCCESS)
183 }
184
185 RegCloseKey(subkey);
186
187 return hr;
188}
189
190typedef struct {
197
199{
200 return CONTAINING_RECORD((IWICComponentInfo*)iface, BitmapDecoderInfo, base.IWICComponentInfo_iface);
201}
202
204 void **ppv)
205{
207 TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
208
209 if (!ppv) return E_INVALIDARG;
210
211 if (IsEqualIID(&IID_IUnknown, iid) ||
212 IsEqualIID(&IID_IWICComponentInfo, iid) ||
213 IsEqualIID(&IID_IWICBitmapCodecInfo, iid) ||
214 IsEqualIID(&IID_IWICBitmapDecoderInfo ,iid))
215 {
216 *ppv = &This->base.IWICComponentInfo_iface;
217 }
218 else
219 {
220 *ppv = NULL;
221 return E_NOINTERFACE;
222 }
223
224 IUnknown_AddRef((IUnknown*)*ppv);
225 return S_OK;
226}
227
229{
231 ULONG ref = InterlockedIncrement(&This->base.ref);
232
233 TRACE("(%p) refcount=%lu\n", iface, ref);
234
235 return ref;
236}
237
239{
241 ULONG ref = InterlockedDecrement(&This->base.ref);
242
243 TRACE("(%p) refcount=%lu\n", iface, ref);
244
245 if (ref == 0)
246 {
247 RegCloseKey(This->classkey);
248 free(This->patterns);
249 free(This);
250 }
251
252 return ref;
253}
254
256 WICComponentType *pType)
257{
258 TRACE("(%p,%p)\n", iface, pType);
259 if (!pType) return E_INVALIDARG;
260 *pType = WICDecoder;
261 return S_OK;
262}
263
265{
267 TRACE("(%p,%p)\n", iface, pclsid);
268
269 if (!pclsid)
270 return E_INVALIDARG;
271
272 *pclsid = This->base.clsid;
273 return S_OK;
274}
275
277{
278 FIXME("(%p,%p): stub\n", iface, pStatus);
279 return E_NOTIMPL;
280}
281
283 WCHAR *wzAuthor, UINT *pcchActual)
284{
286
287 TRACE("(%p,%u,%p,%p)\n", iface, cchAuthor, wzAuthor, pcchActual);
288
289 return ComponentInfo_GetStringValue(This->classkey, L"Author", cchAuthor, wzAuthor, pcchActual);
290}
291
293{
295
296 TRACE("(%p,%p)\n", iface, pguidVendor);
297
298 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", pguidVendor);
299}
300
302 WCHAR *wzVersion, UINT *pcchActual)
303{
305
306 TRACE("(%p,%u,%p,%p)\n", iface, cchVersion, wzVersion, pcchActual);
307
308 return ComponentInfo_GetStringValue(This->classkey, L"Version",
309 cchVersion, wzVersion, pcchActual);
310}
311
313 WCHAR *wzSpecVersion, UINT *pcchActual)
314{
316
317 TRACE("(%p,%u,%p,%p)\n", iface, cchSpecVersion, wzSpecVersion, pcchActual);
318
319 return ComponentInfo_GetStringValue(This->classkey, L"SpecVersion",
320 cchSpecVersion, wzSpecVersion, pcchActual);
321}
322
324 WCHAR *wzFriendlyName, UINT *pcchActual)
325{
327
328 TRACE("(%p,%u,%p,%p)\n", iface, cchFriendlyName, wzFriendlyName, pcchActual);
329
330 return ComponentInfo_GetStringValue(This->classkey, L"FriendlyName",
331 cchFriendlyName, wzFriendlyName, pcchActual);
332}
333
335 GUID *pguidContainerFormat)
336{
338 TRACE("(%p,%p)\n", iface, pguidContainerFormat);
339 return ComponentInfo_GetGUIDValue(This->classkey, L"ContainerFormat", pguidContainerFormat);
340}
341
343 UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
344{
346 TRACE("(%p,%u,%p,%p)\n", iface, cFormats, pguidPixelFormats, pcActual);
347 return ComponentInfo_GetGuidList(This->classkey, L"Formats", cFormats, pguidPixelFormats, pcActual);
348}
349
351 UINT cchColorManagementVersion, WCHAR *wzColorManagementVersion, UINT *pcchActual)
352{
353 FIXME("(%p,%u,%p,%p): stub\n", iface, cchColorManagementVersion, wzColorManagementVersion, pcchActual);
354 return E_NOTIMPL;
355}
356
358 UINT cchDeviceManufacturer, WCHAR *wzDeviceManufacturer, UINT *pcchActual)
359{
360 FIXME("(%p,%u,%p,%p): stub\n", iface, cchDeviceManufacturer, wzDeviceManufacturer, pcchActual);
361 return E_NOTIMPL;
362}
363
365 UINT cchDeviceModels, WCHAR *wzDeviceModels, UINT *pcchActual)
366{
367 FIXME("(%p,%u,%p,%p): stub\n", iface, cchDeviceModels, wzDeviceModels, pcchActual);
368 return E_NOTIMPL;
369}
370
372 UINT cchMimeTypes, WCHAR *wzMimeTypes, UINT *pcchActual)
373{
375
376 TRACE("(%p,%u,%p,%p)\n", iface, cchMimeTypes, wzMimeTypes, pcchActual);
377
378 return ComponentInfo_GetStringValue(This->classkey, L"MimeTypes",
379 cchMimeTypes, wzMimeTypes, pcchActual);
380}
381
383 UINT cchFileExtensions, WCHAR *wzFileExtensions, UINT *pcchActual)
384{
386
387 TRACE("(%p,%u,%p,%p)\n", iface, cchFileExtensions, wzFileExtensions, pcchActual);
388
389 return ComponentInfo_GetStringValue(This->classkey, L"FileExtensions",
390 cchFileExtensions, wzFileExtensions, pcchActual);
391}
392
394 BOOL *pfSupportAnimation)
395{
396 FIXME("(%p,%p): stub\n", iface, pfSupportAnimation);
397 return E_NOTIMPL;
398}
399
401 BOOL *pfSupportChromaKey)
402{
403 FIXME("(%p,%p): stub\n", iface, pfSupportChromaKey);
404 return E_NOTIMPL;
405}
406
408 BOOL *pfSupportLossless)
409{
410 FIXME("(%p,%p): stub\n", iface, pfSupportLossless);
411 return E_NOTIMPL;
412}
413
415 BOOL *pfSupportMultiframe)
416{
417 FIXME("(%p,%p): stub\n", iface, pfSupportMultiframe);
418 return E_NOTIMPL;
419}
420
422 LPCWSTR wzMimeType, BOOL *pfMatches)
423{
424 FIXME("(%p,%s,%p): stub\n", iface, debugstr_w(wzMimeType), pfMatches);
425 return E_NOTIMPL;
426}
427
429 UINT cbSizePatterns, WICBitmapPattern *pPatterns, UINT *pcPatterns, UINT *pcbPatternsActual)
430{
432
433 TRACE("(%p,%i,%p,%p,%p)\n", iface, cbSizePatterns, pPatterns, pcPatterns, pcbPatternsActual);
434
435 if (!pcPatterns || !pcbPatternsActual) return E_INVALIDARG;
436
437 *pcPatterns = This->pattern_count;
438 *pcbPatternsActual = This->patterns_size;
439 if (pPatterns)
440 {
441 if (This->patterns_size && cbSizePatterns < This->patterns_size)
443 memcpy(pPatterns, This->patterns, This->patterns_size);
444 }
445 return S_OK;
446}
447
449 IStream *pIStream, BOOL *pfMatches)
450{
452 HRESULT hr;
453 UINT i;
454 ULONG pos;
455 BYTE *data=NULL;
456 ULONG datasize=0;
457 ULONG bytesread;
458 LARGE_INTEGER seekpos;
459
460 TRACE("(%p,%p,%p)\n", iface, pIStream, pfMatches);
461
462 for (i=0; i < This->pattern_count; i++)
463 {
464 if (datasize < This->patterns[i].Length)
465 {
466 free(data);
467 datasize = This->patterns[i].Length;
468 data = malloc(This->patterns[i].Length);
469 if (!data)
470 {
472 break;
473 }
474 }
475
476 if (This->patterns[i].EndOfStream)
477 seekpos.QuadPart = -This->patterns[i].Position.QuadPart;
478 else
479 seekpos.QuadPart = This->patterns[i].Position.QuadPart;
480 hr = IStream_Seek(pIStream, seekpos, This->patterns[i].EndOfStream ? STREAM_SEEK_END : STREAM_SEEK_SET, NULL);
481 if (hr == STG_E_INVALIDFUNCTION) continue; /* before start of stream */
482 if (FAILED(hr)) break;
483
484 hr = IStream_Read(pIStream, data, This->patterns[i].Length, &bytesread);
485 if (hr == S_FALSE || (hr == S_OK && bytesread != This->patterns[i].Length)) /* past end of stream */
486 continue;
487 if (FAILED(hr)) break;
488
489 for (pos=0; pos < This->patterns[i].Length; pos++)
490 {
491 if ((data[pos] & This->patterns[i].Mask[pos]) != This->patterns[i].Pattern[pos])
492 break;
493 }
494 if (pos == This->patterns[i].Length) /* matches pattern */
495 {
496 hr = S_OK;
497 *pfMatches = TRUE;
498 break;
499 }
500 }
501
502 if (i == This->pattern_count) /* does not match any pattern */
503 {
504 hr = S_OK;
505 *pfMatches = FALSE;
506 }
507
508 free(data);
509 return hr;
510}
511
513 IWICBitmapDecoder **ppIBitmapDecoder)
514{
516
517 TRACE("(%p,%p)\n", iface, ppIBitmapDecoder);
518
519 return create_instance(&This->base.clsid, &IID_IWICBitmapDecoder, (void**)ppIBitmapDecoder);
520}
521
522static const IWICBitmapDecoderInfoVtbl BitmapDecoderInfo_Vtbl = {
549};
550
552{
553 DWORD pattern_count=0;
554 UINT patterns_size=0;
555 WCHAR subkeyname[11];
556 LONG res;
557 HKEY patternskey, patternkey;
558 UINT i;
559 WICBitmapPattern *patterns;
560 BYTE *patterns_ptr;
561 DWORD length, valuesize;
562
563 res = RegOpenKeyExW(info->classkey, L"Patterns", 0, KEY_READ, &patternskey);
564 if (res != ERROR_SUCCESS) return;
565
566 res = RegQueryInfoKeyW(patternskey, NULL, NULL, NULL, &pattern_count, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
567 if (res != ERROR_SUCCESS)
568 {
569 RegCloseKey(patternskey);
570 return;
571 }
572
573 patterns_size = pattern_count * sizeof(WICBitmapPattern);
574 patterns = malloc(patterns_size);
575 if (!patterns)
576 {
577 RegCloseKey(patternskey);
578 return;
579 }
580
581 for (i=0; res == ERROR_SUCCESS && i < pattern_count; i++)
582 {
583 swprintf(subkeyname, 11, L"%u", i);
584 res = RegOpenKeyExW(patternskey, subkeyname, 0, KEY_READ, &patternkey);
585 if (res != ERROR_SUCCESS) break;
586
587 valuesize = sizeof(ULONG);
588 res = RegGetValueW(patternkey, NULL, L"Length", RRF_RT_DWORD, NULL, &length, &valuesize);
589 if (res == ERROR_SUCCESS)
590 {
591 patterns_size += length*2;
592 patterns[i].Length = length;
593
594 valuesize = sizeof(BOOL);
595 res = RegGetValueW(patternkey, NULL, L"EndOfStream", RRF_RT_DWORD, NULL,
596 &patterns[i].EndOfStream, &valuesize);
597 if (res) patterns[i].EndOfStream = 0;
598
599 patterns[i].Position.QuadPart = 0;
600 valuesize = sizeof(ULARGE_INTEGER);
601 res = RegGetValueW(patternkey, NULL, L"Position", RRF_RT_DWORD|RRF_RT_QWORD, NULL,
602 &patterns[i].Position, &valuesize);
603 }
604
605 RegCloseKey(patternkey);
606 }
607
608 if (res != ERROR_SUCCESS || !(patterns_ptr = realloc(patterns, patterns_size)))
609 {
610 free(patterns);
611 RegCloseKey(patternskey);
612 return;
613 }
614 patterns = (WICBitmapPattern*)patterns_ptr;
615 patterns_ptr += pattern_count * sizeof(*patterns);
616
617 for (i=0; res == ERROR_SUCCESS && i < pattern_count; i++)
618 {
619 swprintf(subkeyname, 11, L"%u", i);
620 res = RegOpenKeyExW(patternskey, subkeyname, 0, KEY_READ, &patternkey);
621 if (res != ERROR_SUCCESS) break;
622
623 length = patterns[i].Length;
624 patterns[i].Pattern = patterns_ptr;
625 valuesize = length;
626 res = RegGetValueW(patternkey, NULL, L"Pattern", RRF_RT_REG_BINARY, NULL,
627 patterns[i].Pattern, &valuesize);
628 patterns_ptr += length;
629
630 if (res == ERROR_SUCCESS)
631 {
632 patterns[i].Mask = patterns_ptr;
633 valuesize = length;
634 res = RegGetValueW(patternkey, NULL, L"Mask", RRF_RT_REG_BINARY, NULL,
635 patterns[i].Mask, &valuesize);
636 patterns_ptr += length;
637 }
638
639 RegCloseKey(patternkey);
640 }
641
642 RegCloseKey(patternskey);
643
644 if (res != ERROR_SUCCESS)
645 {
646 free(patterns);
647 return;
648 }
649
650 info->pattern_count = pattern_count;
651 info->patterns_size = patterns_size;
652 info->patterns = patterns;
653}
654
656{
658
659 This = calloc(1, sizeof(BitmapDecoderInfo));
660 if (!This)
661 {
662 RegCloseKey(classkey);
663 return E_OUTOFMEMORY;
664 }
665
666 This->base.IWICComponentInfo_iface.lpVtbl = (const IWICComponentInfoVtbl*)&BitmapDecoderInfo_Vtbl;
667 This->base.ref = 1;
668 This->classkey = classkey;
669 This->base.clsid = *clsid;
670
672
673 *ret = &This->base;
674 return S_OK;
675}
676
677typedef struct {
681
683{
684 return CONTAINING_RECORD((IWICComponentInfo*)iface, BitmapEncoderInfo, base.IWICComponentInfo_iface);
685}
686
688 void **ppv)
689{
691 TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
692
693 if (!ppv) return E_INVALIDARG;
694
695 if (IsEqualIID(&IID_IUnknown, iid) ||
696 IsEqualIID(&IID_IWICComponentInfo, iid) ||
697 IsEqualIID(&IID_IWICBitmapCodecInfo, iid) ||
698 IsEqualIID(&IID_IWICBitmapEncoderInfo ,iid))
699 {
700 *ppv = &This->base.IWICComponentInfo_iface;
701 }
702 else
703 {
704 *ppv = NULL;
705 return E_NOINTERFACE;
706 }
707
708 IUnknown_AddRef((IUnknown*)*ppv);
709 return S_OK;
710}
711
713{
715 ULONG ref = InterlockedIncrement(&This->base.ref);
716
717 TRACE("(%p) refcount=%lu\n", iface, ref);
718
719 return ref;
720}
721
723{
725 ULONG ref = InterlockedDecrement(&This->base.ref);
726
727 TRACE("(%p) refcount=%lu\n", iface, ref);
728
729 if (ref == 0)
730 {
731 RegCloseKey(This->classkey);
732 free(This);
733 }
734
735 return ref;
736}
737
739 WICComponentType *pType)
740{
741 TRACE("(%p,%p)\n", iface, pType);
742 if (!pType) return E_INVALIDARG;
743 *pType = WICEncoder;
744 return S_OK;
745}
746
748{
750 TRACE("(%p,%p)\n", iface, pclsid);
751
752 if (!pclsid)
753 return E_INVALIDARG;
754
755 *pclsid = This->base.clsid;
756 return S_OK;
757}
758
760{
761 FIXME("(%p,%p): stub\n", iface, pStatus);
762 return E_NOTIMPL;
763}
764
766 WCHAR *wzAuthor, UINT *pcchActual)
767{
769
770 TRACE("(%p,%u,%p,%p)\n", iface, cchAuthor, wzAuthor, pcchActual);
771
772 return ComponentInfo_GetStringValue(This->classkey, L"Author", cchAuthor, wzAuthor, pcchActual);
773}
774
776{
778
779 TRACE("(%p,%p)\n", iface, pguidVendor);
780
781 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", pguidVendor);
782}
783
785 WCHAR *wzVersion, UINT *pcchActual)
786{
788
789 TRACE("(%p,%u,%p,%p)\n", iface, cchVersion, wzVersion, pcchActual);
790
791 return ComponentInfo_GetStringValue(This->classkey, L"Version",
792 cchVersion, wzVersion, pcchActual);
793}
794
796 WCHAR *wzSpecVersion, UINT *pcchActual)
797{
799
800 TRACE("(%p,%u,%p,%p)\n", iface, cchSpecVersion, wzSpecVersion, pcchActual);
801
802 return ComponentInfo_GetStringValue(This->classkey, L"SpecVersion",
803 cchSpecVersion, wzSpecVersion, pcchActual);
804}
805
807 WCHAR *wzFriendlyName, UINT *pcchActual)
808{
810
811 TRACE("(%p,%u,%p,%p)\n", iface, cchFriendlyName, wzFriendlyName, pcchActual);
812
813 return ComponentInfo_GetStringValue(This->classkey, L"FriendlyName",
814 cchFriendlyName, wzFriendlyName, pcchActual);
815}
816
818 GUID *pguidContainerFormat)
819{
821 TRACE("(%p,%p)\n", iface, pguidContainerFormat);
822 return ComponentInfo_GetGUIDValue(This->classkey, L"ContainerFormat", pguidContainerFormat);
823}
824
826 UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
827{
829 TRACE("(%p,%u,%p,%p)\n", iface, cFormats, pguidPixelFormats, pcActual);
830 return ComponentInfo_GetGuidList(This->classkey, L"Formats", cFormats, pguidPixelFormats, pcActual);
831}
832
834 UINT cchColorManagementVersion, WCHAR *wzColorManagementVersion, UINT *pcchActual)
835{
836 FIXME("(%p,%u,%p,%p): stub\n", iface, cchColorManagementVersion, wzColorManagementVersion, pcchActual);
837 return E_NOTIMPL;
838}
839
841 UINT cchDeviceManufacturer, WCHAR *wzDeviceManufacturer, UINT *pcchActual)
842{
843 FIXME("(%p,%u,%p,%p): stub\n", iface, cchDeviceManufacturer, wzDeviceManufacturer, pcchActual);
844 return E_NOTIMPL;
845}
846
848 UINT cchDeviceModels, WCHAR *wzDeviceModels, UINT *pcchActual)
849{
850 FIXME("(%p,%u,%p,%p): stub\n", iface, cchDeviceModels, wzDeviceModels, pcchActual);
851 return E_NOTIMPL;
852}
853
855 UINT cchMimeTypes, WCHAR *wzMimeTypes, UINT *pcchActual)
856{
858
859 TRACE("(%p,%u,%p,%p)\n", iface, cchMimeTypes, wzMimeTypes, pcchActual);
860
861 return ComponentInfo_GetStringValue(This->classkey, L"MimeTypes",
862 cchMimeTypes, wzMimeTypes, pcchActual);
863}
864
866 UINT cchFileExtensions, WCHAR *wzFileExtensions, UINT *pcchActual)
867{
869
870 TRACE("(%p,%u,%p,%p)\n", iface, cchFileExtensions, wzFileExtensions, pcchActual);
871
872 return ComponentInfo_GetStringValue(This->classkey, L"FileExtensions",
873 cchFileExtensions, wzFileExtensions, pcchActual);
874}
875
877 BOOL *pfSupportAnimation)
878{
879 FIXME("(%p,%p): stub\n", iface, pfSupportAnimation);
880 return E_NOTIMPL;
881}
882
884 BOOL *pfSupportChromaKey)
885{
886 FIXME("(%p,%p): stub\n", iface, pfSupportChromaKey);
887 return E_NOTIMPL;
888}
889
891 BOOL *pfSupportLossless)
892{
893 FIXME("(%p,%p): stub\n", iface, pfSupportLossless);
894 return E_NOTIMPL;
895}
896
898 BOOL *pfSupportMultiframe)
899{
900 FIXME("(%p,%p): stub\n", iface, pfSupportMultiframe);
901 return E_NOTIMPL;
902}
903
905 LPCWSTR wzMimeType, BOOL *pfMatches)
906{
907 FIXME("(%p,%s,%p): stub\n", iface, debugstr_w(wzMimeType), pfMatches);
908 return E_NOTIMPL;
909}
910
912 IWICBitmapEncoder **ppIBitmapEncoder)
913{
915
916 TRACE("(%p,%p)\n", iface, ppIBitmapEncoder);
917
918 return create_instance(&This->base.clsid, &IID_IWICBitmapEncoder, (void**)ppIBitmapEncoder);
919}
920
921static const IWICBitmapEncoderInfoVtbl BitmapEncoderInfo_Vtbl = {
946};
947
949{
951
952 This = malloc(sizeof(BitmapEncoderInfo));
953 if (!This)
954 {
955 RegCloseKey(classkey);
956 return E_OUTOFMEMORY;
957 }
958
959 This->base.IWICComponentInfo_iface.lpVtbl = (const IWICComponentInfoVtbl*)&BitmapEncoderInfo_Vtbl;
960 This->base.ref = 1;
961 This->classkey = classkey;
962 This->base.clsid = *clsid;
963
964 *ret = &This->base;
965 return S_OK;
966}
967
968typedef struct {
972
974{
975 return CONTAINING_RECORD((IWICComponentInfo*)iface, FormatConverterInfo, base.IWICComponentInfo_iface);
976}
977
979 void **ppv)
980{
982 TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
983
984 if (!ppv) return E_INVALIDARG;
985
986 if (IsEqualIID(&IID_IUnknown, iid) ||
987 IsEqualIID(&IID_IWICComponentInfo, iid) ||
988 IsEqualIID(&IID_IWICFormatConverterInfo ,iid))
989 {
990 *ppv = &This->base.IWICComponentInfo_iface;
991 }
992 else
993 {
994 *ppv = NULL;
995 return E_NOINTERFACE;
996 }
997
998 IUnknown_AddRef((IUnknown*)*ppv);
999 return S_OK;
1000}
1001
1003{
1005 ULONG ref = InterlockedIncrement(&This->base.ref);
1006
1007 TRACE("(%p) refcount=%lu\n", iface, ref);
1008
1009 return ref;
1010}
1011
1013{
1015 ULONG ref = InterlockedDecrement(&This->base.ref);
1016
1017 TRACE("(%p) refcount=%lu\n", iface, ref);
1018
1019 if (ref == 0)
1020 {
1021 RegCloseKey(This->classkey);
1022 free(This);
1023 }
1024
1025 return ref;
1026}
1027
1029 WICComponentType *pType)
1030{
1031 TRACE("(%p,%p)\n", iface, pType);
1032 if (!pType) return E_INVALIDARG;
1033 *pType = WICPixelFormatConverter;
1034 return S_OK;
1035}
1036
1038{
1040 TRACE("(%p,%p)\n", iface, pclsid);
1041
1042 if (!pclsid)
1043 return E_INVALIDARG;
1044
1045 *pclsid = This->base.clsid;
1046 return S_OK;
1047}
1048
1050{
1051 FIXME("(%p,%p): stub\n", iface, pStatus);
1052 return E_NOTIMPL;
1053}
1054
1056 WCHAR *wzAuthor, UINT *pcchActual)
1057{
1059
1060 TRACE("(%p,%u,%p,%p)\n", iface, cchAuthor, wzAuthor, pcchActual);
1061
1062 return ComponentInfo_GetStringValue(This->classkey, L"Author", cchAuthor, wzAuthor, pcchActual);
1063}
1064
1066{
1068
1069 TRACE("(%p,%p)\n", iface, pguidVendor);
1070
1071 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", pguidVendor);
1072}
1073
1075 WCHAR *wzVersion, UINT *pcchActual)
1076{
1078
1079 TRACE("(%p,%u,%p,%p)\n", iface, cchVersion, wzVersion, pcchActual);
1080
1081 return ComponentInfo_GetStringValue(This->classkey, L"Version",
1082 cchVersion, wzVersion, pcchActual);
1083}
1084
1086 WCHAR *wzSpecVersion, UINT *pcchActual)
1087{
1089
1090 TRACE("(%p,%u,%p,%p)\n", iface, cchSpecVersion, wzSpecVersion, pcchActual);
1091
1092 return ComponentInfo_GetStringValue(This->classkey, L"SpecVersion",
1093 cchSpecVersion, wzSpecVersion, pcchActual);
1094}
1095
1097 WCHAR *wzFriendlyName, UINT *pcchActual)
1098{
1100
1101 TRACE("(%p,%u,%p,%p)\n", iface, cchFriendlyName, wzFriendlyName, pcchActual);
1102
1103 return ComponentInfo_GetStringValue(This->classkey, L"FriendlyName",
1104 cchFriendlyName, wzFriendlyName, pcchActual);
1105}
1106
1108 UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
1109{
1110 FIXME("(%p,%u,%p,%p): stub\n", iface, cFormats, pguidPixelFormats, pcActual);
1111 return E_NOTIMPL;
1112}
1113
1115 IWICFormatConverter **ppIFormatConverter)
1116{
1118
1119 TRACE("(%p,%p)\n", iface, ppIFormatConverter);
1120
1121 return create_instance(&This->base.clsid, &IID_IWICFormatConverter,
1122 (void**)ppIFormatConverter);
1123}
1124
1126{
1127 LONG res;
1129 HKEY formats_key, guid_key;
1130
1131 /* Avoid testing using IWICFormatConverter_GetPixelFormats because that
1132 would be O(n). A registry test should do better. */
1133
1134 res = RegOpenKeyExW(This->classkey, L"PixelFormats", 0, KEY_READ, &formats_key);
1135 if (res != ERROR_SUCCESS) return FALSE;
1136
1137 res = RegOpenKeyExW(formats_key, formatguid, 0, KEY_READ, &guid_key);
1138 if (res == ERROR_SUCCESS) RegCloseKey(guid_key);
1139
1140 RegCloseKey(formats_key);
1141
1142 return (res == ERROR_SUCCESS);
1143}
1144
1145static const IWICFormatConverterInfoVtbl FormatConverterInfo_Vtbl = {
1159};
1160
1162{
1164
1165 This = malloc(sizeof(FormatConverterInfo));
1166 if (!This)
1167 {
1168 RegCloseKey(classkey);
1169 return E_OUTOFMEMORY;
1170 }
1171
1172 This->base.IWICComponentInfo_iface.lpVtbl = (const IWICComponentInfoVtbl*)&FormatConverterInfo_Vtbl;
1173 This->base.ref = 1;
1174 This->classkey = classkey;
1175 This->base.clsid = *clsid;
1176
1177 *ret = &This->base;
1178 return S_OK;
1179}
1180
1181typedef struct {
1185
1187{
1188 return CONTAINING_RECORD((IWICComponentInfo*)iface, PixelFormatInfo, base.IWICComponentInfo_iface);
1189}
1190
1192 void **ppv)
1193{
1195 TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
1196
1197 if (!ppv) return E_INVALIDARG;
1198
1199 if (IsEqualIID(&IID_IUnknown, iid) ||
1200 IsEqualIID(&IID_IWICComponentInfo, iid) ||
1201 IsEqualIID(&IID_IWICPixelFormatInfo, iid) ||
1202 IsEqualIID(&IID_IWICPixelFormatInfo2 ,iid))
1203 {
1204 *ppv = &This->base.IWICComponentInfo_iface;
1205 }
1206 else
1207 {
1208 *ppv = NULL;
1209 return E_NOINTERFACE;
1210 }
1211
1212 IUnknown_AddRef((IUnknown*)*ppv);
1213 return S_OK;
1214}
1215
1217{
1219 ULONG ref = InterlockedIncrement(&This->base.ref);
1220
1221 TRACE("(%p) refcount=%lu\n", iface, ref);
1222
1223 return ref;
1224}
1225
1227{
1229 ULONG ref = InterlockedDecrement(&This->base.ref);
1230
1231 TRACE("(%p) refcount=%lu\n", iface, ref);
1232
1233 if (ref == 0)
1234 {
1235 RegCloseKey(This->classkey);
1236 free(This);
1237 }
1238
1239 return ref;
1240}
1241
1243 WICComponentType *pType)
1244{
1245 TRACE("(%p,%p)\n", iface, pType);
1246 if (!pType) return E_INVALIDARG;
1247 *pType = WICPixelFormat;
1248 return S_OK;
1249}
1250
1252{
1254 TRACE("(%p,%p)\n", iface, pclsid);
1255
1256 if (!pclsid)
1257 return E_INVALIDARG;
1258
1259 *pclsid = This->base.clsid;
1260 return S_OK;
1261}
1262
1264{
1265 TRACE("(%p,%p)\n", iface, pStatus);
1266
1267 if (!pStatus)
1268 return E_INVALIDARG;
1269
1270 /* Pixel formats don't require code, so they are considered signed. */
1272
1273 return S_OK;
1274}
1275
1277 WCHAR *wzAuthor, UINT *pcchActual)
1278{
1280
1281 TRACE("(%p,%u,%p,%p)\n", iface, cchAuthor, wzAuthor, pcchActual);
1282
1283 return ComponentInfo_GetStringValue(This->classkey, L"Author", cchAuthor, wzAuthor, pcchActual);
1284}
1285
1287{
1289
1290 TRACE("(%p,%p)\n", iface, pguidVendor);
1291
1292 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", pguidVendor);
1293}
1294
1296 WCHAR *wzVersion, UINT *pcchActual)
1297{
1299
1300 TRACE("(%p,%u,%p,%p)\n", iface, cchVersion, wzVersion, pcchActual);
1301
1302 return ComponentInfo_GetStringValue(This->classkey, L"Version",
1303 cchVersion, wzVersion, pcchActual);
1304}
1305
1307 WCHAR *wzSpecVersion, UINT *pcchActual)
1308{
1310
1311 TRACE("(%p,%u,%p,%p)\n", iface, cchSpecVersion, wzSpecVersion, pcchActual);
1312
1313 return ComponentInfo_GetStringValue(This->classkey, L"SpecVersion",
1314 cchSpecVersion, wzSpecVersion, pcchActual);
1315}
1316
1318 WCHAR *wzFriendlyName, UINT *pcchActual)
1319{
1321
1322 TRACE("(%p,%u,%p,%p)\n", iface, cchFriendlyName, wzFriendlyName, pcchActual);
1323
1324 return ComponentInfo_GetStringValue(This->classkey, L"FriendlyName",
1325 cchFriendlyName, wzFriendlyName, pcchActual);
1326}
1327
1329 GUID *pFormat)
1330{
1332 TRACE("(%p,%p)\n", iface, pFormat);
1333
1334 if (!pFormat)
1335 return E_INVALIDARG;
1336
1337 *pFormat = This->base.clsid;
1338 return S_OK;
1339}
1340
1342 IWICColorContext **ppIColorContext)
1343{
1344 FIXME("(%p,%p): stub\n", iface, ppIColorContext);
1345 return E_NOTIMPL;
1346}
1347
1349 UINT *puiBitsPerPixel)
1350{
1352
1353 TRACE("(%p,%p)\n", iface, puiBitsPerPixel);
1354
1355 return ComponentInfo_GetUINTValue(This->classkey, L"BitLength", puiBitsPerPixel);
1356}
1357
1359 UINT *puiChannelCount)
1360{
1362
1363 TRACE("(%p,%p)\n", iface, puiChannelCount);
1364
1365 return ComponentInfo_GetUINTValue(This->classkey, L"ChannelCount", puiChannelCount);
1366}
1367
1369 UINT uiChannelIndex, UINT cbMaskBuffer, BYTE *pbMaskBuffer, UINT *pcbActual)
1370{
1372 UINT channel_count;
1373 HRESULT hr;
1374 LONG ret;
1375 WCHAR valuename[11];
1376 DWORD cbData;
1377
1378 TRACE("(%p,%u,%u,%p,%p)\n", iface, uiChannelIndex, cbMaskBuffer, pbMaskBuffer, pcbActual);
1379
1380 if (!pcbActual)
1381 return E_INVALIDARG;
1382
1383 hr = PixelFormatInfo_GetChannelCount(iface, &channel_count);
1384
1385 if (SUCCEEDED(hr) && uiChannelIndex >= channel_count)
1386 hr = E_INVALIDARG;
1387
1388 if (SUCCEEDED(hr))
1389 {
1390 swprintf(valuename, 11, L"%u", uiChannelIndex);
1391
1392 cbData = cbMaskBuffer;
1393
1394 ret = RegGetValueW(This->classkey, L"ChannelMasks", valuename, RRF_RT_REG_BINARY, NULL, pbMaskBuffer, &cbData);
1395
1396 if (ret == ERROR_SUCCESS || ret == ERROR_MORE_DATA)
1397 *pcbActual = cbData;
1398
1399 if (ret == ERROR_MORE_DATA)
1400 hr = E_INVALIDARG;
1401 else
1403 }
1404
1405 return hr;
1406}
1407
1409 BOOL *pfSupportsTransparency)
1410{
1412
1413 TRACE("(%p,%p)\n", iface, pfSupportsTransparency);
1414
1415 return ComponentInfo_GetUINTValue(This->classkey, L"SupportsTransparency", pfSupportsTransparency);
1416}
1417
1419 WICPixelFormatNumericRepresentation *pNumericRepresentation)
1420{
1422
1423 TRACE("(%p,%p)\n", iface, pNumericRepresentation);
1424
1425 return ComponentInfo_GetUINTValue(This->classkey, L"NumericRepresentation", pNumericRepresentation);
1426}
1427
1428static const IWICPixelFormatInfo2Vtbl PixelFormatInfo_Vtbl = {
1447};
1448
1450{
1452
1453 This = malloc(sizeof(PixelFormatInfo));
1454 if (!This)
1455 {
1456 RegCloseKey(classkey);
1457 return E_OUTOFMEMORY;
1458 }
1459
1460 This->base.IWICComponentInfo_iface.lpVtbl = (const IWICComponentInfoVtbl*)&PixelFormatInfo_Vtbl;
1461 This->base.ref = 1;
1462 This->classkey = classkey;
1463 This->base.clsid = *clsid;
1464
1465 *ret = &This->base;
1466 return S_OK;
1467}
1468
1470{
1474};
1475
1476typedef struct
1477{
1484
1486{
1487 unsigned i;
1488
1489 for (i = 0; i < info->container_count; i++)
1490 if (IsEqualGUID(info->container_formats + i, guid))
1491 return info->containers + i;
1492
1493 return NULL;
1494}
1495
1497{
1498 return CONTAINING_RECORD((IWICComponentInfo*)iface, MetadataReaderInfo, base.IWICComponentInfo_iface);
1499}
1500
1502 REFIID riid, void **ppv)
1503{
1505
1506 TRACE("(%p,%s,%p)\n", iface, debugstr_guid(riid), ppv);
1507
1508 if (!ppv) return E_INVALIDARG;
1509
1510 if (IsEqualIID(&IID_IUnknown, riid) ||
1511 IsEqualIID(&IID_IWICComponentInfo, riid) ||
1512 IsEqualIID(&IID_IWICMetadataHandlerInfo, riid) ||
1513 IsEqualIID(&IID_IWICMetadataReaderInfo, riid))
1514 {
1515 *ppv = &This->base.IWICComponentInfo_iface;
1516 }
1517 else
1518 {
1519 *ppv = NULL;
1520 return E_NOINTERFACE;
1521 }
1522
1523 IUnknown_AddRef((IUnknown *)*ppv);
1524 return S_OK;
1525}
1526
1528{
1530 ULONG ref = InterlockedIncrement(&This->base.ref);
1531
1532 TRACE("(%p) refcount=%lu\n", iface, ref);
1533 return ref;
1534}
1535
1537{
1539 ULONG ref = InterlockedDecrement(&This->base.ref);
1540
1541 TRACE("(%p) refcount=%lu\n", iface, ref);
1542
1543 if (!ref)
1544 {
1545 unsigned i;
1546 RegCloseKey(This->classkey);
1547 for (i = 0; i < This->container_count; i++)
1548 free(This->containers[i].patterns);
1549 free(This->containers);
1550 free(This->container_formats);
1551 free(This);
1552 }
1553 return ref;
1554}
1555
1558{
1559 TRACE("(%p,%p)\n", iface, type);
1560
1561 if (!type) return E_INVALIDARG;
1563 return S_OK;
1564}
1565
1567 CLSID *clsid)
1568{
1570
1571 TRACE("(%p,%p)\n", iface, clsid);
1572
1573 if (!clsid) return E_INVALIDARG;
1574 *clsid = This->base.clsid;
1575 return S_OK;
1576}
1577
1579 DWORD *status)
1580{
1581 FIXME("(%p,%p): stub\n", iface, status);
1582 return E_NOTIMPL;
1583}
1584
1586 UINT length, WCHAR *author, UINT *actual_length)
1587{
1589
1590 TRACE("(%p,%u,%p,%p)\n", iface, length, author, actual_length);
1591
1592 return ComponentInfo_GetStringValue(This->classkey, L"Author", length, author, actual_length);
1593}
1594
1596 GUID *vendor)
1597{
1599
1600 TRACE("(%p,%p)\n", iface, vendor);
1601
1602 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", vendor);
1603}
1604
1606 UINT length, WCHAR *version, UINT *actual_length)
1607{
1609
1610 TRACE("(%p,%u,%p,%p)\n", iface, length, version, actual_length);
1611
1612 return ComponentInfo_GetStringValue(This->classkey, L"Version", length, version, actual_length);
1613}
1614
1616 UINT length, WCHAR *version, UINT *actual_length)
1617{
1619
1620 TRACE("(%p,%u,%p,%p)\n", iface, length, version, actual_length);
1621
1622 return ComponentInfo_GetStringValue(This->classkey, L"SpecVersion",
1623 length, version, actual_length);
1624}
1625
1627 UINT length, WCHAR *name, UINT *actual_length)
1628{
1630
1631 TRACE("(%p,%u,%p,%p)\n", iface, length, name, actual_length);
1632
1633 return ComponentInfo_GetStringValue(This->classkey, L"FriendlyName",
1634 length, name, actual_length);
1635}
1636
1638 GUID *format)
1639{
1641 TRACE("(%p,%p)\n", iface, format);
1642 return ComponentInfo_GetGUIDValue(This->classkey, L"MetadataFormat", format);
1643}
1644
1646 UINT length, GUID *formats, UINT *actual_length)
1647{
1649
1650 TRACE("(%p,%u,%p,%p)\n", iface, length, formats, actual_length);
1651
1652 if (!actual_length)
1653 return E_INVALIDARG;
1654
1655 *actual_length = This->container_count;
1656 if (formats)
1657 {
1658 if (This->container_count && length < This->container_count)
1660 memcpy(formats, This->container_formats, This->container_count * sizeof(*formats));
1661 }
1662 return S_OK;
1663}
1664
1666 UINT length, WCHAR *manufacturer, UINT *actual_length)
1667{
1668 FIXME("(%p,%u,%p,%p): stub\n", iface, length, manufacturer, actual_length);
1669 return E_NOTIMPL;
1670}
1671
1673 UINT length, WCHAR *models, UINT *actual_length)
1674{
1675 FIXME("(%p,%u,%p,%p): stub\n", iface, length, models, actual_length);
1676 return E_NOTIMPL;
1677}
1678
1680 BOOL *param)
1681{
1683 TRACE("(%p,%p)\n", iface, param);
1684 return ComponentInfo_GetUINTValue(This->classkey, L"RequiresFullStream", param);
1685}
1686
1688 BOOL *param)
1689{
1691 TRACE("(%p,%p)\n", iface, param);
1692 return ComponentInfo_GetUINTValue(This->classkey, L"SupportsPadding", param);
1693}
1694
1696 BOOL *param)
1697{
1698 FIXME("(%p,%p): stub\n", iface, param);
1699 return E_NOTIMPL;
1700}
1701
1703 REFGUID container_guid, UINT length, WICMetadataPattern *patterns, UINT *count, UINT *actual_length)
1704{
1707
1708 TRACE("(%p,%s,%u,%p,%p,%p)\n", iface, debugstr_guid(container_guid), length, patterns, count, actual_length);
1709
1710 if (!actual_length || !container_guid) return E_INVALIDARG;
1711
1712 if (!(container = get_metadata_container(This, container_guid)))
1714
1715 *count = container->pattern_count;
1716 *actual_length = container->patterns_size;
1717 if (patterns)
1718 {
1719 if (container->patterns_size && length < container->patterns_size)
1721 memcpy(patterns, container->patterns, container->patterns_size);
1722 }
1723 return S_OK;
1724}
1725
1727 REFGUID container_guid, IStream *stream, BOOL *matches)
1728{
1731 HRESULT hr;
1732 ULONG datasize=0;
1733 BYTE *data=NULL;
1734 ULONG bytesread;
1735 UINT i;
1736 LARGE_INTEGER seekpos;
1737 ULONG pos;
1738
1739 TRACE("(%p,%s,%p,%p)\n", iface, debugstr_guid(container_guid), stream, matches);
1740
1741 if (!(container = get_metadata_container(This, container_guid)))
1743
1744 for (i=0; i < container->pattern_count; i++)
1745 {
1746 if (datasize < container->patterns[i].Length)
1747 {
1748 free(data);
1749 datasize = container->patterns[i].Length;
1750 data = malloc(container->patterns[i].Length);
1751 if (!data)
1752 {
1753 hr = E_OUTOFMEMORY;
1754 break;
1755 }
1756 }
1757
1758 seekpos.QuadPart = container->patterns[i].Position.QuadPart;
1759 hr = IStream_Seek(stream, seekpos, STREAM_SEEK_SET, NULL);
1760 if (FAILED(hr)) break;
1761
1762 hr = IStream_Read(stream, data, container->patterns[i].Length, &bytesread);
1763 if (hr == S_FALSE || (hr == S_OK && bytesread != container->patterns[i].Length)) /* past end of stream */
1764 continue;
1765 if (FAILED(hr)) break;
1766
1767 for (pos=0; pos < container->patterns[i].Length; pos++)
1768 {
1769 if ((data[pos] & container->patterns[i].Mask[pos]) != container->patterns[i].Pattern[pos])
1770 break;
1771 }
1772 if (pos == container->patterns[i].Length) /* matches pattern */
1773 {
1774 hr = S_OK;
1775 *matches = TRUE;
1776 break;
1777 }
1778 }
1779
1780 if (i == container->pattern_count) /* does not match any pattern */
1781 {
1782 hr = S_OK;
1783 *matches = FALSE;
1784 }
1785
1786 free(data);
1787
1788 return hr;
1789}
1790
1793{
1795
1796 TRACE("(%p,%p)\n", iface, reader);
1797
1798 return create_instance(&This->base.clsid, &IID_IWICMetadataReader, (void **)reader);
1799}
1800
1801static const IWICMetadataReaderInfoVtbl MetadataReaderInfo_Vtbl = {
1823};
1824
1827{
1830 WCHAR subkeyname[11], guidkeyname[39];
1831 LONG res;
1832 HKEY containers_key, guid_key, patternkey;
1833 UINT i;
1835 BYTE *patterns_ptr;
1836 DWORD length, valuesize;
1837
1838 res = RegOpenKeyExW(info->classkey, L"Containers", 0, KEY_READ, &containers_key);
1839 if (res != ERROR_SUCCESS) return;
1840
1841 StringFromGUID2(container_guid, guidkeyname, 39);
1842 res = RegOpenKeyExW(containers_key, guidkeyname, 0, KEY_READ, &guid_key);
1843 RegCloseKey(containers_key);
1844 if (res != ERROR_SUCCESS) return;
1845
1847 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
1848 if (res != ERROR_SUCCESS)
1849 {
1850 RegCloseKey(guid_key);
1851 return;
1852 }
1853
1856 if (!patterns)
1857 {
1858 RegCloseKey(guid_key);
1859 return;
1860 }
1861
1862 for (i=0; res == ERROR_SUCCESS && i < pattern_count; i++)
1863 {
1864 swprintf(subkeyname, 11, L"%u", i);
1865 res = RegOpenKeyExW(guid_key, subkeyname, 0, KEY_READ, &patternkey);
1866 if (res != ERROR_SUCCESS) break;
1867
1868 res = RegGetValueW(patternkey, NULL, L"Pattern", RRF_RT_REG_BINARY, NULL, NULL, &length);
1869 if (res == ERROR_SUCCESS)
1870 {
1871 patterns_size += length*2;
1873
1874 valuesize = sizeof(DWORD64);
1875 res = RegGetValueW(patternkey, NULL, L"DataOffset", RRF_RT_DWORD|RRF_RT_QWORD, NULL,
1876 &patterns[i].DataOffset, &valuesize);
1877 if (res) patterns[i].DataOffset.QuadPart = 0;
1878
1880 valuesize = sizeof(DWORD64);
1881 res = RegGetValueW(patternkey, NULL, L"Position", RRF_RT_DWORD|RRF_RT_QWORD, NULL,
1882 &patterns[i].Position, &valuesize);
1883 }
1884
1885 RegCloseKey(patternkey);
1886 }
1887
1888 if (res != ERROR_SUCCESS || !(patterns_ptr = realloc(patterns, patterns_size)))
1889 {
1890 free(patterns);
1891 RegCloseKey(guid_key);
1892 return;
1893 }
1894 patterns = (WICMetadataPattern*)patterns_ptr;
1895 patterns_ptr += pattern_count * sizeof(*patterns);
1896
1897 for (i=0; res == ERROR_SUCCESS && i < pattern_count; i++)
1898 {
1899 swprintf(subkeyname, 11, L"%u", i);
1900 res = RegOpenKeyExW(guid_key, subkeyname, 0, KEY_READ, &patternkey);
1901 if (res != ERROR_SUCCESS) break;
1902
1904 patterns[i].Pattern = patterns_ptr;
1905 valuesize = length;
1906 res = RegGetValueW(patternkey, NULL, L"Pattern", RRF_RT_REG_BINARY, NULL,
1907 patterns[i].Pattern, &valuesize);
1908 patterns_ptr += length;
1909
1910 if (res == ERROR_SUCCESS)
1911 {
1912 patterns[i].Mask = patterns_ptr;
1913 valuesize = length;
1914 res = RegGetValueW(patternkey, NULL, L"Mask", RRF_RT_REG_BINARY, NULL,
1915 patterns[i].Mask, &valuesize);
1916 patterns_ptr += length;
1917 }
1918
1919 RegCloseKey(patternkey);
1920 }
1921
1922 RegCloseKey(guid_key);
1923
1924 if (res != ERROR_SUCCESS)
1925 {
1926 free(patterns);
1927 return;
1928 }
1929
1930 container->pattern_count = pattern_count;
1931 container->patterns_size = patterns_size;
1932 container->patterns = patterns;
1933}
1934
1936{
1937 UINT format_count;
1938 GUID *formats;
1939 HRESULT hr;
1940
1941 hr = ComponentInfo_GetGuidList(info->classkey, L"Containers", 0, NULL, &format_count);
1942 if (FAILED(hr)) return TRUE;
1943
1944 formats = calloc(format_count, sizeof(*formats));
1945 if (!formats) return FALSE;
1946
1947 hr = ComponentInfo_GetGuidList(info->classkey, L"Containers", format_count, formats,
1948 &format_count);
1949 if (FAILED(hr))
1950 {
1951 free(formats);
1952 return FALSE;
1953 }
1954
1955 info->container_formats = formats;
1956 info->container_count = format_count;
1957
1958 if (format_count)
1959 {
1960 unsigned i;
1961
1962 info->containers = calloc(format_count, sizeof(*info->containers));
1963 if (!info->containers) return FALSE;
1964
1965 for (i = 0; i < format_count; i++)
1966 read_metadata_patterns(info, info->container_formats + i, info->containers + i);
1967 }
1968
1969 return TRUE;
1970}
1971
1973{
1975
1976 This = calloc(1, sizeof(*This));
1977 if (!This)
1978 {
1979 RegCloseKey(classkey);
1980 return E_OUTOFMEMORY;
1981 }
1982
1983 This->base.IWICComponentInfo_iface.lpVtbl = (const IWICComponentInfoVtbl*)&MetadataReaderInfo_Vtbl;
1984 This->base.ref = 1;
1985 This->classkey = classkey;
1986 This->base.clsid = *clsid;
1987
1989 {
1990 IWICComponentInfo_Release(&This->base.IWICComponentInfo_iface);
1992 }
1993
1994 *info = &This->base;
1995 return S_OK;
1996}
1997
1998struct category {
2000 const GUID *catid;
2002};
2003
2004static const struct category categories[] = {
2005 {WICDecoder, &CATID_WICBitmapDecoders, BitmapDecoderInfo_Constructor},
2006 {WICEncoder, &CATID_WICBitmapEncoders, BitmapEncoderInfo_Constructor},
2007 {WICPixelFormatConverter, &CATID_WICFormatConverters, FormatConverterInfo_Constructor},
2008 {WICPixelFormat, &CATID_WICPixelFormats, PixelFormatInfo_Constructor},
2009 {WICMetadataReader, &CATID_WICMetadataReader, MetadataReaderInfo_Constructor},
2010 {0}
2011};
2012
2013static int ComponentInfo_Compare(const void *key, const struct wine_rb_entry *entry)
2014{
2016 return memcmp(key, &info->clsid, sizeof(info->clsid));
2017}
2018
2020
2023{
2026 0, 0, { (DWORD_PTR)(__FILE__ ": component_info_cache") }
2027};
2029
2031{
2032 struct wine_rb_entry *cache_entry;
2034 HKEY clsidkey;
2035 HKEY classkey;
2036 HKEY catidkey;
2037 HKEY instancekey;
2038 WCHAR guidstring[39];
2039 LONG res;
2040 const struct category *category;
2041 BOOL found = FALSE;
2042 HRESULT hr;
2043
2045
2047 if(cache_entry)
2048 {
2050 IWICComponentInfo_AddRef(*ppIInfo = &info->IWICComponentInfo_iface);
2052 return S_OK;
2053 }
2054
2055 res = RegOpenKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_READ, &clsidkey);
2056 if (res != ERROR_SUCCESS)
2057 {
2059 return HRESULT_FROM_WIN32(res);
2060 }
2061
2063 {
2064 StringFromGUID2(category->catid, guidstring, 39);
2065 res = RegOpenKeyExW(clsidkey, guidstring, 0, KEY_READ, &catidkey);
2066 if (res == ERROR_SUCCESS)
2067 {
2068 res = RegOpenKeyExW(catidkey, L"Instance", 0, KEY_READ, &instancekey);
2069 if (res == ERROR_SUCCESS)
2070 {
2071 StringFromGUID2(clsid, guidstring, 39);
2072 res = RegOpenKeyExW(instancekey, guidstring, 0, KEY_READ, &classkey);
2073 if (res == ERROR_SUCCESS)
2074 {
2075 RegCloseKey(classkey);
2076 found = TRUE;
2077 }
2078 RegCloseKey(instancekey);
2079 }
2080 RegCloseKey(catidkey);
2081 }
2082 if (found) break;
2083 }
2084
2085 if (found)
2086 {
2087 res = RegOpenKeyExW(clsidkey, guidstring, 0, KEY_READ, &classkey);
2088 if (res == ERROR_SUCCESS)
2089 hr = category->constructor(classkey, clsid, &info);
2090 else
2092 }
2093 else
2094 {
2095 FIXME("%s is not supported\n", wine_dbgstr_guid(clsid));
2096 hr = E_FAIL;
2097 }
2098
2099 RegCloseKey(clsidkey);
2100
2101 if (SUCCEEDED(hr))
2102 {
2104 IWICComponentInfo_AddRef(*ppIInfo = &info->IWICComponentInfo_iface);
2105 }
2107 return hr;
2108}
2109
2111{
2112 ComponentInfo *info, *next_info;
2114 IWICComponentInfo_Release(&info->IWICComponentInfo_iface);
2115}
2116
2118{
2119 IWICComponentInfo *compinfo;
2120 HRESULT hr;
2121
2122 hr = CreateComponentInfo(clsid, &compinfo);
2123 if (FAILED(hr)) return hr;
2124
2125 hr = IWICComponentInfo_QueryInterface(compinfo, &IID_IWICBitmapDecoderInfo,
2126 (void **)info);
2127
2128 IWICComponentInfo_Release(compinfo);
2129
2130 return hr;
2131}
2132
2133typedef struct {
2137 struct list *cursor;
2138 CRITICAL_SECTION lock; /* Must be held when reading or writing cursor */
2140
2142{
2143 return CONTAINING_RECORD(iface, ComponentEnum, IEnumUnknown_iface);
2144}
2145
2146typedef struct {
2147 struct list entry;
2150
2151static const IEnumUnknownVtbl ComponentEnumVtbl;
2152
2154 void **ppv)
2155{
2157 TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
2158
2159 if (!ppv) return E_INVALIDARG;
2160
2161 if (IsEqualIID(&IID_IUnknown, iid) ||
2163 {
2164 *ppv = &This->IEnumUnknown_iface;
2165 }
2166 else
2167 {
2168 *ppv = NULL;
2169 return E_NOINTERFACE;
2170 }
2171
2172 IUnknown_AddRef((IUnknown*)*ppv);
2173 return S_OK;
2174}
2175
2177{
2180
2181 TRACE("(%p) refcount=%lu\n", iface, ref);
2182
2183 return ref;
2184}
2185
2187{
2190 ComponentEnumItem *cursor, *cursor2;
2191
2192 TRACE("(%p) refcount=%lu\n", iface, ref);
2193
2194 if (ref == 0)
2195 {
2197 {
2198 IUnknown_Release(cursor->unk);
2199 list_remove(&cursor->entry);
2200 free(cursor);
2201 }
2202 This->lock.DebugInfo->Spare[0] = 0;
2204 free(This);
2205 }
2206
2207 return ref;
2208}
2209
2211 IUnknown **rgelt, ULONG *pceltFetched)
2212{
2214 ULONG num_fetched=0;
2216 HRESULT hr=S_OK;
2217
2218 TRACE("(%p,%lu,%p,%p)\n", iface, celt, rgelt, pceltFetched);
2219
2220 EnterCriticalSection(&This->lock);
2221 while (num_fetched<celt)
2222 {
2223 if (!This->cursor)
2224 {
2225 hr = S_FALSE;
2226 break;
2227 }
2229 IUnknown_AddRef(item->unk);
2230 rgelt[num_fetched] = item->unk;
2231 num_fetched++;
2232 This->cursor = list_next(&This->objects, This->cursor);
2233 }
2234 LeaveCriticalSection(&This->lock);
2235 if (pceltFetched)
2236 *pceltFetched = num_fetched;
2237 return hr;
2238}
2239
2241{
2243 ULONG i;
2244 HRESULT hr=S_OK;
2245
2246 TRACE("(%p,%lu)\n", iface, celt);
2247
2248 EnterCriticalSection(&This->lock);
2249 for (i=0; i<celt; i++)
2250 {
2251 if (!This->cursor)
2252 {
2253 hr = S_FALSE;
2254 break;
2255 }
2256 This->cursor = list_next(&This->objects, This->cursor);
2257 }
2258 LeaveCriticalSection(&This->lock);
2259 return hr;
2260}
2261
2263{
2265
2266 TRACE("(%p)\n", iface);
2267
2268 EnterCriticalSection(&This->lock);
2269 This->cursor = list_head(&This->objects);
2270 LeaveCriticalSection(&This->lock);
2271 return S_OK;
2272}
2273
2275{
2277 ComponentEnum *new_enum;
2278 ComponentEnumItem *old_item, *new_item;
2280 struct list *old_cursor;
2281
2282 new_enum = malloc(sizeof(ComponentEnum));
2283 if (!new_enum)
2284 {
2285 *ppenum = NULL;
2286 return E_OUTOFMEMORY;
2287 }
2288
2289 new_enum->IEnumUnknown_iface.lpVtbl = &ComponentEnumVtbl;
2290 new_enum->ref = 1;
2291 new_enum->cursor = NULL;
2292 list_init(&new_enum->objects);
2293#ifdef __REACTOS__
2294 InitializeCriticalSection(&new_enum->lock);
2295#else
2297#endif
2298 new_enum->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ComponentEnum.lock");
2299
2300 EnterCriticalSection(&This->lock);
2301 old_cursor = This->cursor;
2302 LeaveCriticalSection(&This->lock);
2303
2304 LIST_FOR_EACH_ENTRY(old_item, &This->objects, ComponentEnumItem, entry)
2305 {
2306 new_item = malloc(sizeof(ComponentEnumItem));
2307 if (!new_item)
2308 {
2310 break;
2311 }
2312 new_item->unk = old_item->unk;
2313 list_add_tail(&new_enum->objects, &new_item->entry);
2314 IUnknown_AddRef(new_item->unk);
2315 if (&old_item->entry == old_cursor) new_enum->cursor = &new_item->entry;
2316 }
2317
2318 if (FAILED(ret))
2319 {
2320 IEnumUnknown_Release(&new_enum->IEnumUnknown_iface);
2321 *ppenum = NULL;
2322 }
2323 else
2324 *ppenum = &new_enum->IEnumUnknown_iface;
2325
2326 return ret;
2327}
2328
2329static const IEnumUnknownVtbl ComponentEnumVtbl = {
2337};
2338
2340{
2343 const struct category *category;
2344 HKEY clsidkey, catidkey, instancekey;
2345 WCHAR guidstring[39];
2346 LONG res;
2347 int i;
2348 HRESULT hr=S_OK;
2349 CLSID clsid;
2350
2351 if (options) FIXME("ignoring flags %lx\n", options);
2352
2353 res = RegOpenKeyExW(HKEY_CLASSES_ROOT, L"CLSID", 0, KEY_READ, &clsidkey);
2354 if (res != ERROR_SUCCESS)
2355 return HRESULT_FROM_WIN32(res);
2356
2357 This = malloc(sizeof(ComponentEnum));
2358 if (!This)
2359 {
2360 RegCloseKey(clsidkey);
2361 return E_OUTOFMEMORY;
2362 }
2363
2364 This->IEnumUnknown_iface.lpVtbl = &ComponentEnumVtbl;
2365 This->ref = 1;
2366 list_init(&This->objects);
2367#ifdef __REACTOS__
2369#else
2371#endif
2372 This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ComponentEnum.lock");
2373
2375 {
2376 if ((category->type & componentTypes) == 0) continue;
2377 StringFromGUID2(category->catid, guidstring, 39);
2378 res = RegOpenKeyExW(clsidkey, guidstring, 0, KEY_READ, &catidkey);
2379 if (res == ERROR_SUCCESS)
2380 {
2381 res = RegOpenKeyExW(catidkey, L"Instance", 0, KEY_READ, &instancekey);
2382 if (res == ERROR_SUCCESS)
2383 {
2384 i=0;
2385 for (;;i++)
2386 {
2387 DWORD guidstring_size = 39;
2388 res = RegEnumKeyExW(instancekey, i, guidstring, &guidstring_size, NULL, NULL, NULL, NULL);
2389 if (res != ERROR_SUCCESS) break;
2390
2391 item = malloc(sizeof(ComponentEnumItem));
2392 if (!item) { hr = E_OUTOFMEMORY; break; }
2393
2394 hr = CLSIDFromString(guidstring, &clsid);
2395 if (SUCCEEDED(hr))
2396 {
2398 if (SUCCEEDED(hr))
2399 list_add_tail(&This->objects, &item->entry);
2400 }
2401
2402 if (FAILED(hr))
2403 {
2404 free(item);
2405 hr = S_OK;
2406 }
2407 }
2408 RegCloseKey(instancekey);
2409 }
2410 RegCloseKey(catidkey);
2411 }
2414 }
2415 RegCloseKey(clsidkey);
2416
2417 if (SUCCEEDED(hr))
2418 {
2419 IEnumUnknown_Reset(&This->IEnumUnknown_iface);
2420 *ppIEnumUnknown = &This->IEnumUnknown_iface;
2421 }
2422 else
2423 {
2424 *ppIEnumUnknown = NULL;
2425 IEnumUnknown_Release(&This->IEnumUnknown_iface);
2426 }
2427
2428 return hr;
2429}
2430
2432{
2433 return IsEqualGUID(format, &GUID_WICPixelFormatBlackWhite) ||
2434 IsEqualGUID(format, &GUID_WICPixelFormat1bppIndexed);
2435}
2436
2438{
2439 HRESULT res;
2440 IEnumUnknown *enumconverters;
2441 IUnknown *unkconverterinfo;
2442 IWICFormatConverterInfo *converterinfo=NULL;
2443 IWICFormatConverter *converter=NULL;
2444 GUID srcFormat;
2445 WCHAR srcformatstr[39], dstformatstr[39];
2446 BOOL canconvert;
2447 ULONG num_fetched;
2448
2449 TRACE("%s,%p,%p\n", debugstr_guid(dstFormat), pISrc, ppIDst);
2450
2451 res = IWICBitmapSource_GetPixelFormat(pISrc, &srcFormat);
2452 if (FAILED(res)) return res;
2453
2454 if (IsEqualGUID(&srcFormat, dstFormat) || (is_1bpp_format(&srcFormat) && is_1bpp_format(dstFormat)))
2455 {
2456 IWICBitmapSource_AddRef(pISrc);
2457 *ppIDst = pISrc;
2458 return S_OK;
2459 }
2460
2461 StringFromGUID2(&srcFormat, srcformatstr, 39);
2462 StringFromGUID2(dstFormat, dstformatstr, 39);
2463
2465 if (FAILED(res)) return res;
2466
2467 while (!converter)
2468 {
2469 res = IEnumUnknown_Next(enumconverters, 1, &unkconverterinfo, &num_fetched);
2470
2471 if (res == S_OK)
2472 {
2473 res = IUnknown_QueryInterface(unkconverterinfo, &IID_IWICFormatConverterInfo, (void**)&converterinfo);
2474
2475 if (SUCCEEDED(res))
2476 {
2477 canconvert = ConverterSupportsFormat(converterinfo, srcformatstr);
2478
2479 if (canconvert)
2480 canconvert = ConverterSupportsFormat(converterinfo, dstformatstr);
2481
2482 if (canconvert)
2483 {
2484 res = IWICFormatConverterInfo_CreateInstance(converterinfo, &converter);
2485
2486 if (SUCCEEDED(res))
2487 res = IWICFormatConverter_CanConvert(converter, &srcFormat, dstFormat, &canconvert);
2488
2489 if (SUCCEEDED(res) && canconvert)
2490 res = IWICFormatConverter_Initialize(converter, pISrc, dstFormat, WICBitmapDitherTypeNone,
2492
2493 if (FAILED(res) || !canconvert)
2494 {
2495 if (converter)
2496 {
2497 IWICFormatConverter_Release(converter);
2498 converter = NULL;
2499 }
2500 }
2501 }
2502
2503 IWICFormatConverterInfo_Release(converterinfo);
2504 }
2505
2506 IUnknown_Release(unkconverterinfo);
2507 }
2508 else
2509 break;
2510 }
2511
2512 IEnumUnknown_Release(enumconverters);
2513
2514 if (converter)
2515 {
2516 res = IWICFormatConverter_QueryInterface(converter, &IID_IWICBitmapSource, (void **)ppIDst);
2517 IWICFormatConverter_Release(converter);
2518 return res;
2519 }
2520 else
2521 {
2522 FIXME("cannot convert %s to %s\n", debugstr_guid(&srcFormat), debugstr_guid(dstFormat));
2523 *ppIDst = NULL;
2525 }
2526}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static void list_init(struct list_entry *head)
Definition: list.h:51
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
HANDLE HKEY
Definition: registry.h:26
#define RegCloseKey(hKey)
Definition: registry.h:49
Definition: list.h:37
HRESULT create_instance(const CLSID *clsid, const IID *iid, void **ppv)
Definition: clsfactory.c:212
static SIZE_T datasize
Definition: asm.c:30
const WCHAR * vendor
Definition: db.cpp:872
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static const struct pixel_format_desc formats[]
Definition: util.c:59
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1931
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2504
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
Definition: reg.c:3662
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
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
static const WCHAR version[]
Definition: asmname.c:66
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
#define RRF_NOEXPAND
Definition: driver.c:583
#define RRF_RT_REG_BINARY
Definition: driver.c:577
#define RRF_RT_DWORD
Definition: driver.c:581
#define RRF_RT_QWORD
Definition: driver.c:582
#define RRF_RT_REG_SZ
Definition: driver.c:575
static HRESULT WINAPI MetadataReaderInfo_GetDeviceManufacturer(IWICMetadataReaderInfo *iface, UINT length, WCHAR *manufacturer, UINT *actual_length)
Definition: info.c:1665
static HRESULT WINAPI BitmapEncoderInfo_GetAuthor(IWICBitmapEncoderInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
Definition: info.c:765
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportLossless(IWICBitmapDecoderInfo *iface, BOOL *pfSupportLossless)
Definition: info.c:407
static HRESULT WINAPI PixelFormatInfo_QueryInterface(IWICPixelFormatInfo2 *iface, REFIID iid, void **ppv)
Definition: info.c:1191
static HRESULT WINAPI MetadataReaderInfo_GetMetadataFormat(IWICMetadataReaderInfo *iface, GUID *format)
Definition: info.c:1637
static HRESULT WINAPI BitmapDecoderInfo_GetFriendlyName(IWICBitmapDecoderInfo *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
Definition: info.c:323
static struct wine_rb_tree component_info_cache
Definition: info.c:2019
static HRESULT WINAPI BitmapEncoderInfo_GetDeviceManufacturer(IWICBitmapEncoderInfo *iface, UINT cchDeviceManufacturer, WCHAR *wzDeviceManufacturer, UINT *pcchActual)
Definition: info.c:840
static HRESULT WINAPI BitmapEncoderInfo_DoesSupportLossless(IWICBitmapEncoderInfo *iface, BOOL *pfSupportLossless)
Definition: info.c:890
static HRESULT WINAPI BitmapDecoderInfo_QueryInterface(IWICBitmapDecoderInfo *iface, REFIID iid, void **ppv)
Definition: info.c:203
static HRESULT WINAPI FormatConverterInfo_GetComponentType(IWICFormatConverterInfo *iface, WICComponentType *pType)
Definition: info.c:1028
static HRESULT WINAPI BitmapDecoderInfo_GetFileExtensions(IWICBitmapDecoderInfo *iface, UINT cchFileExtensions, WCHAR *wzFileExtensions, UINT *pcchActual)
Definition: info.c:382
static HRESULT ComponentInfo_GetGUIDValue(HKEY classkey, LPCWSTR value, GUID *result)
Definition: info.c:74
static HRESULT WINAPI MetadataReaderInfo_GetFriendlyName(IWICMetadataReaderInfo *iface, UINT length, WCHAR *name, UINT *actual_length)
Definition: info.c:1626
static HRESULT PixelFormatInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
Definition: info.c:1449
static HRESULT WINAPI BitmapDecoderInfo_GetDeviceModels(IWICBitmapDecoderInfo *iface, UINT cchDeviceModels, WCHAR *wzDeviceModels, UINT *pcchActual)
Definition: info.c:364
static HRESULT WINAPI ComponentEnum_Skip(IEnumUnknown *iface, ULONG celt)
Definition: info.c:2240
static HRESULT WINAPI BitmapEncoderInfo_GetFileExtensions(IWICBitmapEncoderInfo *iface, UINT cchFileExtensions, WCHAR *wzFileExtensions, UINT *pcchActual)
Definition: info.c:865
static HRESULT WINAPI PixelFormatInfo_GetFriendlyName(IWICPixelFormatInfo2 *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
Definition: info.c:1317
static HRESULT WINAPI MetadataReaderInfo_GetVersion(IWICMetadataReaderInfo *iface, UINT length, WCHAR *version, UINT *actual_length)
Definition: info.c:1605
static HRESULT MetadataReaderInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **info)
Definition: info.c:1972
static HRESULT WINAPI BitmapDecoderInfo_GetColorManagementVersion(IWICBitmapDecoderInfo *iface, UINT cchColorManagementVersion, WCHAR *wzColorManagementVersion, UINT *pcchActual)
Definition: info.c:350
static ULONG WINAPI BitmapEncoderInfo_Release(IWICBitmapEncoderInfo *iface)
Definition: info.c:722
static BOOL read_metadata_info(MetadataReaderInfo *info)
Definition: info.c:1935
HRESULT CreateComponentInfo(REFCLSID clsid, IWICComponentInfo **ppIInfo)
Definition: info.c:2030
static HRESULT ComponentInfo_GetUINTValue(HKEY classkey, LPCWSTR value, void *result)
Definition: info.c:102
static HRESULT WINAPI BitmapDecoderInfo_GetAuthor(IWICBitmapDecoderInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
Definition: info.c:282
static HRESULT WINAPI PixelFormatInfo_SupportsTransparency(IWICPixelFormatInfo2 *iface, BOOL *pfSupportsTransparency)
Definition: info.c:1408
static HRESULT WINAPI MetadataReaderInfo_GetContainerFormats(IWICMetadataReaderInfo *iface, UINT length, GUID *formats, UINT *actual_length)
Definition: info.c:1645
static HRESULT WINAPI ComponentEnum_QueryInterface(IEnumUnknown *iface, REFIID iid, void **ppv)
Definition: info.c:2153
static HRESULT WINAPI PixelFormatInfo_GetComponentType(IWICPixelFormatInfo2 *iface, WICComponentType *pType)
Definition: info.c:1242
static ULONG WINAPI ComponentEnum_AddRef(IEnumUnknown *iface)
Definition: info.c:2176
static HRESULT WINAPI ComponentEnum_Reset(IEnumUnknown *iface)
Definition: info.c:2262
static HRESULT WINAPI BitmapEncoderInfo_DoesSupportAnimation(IWICBitmapEncoderInfo *iface, BOOL *pfSupportAnimation)
Definition: info.c:876
static HRESULT WINAPI PixelFormatInfo_GetChannelCount(IWICPixelFormatInfo2 *iface, UINT *puiChannelCount)
Definition: info.c:1358
static ComponentEnum * impl_from_IEnumUnknown(IEnumUnknown *iface)
Definition: info.c:2141
static HRESULT WINAPI BitmapDecoderInfo_GetCLSID(IWICBitmapDecoderInfo *iface, CLSID *pclsid)
Definition: info.c:264
static HRESULT WINAPI BitmapEncoderInfo_GetFriendlyName(IWICBitmapEncoderInfo *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
Definition: info.c:806
static HRESULT WINAPI BitmapDecoderInfo_GetSpecVersion(IWICBitmapDecoderInfo *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
Definition: info.c:312
static HRESULT WINAPI BitmapDecoderInfo_GetVendorGUID(IWICBitmapDecoderInfo *iface, GUID *pguidVendor)
Definition: info.c:292
static ULONG WINAPI BitmapDecoderInfo_AddRef(IWICBitmapDecoderInfo *iface)
Definition: info.c:228
static HRESULT WINAPI MetadataReaderInfo_DoesRequireFixedSize(IWICMetadataReaderInfo *iface, BOOL *param)
Definition: info.c:1695
static HRESULT WINAPI MetadataReaderInfo_DoesRequireFullStream(IWICMetadataReaderInfo *iface, BOOL *param)
Definition: info.c:1679
static HRESULT WINAPI BitmapEncoderInfo_CreateInstance(IWICBitmapEncoderInfo *iface, IWICBitmapEncoder **ppIBitmapEncoder)
Definition: info.c:911
static HRESULT WINAPI BitmapEncoderInfo_DoesSupportChromaKey(IWICBitmapEncoderInfo *iface, BOOL *pfSupportChromaKey)
Definition: info.c:883
HRESULT get_decoder_info(REFCLSID clsid, IWICBitmapDecoderInfo **info)
Definition: info.c:2117
static HRESULT WINAPI BitmapDecoderInfo_GetComponentType(IWICBitmapDecoderInfo *iface, WICComponentType *pType)
Definition: info.c:255
static HRESULT WINAPI MetadataReaderInfo_GetDeviceModels(IWICMetadataReaderInfo *iface, UINT length, WCHAR *models, UINT *actual_length)
Definition: info.c:1672
static HRESULT WINAPI BitmapEncoderInfo_GetSpecVersion(IWICBitmapEncoderInfo *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
Definition: info.c:795
static HRESULT WINAPI BitmapEncoderInfo_DoesSupportMultiframe(IWICBitmapEncoderInfo *iface, BOOL *pfSupportMultiframe)
Definition: info.c:897
static ULONG WINAPI ComponentEnum_Release(IEnumUnknown *iface)
Definition: info.c:2186
static struct metadata_container * get_metadata_container(MetadataReaderInfo *info, const GUID *guid)
Definition: info.c:1485
static HRESULT WINAPI PixelFormatInfo_GetColorContext(IWICPixelFormatInfo2 *iface, IWICColorContext **ppIColorContext)
Definition: info.c:1341
static BOOL ConverterSupportsFormat(IWICFormatConverterInfo *iface, const WCHAR *formatguid)
Definition: info.c:1125
static HRESULT ComponentInfo_GetStringValue(HKEY classkey, LPCWSTR value, UINT buffer_size, WCHAR *buffer, UINT *actual_size)
Definition: info.c:44
static ULONG WINAPI BitmapDecoderInfo_Release(IWICBitmapDecoderInfo *iface)
Definition: info.c:238
static HRESULT WINAPI MetadataReaderInfo_MatchesPattern(IWICMetadataReaderInfo *iface, REFGUID container_guid, IStream *stream, BOOL *matches)
Definition: info.c:1726
static const IWICPixelFormatInfo2Vtbl PixelFormatInfo_Vtbl
Definition: info.c:1428
static BOOL is_1bpp_format(const WICPixelFormatGUID *format)
Definition: info.c:2431
static HRESULT WINAPI PixelFormatInfo_GetBitsPerPixel(IWICPixelFormatInfo2 *iface, UINT *puiBitsPerPixel)
Definition: info.c:1348
static BitmapDecoderInfo * impl_from_IWICBitmapDecoderInfo(IWICBitmapDecoderInfo *iface)
Definition: info.c:198
static HRESULT WINAPI BitmapEncoderInfo_GetColorManagementVersion(IWICBitmapEncoderInfo *iface, UINT cchColorManagementVersion, WCHAR *wzColorManagementVersion, UINT *pcchActual)
Definition: info.c:833
static HRESULT WINAPI PixelFormatInfo_GetNumericRepresentation(IWICPixelFormatInfo2 *iface, WICPixelFormatNumericRepresentation *pNumericRepresentation)
Definition: info.c:1418
static HRESULT WINAPI FormatConverterInfo_GetVendorGUID(IWICFormatConverterInfo *iface, GUID *pguidVendor)
Definition: info.c:1065
static ULONG WINAPI BitmapEncoderInfo_AddRef(IWICBitmapEncoderInfo *iface)
Definition: info.c:712
static HRESULT WINAPI BitmapEncoderInfo_GetPixelFormats(IWICBitmapEncoderInfo *iface, UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
Definition: info.c:825
static HRESULT WINAPI BitmapDecoderInfo_GetMimeTypes(IWICBitmapDecoderInfo *iface, UINT cchMimeTypes, WCHAR *wzMimeTypes, UINT *pcchActual)
Definition: info.c:371
static const IWICMetadataReaderInfoVtbl MetadataReaderInfo_Vtbl
Definition: info.c:1801
static HRESULT WINAPI FormatConverterInfo_GetFriendlyName(IWICFormatConverterInfo *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
Definition: info.c:1096
static ULONG WINAPI FormatConverterInfo_Release(IWICFormatConverterInfo *iface)
Definition: info.c:1012
static const IWICFormatConverterInfoVtbl FormatConverterInfo_Vtbl
Definition: info.c:1145
static HRESULT BitmapEncoderInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
Definition: info.c:948
static HRESULT WINAPI PixelFormatInfo_GetVendorGUID(IWICPixelFormatInfo2 *iface, GUID *pguidVendor)
Definition: info.c:1286
static HRESULT WINAPI PixelFormatInfo_GetCLSID(IWICPixelFormatInfo2 *iface, CLSID *pclsid)
Definition: info.c:1251
static HRESULT WINAPI PixelFormatInfo_GetChannelMask(IWICPixelFormatInfo2 *iface, UINT uiChannelIndex, UINT cbMaskBuffer, BYTE *pbMaskBuffer, UINT *pcbActual)
Definition: info.c:1368
static HRESULT FormatConverterInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
Definition: info.c:1161
static HRESULT WINAPI BitmapEncoderInfo_GetDeviceModels(IWICBitmapEncoderInfo *iface, UINT cchDeviceModels, WCHAR *wzDeviceModels, UINT *pcchActual)
Definition: info.c:847
static HRESULT WINAPI MetadataReaderInfo_GetSpecVersion(IWICMetadataReaderInfo *iface, UINT length, WCHAR *version, UINT *actual_length)
Definition: info.c:1615
static BitmapEncoderInfo * impl_from_IWICBitmapEncoderInfo(IWICBitmapEncoderInfo *iface)
Definition: info.c:682
static ULONG WINAPI PixelFormatInfo_Release(IWICPixelFormatInfo2 *iface)
Definition: info.c:1226
static HRESULT WINAPI MetadataReaderInfo_GetAuthor(IWICMetadataReaderInfo *iface, UINT length, WCHAR *author, UINT *actual_length)
Definition: info.c:1585
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportAnimation(IWICBitmapDecoderInfo *iface, BOOL *pfSupportAnimation)
Definition: info.c:393
static CRITICAL_SECTION component_info_cache_cs
Definition: info.c:2021
static HRESULT WINAPI BitmapEncoderInfo_QueryInterface(IWICBitmapEncoderInfo *iface, REFIID iid, void **ppv)
Definition: info.c:687
static ULONG WINAPI FormatConverterInfo_AddRef(IWICFormatConverterInfo *iface)
Definition: info.c:1002
static void read_metadata_patterns(MetadataReaderInfo *info, GUID *container_guid, struct metadata_container *container)
Definition: info.c:1825
static HRESULT WINAPI PixelFormatInfo_GetVersion(IWICPixelFormatInfo2 *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
Definition: info.c:1295
static HRESULT WINAPI BitmapDecoderInfo_MatchesPattern(IWICBitmapDecoderInfo *iface, IStream *pIStream, BOOL *pfMatches)
Definition: info.c:448
static const IEnumUnknownVtbl ComponentEnumVtbl
Definition: info.c:2151
HRESULT CreateComponentEnumerator(DWORD componentTypes, DWORD options, IEnumUnknown **ppIEnumUnknown)
Definition: info.c:2339
HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst)
Definition: info.c:2437
static HRESULT WINAPI BitmapDecoderInfo_GetPixelFormats(IWICBitmapDecoderInfo *iface, UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
Definition: info.c:342
static MetadataReaderInfo * impl_from_IWICMetadataReaderInfo(IWICMetadataReaderInfo *iface)
Definition: info.c:1496
static HRESULT WINAPI BitmapDecoderInfo_CreateInstance(IWICBitmapDecoderInfo *iface, IWICBitmapDecoder **ppIBitmapDecoder)
Definition: info.c:512
static HRESULT WINAPI MetadataReaderInfo_DoesSupportPadding(IWICMetadataReaderInfo *iface, BOOL *param)
Definition: info.c:1687
static HRESULT WINAPI FormatConverterInfo_GetSigningStatus(IWICFormatConverterInfo *iface, DWORD *pStatus)
Definition: info.c:1049
static void read_bitmap_patterns(BitmapDecoderInfo *info)
Definition: info.c:551
static HRESULT WINAPI FormatConverterInfo_GetCLSID(IWICFormatConverterInfo *iface, CLSID *pclsid)
Definition: info.c:1037
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportMultiframe(IWICBitmapDecoderInfo *iface, BOOL *pfSupportMultiframe)
Definition: info.c:414
static HRESULT WINAPI FormatConverterInfo_GetAuthor(IWICFormatConverterInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
Definition: info.c:1055
static HRESULT BitmapDecoderInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
Definition: info.c:655
static HRESULT WINAPI BitmapEncoderInfo_GetMimeTypes(IWICBitmapEncoderInfo *iface, UINT cchMimeTypes, WCHAR *wzMimeTypes, UINT *pcchActual)
Definition: info.c:854
static HRESULT WINAPI MetadataReaderInfo_QueryInterface(IWICMetadataReaderInfo *iface, REFIID riid, void **ppv)
Definition: info.c:1501
static HRESULT WINAPI BitmapEncoderInfo_GetSigningStatus(IWICBitmapEncoderInfo *iface, DWORD *pStatus)
Definition: info.c:759
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportChromaKey(IWICBitmapDecoderInfo *iface, BOOL *pfSupportChromaKey)
Definition: info.c:400
static HRESULT WINAPI BitmapDecoderInfo_GetPatterns(IWICBitmapDecoderInfo *iface, UINT cbSizePatterns, WICBitmapPattern *pPatterns, UINT *pcPatterns, UINT *pcbPatternsActual)
Definition: info.c:428
static HRESULT WINAPI MetadataReaderInfo_CreateInstance(IWICMetadataReaderInfo *iface, IWICMetadataReader **reader)
Definition: info.c:1791
static HRESULT WINAPI BitmapDecoderInfo_GetDeviceManufacturer(IWICBitmapDecoderInfo *iface, UINT cchDeviceManufacturer, WCHAR *wzDeviceManufacturer, UINT *pcchActual)
Definition: info.c:357
static HRESULT WINAPI MetadataReaderInfo_GetCLSID(IWICMetadataReaderInfo *iface, CLSID *clsid)
Definition: info.c:1566
static const IWICBitmapDecoderInfoVtbl BitmapDecoderInfo_Vtbl
Definition: info.c:522
void ReleaseComponentInfos(void)
Definition: info.c:2110
static const IWICBitmapEncoderInfoVtbl BitmapEncoderInfo_Vtbl
Definition: info.c:921
static HRESULT WINAPI BitmapEncoderInfo_GetCLSID(IWICBitmapEncoderInfo *iface, CLSID *pclsid)
Definition: info.c:747
static HRESULT WINAPI FormatConverterInfo_QueryInterface(IWICFormatConverterInfo *iface, REFIID iid, void **ppv)
Definition: info.c:978
static HRESULT WINAPI BitmapEncoderInfo_MatchesMimeType(IWICBitmapEncoderInfo *iface, LPCWSTR wzMimeType, BOOL *pfMatches)
Definition: info.c:904
static int ComponentInfo_Compare(const void *key, const struct wine_rb_entry *entry)
Definition: info.c:2013
static ULONG WINAPI PixelFormatInfo_AddRef(IWICPixelFormatInfo2 *iface)
Definition: info.c:1216
static HRESULT WINAPI MetadataReaderInfo_GetSigningStatus(IWICMetadataReaderInfo *iface, DWORD *status)
Definition: info.c:1578
static HRESULT WINAPI BitmapEncoderInfo_GetComponentType(IWICBitmapEncoderInfo *iface, WICComponentType *pType)
Definition: info.c:738
static HRESULT ComponentInfo_GetGuidList(HKEY classkey, LPCWSTR subkeyname, UINT buffersize, GUID *buffer, UINT *actual_size)
Definition: info.c:123
static HRESULT WINAPI FormatConverterInfo_GetVersion(IWICFormatConverterInfo *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
Definition: info.c:1074
static PixelFormatInfo * impl_from_IWICPixelFormatInfo2(IWICPixelFormatInfo2 *iface)
Definition: info.c:1186
static ULONG WINAPI MetadataReaderInfo_AddRef(IWICMetadataReaderInfo *iface)
Definition: info.c:1527
static HRESULT WINAPI BitmapEncoderInfo_GetVendorGUID(IWICBitmapEncoderInfo *iface, GUID *pguidVendor)
Definition: info.c:775
static HRESULT WINAPI PixelFormatInfo_GetFormatGUID(IWICPixelFormatInfo2 *iface, GUID *pFormat)
Definition: info.c:1328
static HRESULT WINAPI BitmapDecoderInfo_MatchesMimeType(IWICBitmapDecoderInfo *iface, LPCWSTR wzMimeType, BOOL *pfMatches)
Definition: info.c:421
static HRESULT WINAPI FormatConverterInfo_GetSpecVersion(IWICFormatConverterInfo *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
Definition: info.c:1085
static ULONG WINAPI MetadataReaderInfo_Release(IWICMetadataReaderInfo *iface)
Definition: info.c:1536
static HRESULT WINAPI MetadataReaderInfo_GetPatterns(IWICMetadataReaderInfo *iface, REFGUID container_guid, UINT length, WICMetadataPattern *patterns, UINT *count, UINT *actual_length)
Definition: info.c:1702
static HRESULT WINAPI PixelFormatInfo_GetSpecVersion(IWICPixelFormatInfo2 *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
Definition: info.c:1306
static HRESULT WINAPI MetadataReaderInfo_GetComponentType(IWICMetadataReaderInfo *iface, WICComponentType *type)
Definition: info.c:1556
static CRITICAL_SECTION_DEBUG component_info_cache_cs_dbg
Definition: info.c:2022
static FormatConverterInfo * impl_from_IWICFormatConverterInfo(IWICFormatConverterInfo *iface)
Definition: info.c:973
static HRESULT WINAPI PixelFormatInfo_GetSigningStatus(IWICPixelFormatInfo2 *iface, DWORD *pStatus)
Definition: info.c:1263
static HRESULT WINAPI BitmapEncoderInfo_GetVersion(IWICBitmapEncoderInfo *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
Definition: info.c:784
static HRESULT WINAPI PixelFormatInfo_GetAuthor(IWICPixelFormatInfo2 *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
Definition: info.c:1276
static HRESULT WINAPI BitmapDecoderInfo_GetContainerFormat(IWICBitmapDecoderInfo *iface, GUID *pguidContainerFormat)
Definition: info.c:334
static HRESULT WINAPI FormatConverterInfo_CreateInstance(IWICFormatConverterInfo *iface, IWICFormatConverter **ppIFormatConverter)
Definition: info.c:1114
static HRESULT WINAPI BitmapEncoderInfo_GetContainerFormat(IWICBitmapEncoderInfo *iface, GUID *pguidContainerFormat)
Definition: info.c:817
static HRESULT WINAPI MetadataReaderInfo_GetVendorGUID(IWICMetadataReaderInfo *iface, GUID *vendor)
Definition: info.c:1595
static HRESULT WINAPI FormatConverterInfo_GetPixelFormats(IWICFormatConverterInfo *iface, UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
Definition: info.c:1107
static HRESULT WINAPI BitmapDecoderInfo_GetVersion(IWICBitmapDecoderInfo *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
Definition: info.c:301
static HRESULT WINAPI ComponentEnum_Next(IEnumUnknown *iface, ULONG celt, IUnknown **rgelt, ULONG *pceltFetched)
Definition: info.c:2210
static HRESULT WINAPI ComponentEnum_Clone(IEnumUnknown *iface, IEnumUnknown **ppenum)
Definition: info.c:2274
static HRESULT WINAPI BitmapDecoderInfo_GetSigningStatus(IWICBitmapDecoderInfo *iface, DWORD *pStatus)
Definition: info.c:276
#define swprintf
Definition: precomp.h:40
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned int Mask
Definition: fpcontrol.c:82
__in WDFDMATRANSACTION __out NTSTATUS * pStatus
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
GLsizei GLenum * categories
Definition: glext.h:11561
GLuint res
Definition: glext.h:9613
GLuint buffer
Definition: glext.h:5915
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLuint64EXT * result
Definition: glext.h:11304
GLfloat param
Definition: glext.h:5796
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
const char cursor[]
Definition: icontest.c:13
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
uint32_t entry
Definition: isohybrid.c:63
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
const GUID * guid
#define matches(FN)
Definition: match.h:70
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
static const CLSID * objects[]
Definition: apphelp.c:112
static ATOM item
Definition: dde.c:856
struct _ULARGE_INTEGER ULARGE_INTEGER
REFCLSID clsid
Definition: msctf.c:82
unsigned int UINT
Definition: ndis.h:50
#define BOOL
Definition: nt_native.h:43
#define KEY_READ
Definition: nt_native.h:1023
#define DWORD
Definition: nt_native.h:44
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define L(x)
Definition: ntvdm.h:50
const GUID IID_IEnumUnknown
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define calloc
Definition: rosglue.h:14
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
#define WINE_RB_ENTRY_VALUE(element, type, field)
Definition: rbtree.h:31
static struct wine_rb_entry * wine_rb_get(const struct wine_rb_tree *tree, const void *key)
Definition: rbtree.h:203
#define WINE_RB_FOR_EACH_ENTRY_DESTRUCTOR(elem, elem2, tree, type, field)
Definition: rbtree.h:166
static int wine_rb_put(struct wine_rb_tree *tree, const void *key, struct wine_rb_entry *entry)
Definition: rbtree.h:215
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
wchar_t const *const size_t const buffer_size
Definition: stat.cpp:95
UINT pattern_count
Definition: info.c:194
ComponentInfo base
Definition: info.c:191
WICBitmapPattern * patterns
Definition: info.c:193
HKEY classkey
Definition: info.c:192
UINT patterns_size
Definition: info.c:195
ComponentInfo base
Definition: info.c:678
HKEY classkey
Definition: info.c:679
IUnknown * unk
Definition: info.c:2148
struct list entry
Definition: info.c:2147
IEnumUnknown IEnumUnknown_iface
Definition: info.c:2134
LONG ref
Definition: info.c:2135
CRITICAL_SECTION lock
Definition: info.c:2138
struct list objects
Definition: info.c:2136
struct list * cursor
Definition: info.c:2137
IWICComponentInfo IWICComponentInfo_iface
Definition: info.c:38
LONG ref
Definition: info.c:39
CLSID clsid
Definition: info.c:40
ComponentInfo base
Definition: info.c:969
GUID * container_formats
Definition: info.c:1480
ComponentInfo base
Definition: info.c:1478
struct metadata_container * containers
Definition: info.c:1481
UINT container_count
Definition: info.c:1482
HKEY classkey
Definition: info.c:1183
ComponentInfo base
Definition: info.c:1182
ULARGE_INTEGER Position
Definition: wincodec.idl:339
ULARGE_INTEGER DataOffset
ULARGE_INTEGER Position
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:912
LIST_ENTRY ProcessLocksList
Definition: winbase.h:908
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:919
Definition: scsiwmi.h:51
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
Definition: svc_auth_des.c:77
WICComponentType type
Definition: info.c:1999
const GUID * catid
Definition: info.c:2000
HRESULT(* constructor)(HKEY, REFCLSID, ComponentInfo **)
Definition: info.c:2001
Definition: format.c:58
Definition: copy.c:22
Definition: list.h:15
UINT patterns_size
Definition: info.c:1473
WICMetadataPattern * patterns
Definition: info.c:1471
UINT pattern_count
Definition: info.c:1472
Definition: name.c:39
Definition: reader.h:84
Definition: send.c:48
Definition: ps.c:97
Definition: parse.h:23
Definition: rbtree.h:36
static COORD Position
Definition: mouse.c:34
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define LIST_ENTRY(type)
Definition: queue.h:175
#define DWORD_PTR
Definition: treelist.c:76
uint64_t DWORD64
Definition: typedefs.h:67
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
LONGLONG QuadPart
Definition: typedefs.h:114
Definition: pdh_main.c:94
int ret
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
@ WICComponentSigned
Definition: wincodec.idl:136
@ WICBitmapDitherTypeNone
Definition: wincodec.idl:57
WICPixelFormatNumericRepresentation
Definition: wincodec.idl:158
@ WICBitmapPaletteTypeMedianCut
Definition: wincodec.idl:93
WICComponentType
Definition: wincodec.idl:125
@ WICDecoder
Definition: wincodec.idl:126
@ WICPixelFormatConverter
Definition: wincodec.idl:128
@ WICMetadataReader
Definition: wincodec.idl:129
@ WICEncoder
Definition: wincodec.idl:127
@ WICPixelFormat
Definition: wincodec.idl:131
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define WINCODEC_ERR_COMPONENTNOTFOUND
Definition: winerror.h:3296
#define E_NOINTERFACE
Definition: winerror.h:2364
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define STG_E_INVALIDFUNCTION
Definition: winerror.h:2564
#define WINCODEC_ERR_INSUFFICIENTBUFFER
Definition: winerror.h:3311
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
Definition: winnt_old.h:1118
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193