ReactOS 0.4.16-dev-905-gc1b8c4f
info.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "objbase.h"
#include "wincodecs_private.h"
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/rbtree.h"
Include dependency graph for info.c:

Go to the source code of this file.

Classes

struct  ComponentInfo
 
struct  BitmapDecoderInfo
 
struct  BitmapEncoderInfo
 
struct  FormatConverterInfo
 
struct  PixelFormatInfo
 
struct  metadata_container
 
struct  MetadataReaderInfo
 
struct  category
 
struct  ComponentEnum
 
struct  ComponentEnumItem
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wincodecs)
 
static HRESULT ComponentInfo_GetStringValue (HKEY classkey, LPCWSTR value, UINT buffer_size, WCHAR *buffer, UINT *actual_size)
 
static HRESULT ComponentInfo_GetGUIDValue (HKEY classkey, LPCWSTR value, GUID *result)
 
static HRESULT ComponentInfo_GetUINTValue (HKEY classkey, LPCWSTR value, void *result)
 
static HRESULT ComponentInfo_GetGuidList (HKEY classkey, LPCWSTR subkeyname, UINT buffersize, GUID *buffer, UINT *actual_size)
 
static BitmapDecoderInfoimpl_from_IWICBitmapDecoderInfo (IWICBitmapDecoderInfo *iface)
 
static HRESULT WINAPI BitmapDecoderInfo_QueryInterface (IWICBitmapDecoderInfo *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI BitmapDecoderInfo_AddRef (IWICBitmapDecoderInfo *iface)
 
static ULONG WINAPI BitmapDecoderInfo_Release (IWICBitmapDecoderInfo *iface)
 
static HRESULT WINAPI BitmapDecoderInfo_GetComponentType (IWICBitmapDecoderInfo *iface, WICComponentType *pType)
 
static HRESULT WINAPI BitmapDecoderInfo_GetCLSID (IWICBitmapDecoderInfo *iface, CLSID *pclsid)
 
static HRESULT WINAPI BitmapDecoderInfo_GetSigningStatus (IWICBitmapDecoderInfo *iface, DWORD *pStatus)
 
static HRESULT WINAPI BitmapDecoderInfo_GetAuthor (IWICBitmapDecoderInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
 
static HRESULT WINAPI BitmapDecoderInfo_GetVendorGUID (IWICBitmapDecoderInfo *iface, GUID *pguidVendor)
 
static HRESULT WINAPI BitmapDecoderInfo_GetVersion (IWICBitmapDecoderInfo *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
 
static HRESULT WINAPI BitmapDecoderInfo_GetSpecVersion (IWICBitmapDecoderInfo *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
 
static HRESULT WINAPI BitmapDecoderInfo_GetFriendlyName (IWICBitmapDecoderInfo *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
 
static HRESULT WINAPI BitmapDecoderInfo_GetContainerFormat (IWICBitmapDecoderInfo *iface, GUID *pguidContainerFormat)
 
static HRESULT WINAPI BitmapDecoderInfo_GetPixelFormats (IWICBitmapDecoderInfo *iface, UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
 
static HRESULT WINAPI BitmapDecoderInfo_GetColorManagementVersion (IWICBitmapDecoderInfo *iface, UINT cchColorManagementVersion, WCHAR *wzColorManagementVersion, UINT *pcchActual)
 
static HRESULT WINAPI BitmapDecoderInfo_GetDeviceManufacturer (IWICBitmapDecoderInfo *iface, UINT cchDeviceManufacturer, WCHAR *wzDeviceManufacturer, UINT *pcchActual)
 
static HRESULT WINAPI BitmapDecoderInfo_GetDeviceModels (IWICBitmapDecoderInfo *iface, UINT cchDeviceModels, WCHAR *wzDeviceModels, UINT *pcchActual)
 
static HRESULT WINAPI BitmapDecoderInfo_GetMimeTypes (IWICBitmapDecoderInfo *iface, UINT cchMimeTypes, WCHAR *wzMimeTypes, UINT *pcchActual)
 
static HRESULT WINAPI BitmapDecoderInfo_GetFileExtensions (IWICBitmapDecoderInfo *iface, UINT cchFileExtensions, WCHAR *wzFileExtensions, UINT *pcchActual)
 
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportAnimation (IWICBitmapDecoderInfo *iface, BOOL *pfSupportAnimation)
 
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportChromaKey (IWICBitmapDecoderInfo *iface, BOOL *pfSupportChromaKey)
 
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportLossless (IWICBitmapDecoderInfo *iface, BOOL *pfSupportLossless)
 
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportMultiframe (IWICBitmapDecoderInfo *iface, BOOL *pfSupportMultiframe)
 
static HRESULT WINAPI BitmapDecoderInfo_MatchesMimeType (IWICBitmapDecoderInfo *iface, LPCWSTR wzMimeType, BOOL *pfMatches)
 
static HRESULT WINAPI BitmapDecoderInfo_GetPatterns (IWICBitmapDecoderInfo *iface, UINT cbSizePatterns, WICBitmapPattern *pPatterns, UINT *pcPatterns, UINT *pcbPatternsActual)
 
static HRESULT WINAPI BitmapDecoderInfo_MatchesPattern (IWICBitmapDecoderInfo *iface, IStream *pIStream, BOOL *pfMatches)
 
static HRESULT WINAPI BitmapDecoderInfo_CreateInstance (IWICBitmapDecoderInfo *iface, IWICBitmapDecoder **ppIBitmapDecoder)
 
static void read_bitmap_patterns (BitmapDecoderInfo *info)
 
static HRESULT BitmapDecoderInfo_Constructor (HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
 
static BitmapEncoderInfoimpl_from_IWICBitmapEncoderInfo (IWICBitmapEncoderInfo *iface)
 
static HRESULT WINAPI BitmapEncoderInfo_QueryInterface (IWICBitmapEncoderInfo *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI BitmapEncoderInfo_AddRef (IWICBitmapEncoderInfo *iface)
 
static ULONG WINAPI BitmapEncoderInfo_Release (IWICBitmapEncoderInfo *iface)
 
static HRESULT WINAPI BitmapEncoderInfo_GetComponentType (IWICBitmapEncoderInfo *iface, WICComponentType *pType)
 
static HRESULT WINAPI BitmapEncoderInfo_GetCLSID (IWICBitmapEncoderInfo *iface, CLSID *pclsid)
 
static HRESULT WINAPI BitmapEncoderInfo_GetSigningStatus (IWICBitmapEncoderInfo *iface, DWORD *pStatus)
 
static HRESULT WINAPI BitmapEncoderInfo_GetAuthor (IWICBitmapEncoderInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
 
static HRESULT WINAPI BitmapEncoderInfo_GetVendorGUID (IWICBitmapEncoderInfo *iface, GUID *pguidVendor)
 
static HRESULT WINAPI BitmapEncoderInfo_GetVersion (IWICBitmapEncoderInfo *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
 
static HRESULT WINAPI BitmapEncoderInfo_GetSpecVersion (IWICBitmapEncoderInfo *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
 
static HRESULT WINAPI BitmapEncoderInfo_GetFriendlyName (IWICBitmapEncoderInfo *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
 
static HRESULT WINAPI BitmapEncoderInfo_GetContainerFormat (IWICBitmapEncoderInfo *iface, GUID *pguidContainerFormat)
 
static HRESULT WINAPI BitmapEncoderInfo_GetPixelFormats (IWICBitmapEncoderInfo *iface, UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
 
static HRESULT WINAPI BitmapEncoderInfo_GetColorManagementVersion (IWICBitmapEncoderInfo *iface, UINT cchColorManagementVersion, WCHAR *wzColorManagementVersion, UINT *pcchActual)
 
static HRESULT WINAPI BitmapEncoderInfo_GetDeviceManufacturer (IWICBitmapEncoderInfo *iface, UINT cchDeviceManufacturer, WCHAR *wzDeviceManufacturer, UINT *pcchActual)
 
static HRESULT WINAPI BitmapEncoderInfo_GetDeviceModels (IWICBitmapEncoderInfo *iface, UINT cchDeviceModels, WCHAR *wzDeviceModels, UINT *pcchActual)
 
static HRESULT WINAPI BitmapEncoderInfo_GetMimeTypes (IWICBitmapEncoderInfo *iface, UINT cchMimeTypes, WCHAR *wzMimeTypes, UINT *pcchActual)
 
static HRESULT WINAPI BitmapEncoderInfo_GetFileExtensions (IWICBitmapEncoderInfo *iface, UINT cchFileExtensions, WCHAR *wzFileExtensions, UINT *pcchActual)
 
static HRESULT WINAPI BitmapEncoderInfo_DoesSupportAnimation (IWICBitmapEncoderInfo *iface, BOOL *pfSupportAnimation)
 
static HRESULT WINAPI BitmapEncoderInfo_DoesSupportChromaKey (IWICBitmapEncoderInfo *iface, BOOL *pfSupportChromaKey)
 
static HRESULT WINAPI BitmapEncoderInfo_DoesSupportLossless (IWICBitmapEncoderInfo *iface, BOOL *pfSupportLossless)
 
static HRESULT WINAPI BitmapEncoderInfo_DoesSupportMultiframe (IWICBitmapEncoderInfo *iface, BOOL *pfSupportMultiframe)
 
static HRESULT WINAPI BitmapEncoderInfo_MatchesMimeType (IWICBitmapEncoderInfo *iface, LPCWSTR wzMimeType, BOOL *pfMatches)
 
static HRESULT WINAPI BitmapEncoderInfo_CreateInstance (IWICBitmapEncoderInfo *iface, IWICBitmapEncoder **ppIBitmapEncoder)
 
static HRESULT BitmapEncoderInfo_Constructor (HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
 
static FormatConverterInfoimpl_from_IWICFormatConverterInfo (IWICFormatConverterInfo *iface)
 
static HRESULT WINAPI FormatConverterInfo_QueryInterface (IWICFormatConverterInfo *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI FormatConverterInfo_AddRef (IWICFormatConverterInfo *iface)
 
static ULONG WINAPI FormatConverterInfo_Release (IWICFormatConverterInfo *iface)
 
static HRESULT WINAPI FormatConverterInfo_GetComponentType (IWICFormatConverterInfo *iface, WICComponentType *pType)
 
static HRESULT WINAPI FormatConverterInfo_GetCLSID (IWICFormatConverterInfo *iface, CLSID *pclsid)
 
static HRESULT WINAPI FormatConverterInfo_GetSigningStatus (IWICFormatConverterInfo *iface, DWORD *pStatus)
 
static HRESULT WINAPI FormatConverterInfo_GetAuthor (IWICFormatConverterInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
 
static HRESULT WINAPI FormatConverterInfo_GetVendorGUID (IWICFormatConverterInfo *iface, GUID *pguidVendor)
 
static HRESULT WINAPI FormatConverterInfo_GetVersion (IWICFormatConverterInfo *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
 
static HRESULT WINAPI FormatConverterInfo_GetSpecVersion (IWICFormatConverterInfo *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
 
static HRESULT WINAPI FormatConverterInfo_GetFriendlyName (IWICFormatConverterInfo *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
 
static HRESULT WINAPI FormatConverterInfo_GetPixelFormats (IWICFormatConverterInfo *iface, UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
 
static HRESULT WINAPI FormatConverterInfo_CreateInstance (IWICFormatConverterInfo *iface, IWICFormatConverter **ppIFormatConverter)
 
static BOOL ConverterSupportsFormat (IWICFormatConverterInfo *iface, const WCHAR *formatguid)
 
static HRESULT FormatConverterInfo_Constructor (HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
 
static PixelFormatInfoimpl_from_IWICPixelFormatInfo2 (IWICPixelFormatInfo2 *iface)
 
static HRESULT WINAPI PixelFormatInfo_QueryInterface (IWICPixelFormatInfo2 *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI PixelFormatInfo_AddRef (IWICPixelFormatInfo2 *iface)
 
static ULONG WINAPI PixelFormatInfo_Release (IWICPixelFormatInfo2 *iface)
 
static HRESULT WINAPI PixelFormatInfo_GetComponentType (IWICPixelFormatInfo2 *iface, WICComponentType *pType)
 
static HRESULT WINAPI PixelFormatInfo_GetCLSID (IWICPixelFormatInfo2 *iface, CLSID *pclsid)
 
static HRESULT WINAPI PixelFormatInfo_GetSigningStatus (IWICPixelFormatInfo2 *iface, DWORD *pStatus)
 
static HRESULT WINAPI PixelFormatInfo_GetAuthor (IWICPixelFormatInfo2 *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
 
static HRESULT WINAPI PixelFormatInfo_GetVendorGUID (IWICPixelFormatInfo2 *iface, GUID *pguidVendor)
 
static HRESULT WINAPI PixelFormatInfo_GetVersion (IWICPixelFormatInfo2 *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
 
static HRESULT WINAPI PixelFormatInfo_GetSpecVersion (IWICPixelFormatInfo2 *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
 
static HRESULT WINAPI PixelFormatInfo_GetFriendlyName (IWICPixelFormatInfo2 *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
 
static HRESULT WINAPI PixelFormatInfo_GetFormatGUID (IWICPixelFormatInfo2 *iface, GUID *pFormat)
 
static HRESULT WINAPI PixelFormatInfo_GetColorContext (IWICPixelFormatInfo2 *iface, IWICColorContext **ppIColorContext)
 
static HRESULT WINAPI PixelFormatInfo_GetBitsPerPixel (IWICPixelFormatInfo2 *iface, UINT *puiBitsPerPixel)
 
static HRESULT WINAPI PixelFormatInfo_GetChannelCount (IWICPixelFormatInfo2 *iface, UINT *puiChannelCount)
 
static HRESULT WINAPI PixelFormatInfo_GetChannelMask (IWICPixelFormatInfo2 *iface, UINT uiChannelIndex, UINT cbMaskBuffer, BYTE *pbMaskBuffer, UINT *pcbActual)
 
static HRESULT WINAPI PixelFormatInfo_SupportsTransparency (IWICPixelFormatInfo2 *iface, BOOL *pfSupportsTransparency)
 
static HRESULT WINAPI PixelFormatInfo_GetNumericRepresentation (IWICPixelFormatInfo2 *iface, WICPixelFormatNumericRepresentation *pNumericRepresentation)
 
static HRESULT PixelFormatInfo_Constructor (HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
 
static struct metadata_containerget_metadata_container (MetadataReaderInfo *info, const GUID *guid)
 
static MetadataReaderInfoimpl_from_IWICMetadataReaderInfo (IWICMetadataReaderInfo *iface)
 
static HRESULT WINAPI MetadataReaderInfo_QueryInterface (IWICMetadataReaderInfo *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI MetadataReaderInfo_AddRef (IWICMetadataReaderInfo *iface)
 
static ULONG WINAPI MetadataReaderInfo_Release (IWICMetadataReaderInfo *iface)
 
static HRESULT WINAPI MetadataReaderInfo_GetComponentType (IWICMetadataReaderInfo *iface, WICComponentType *type)
 
static HRESULT WINAPI MetadataReaderInfo_GetCLSID (IWICMetadataReaderInfo *iface, CLSID *clsid)
 
static HRESULT WINAPI MetadataReaderInfo_GetSigningStatus (IWICMetadataReaderInfo *iface, DWORD *status)
 
static HRESULT WINAPI MetadataReaderInfo_GetAuthor (IWICMetadataReaderInfo *iface, UINT length, WCHAR *author, UINT *actual_length)
 
static HRESULT WINAPI MetadataReaderInfo_GetVendorGUID (IWICMetadataReaderInfo *iface, GUID *vendor)
 
static HRESULT WINAPI MetadataReaderInfo_GetVersion (IWICMetadataReaderInfo *iface, UINT length, WCHAR *version, UINT *actual_length)
 
static HRESULT WINAPI MetadataReaderInfo_GetSpecVersion (IWICMetadataReaderInfo *iface, UINT length, WCHAR *version, UINT *actual_length)
 
static HRESULT WINAPI MetadataReaderInfo_GetFriendlyName (IWICMetadataReaderInfo *iface, UINT length, WCHAR *name, UINT *actual_length)
 
static HRESULT WINAPI MetadataReaderInfo_GetMetadataFormat (IWICMetadataReaderInfo *iface, GUID *format)
 
static HRESULT WINAPI MetadataReaderInfo_GetContainerFormats (IWICMetadataReaderInfo *iface, UINT length, GUID *formats, UINT *actual_length)
 
static HRESULT WINAPI MetadataReaderInfo_GetDeviceManufacturer (IWICMetadataReaderInfo *iface, UINT length, WCHAR *manufacturer, UINT *actual_length)
 
static HRESULT WINAPI MetadataReaderInfo_GetDeviceModels (IWICMetadataReaderInfo *iface, UINT length, WCHAR *models, UINT *actual_length)
 
static HRESULT WINAPI MetadataReaderInfo_DoesRequireFullStream (IWICMetadataReaderInfo *iface, BOOL *param)
 
static HRESULT WINAPI MetadataReaderInfo_DoesSupportPadding (IWICMetadataReaderInfo *iface, BOOL *param)
 
static HRESULT WINAPI MetadataReaderInfo_DoesRequireFixedSize (IWICMetadataReaderInfo *iface, BOOL *param)
 
static HRESULT WINAPI MetadataReaderInfo_GetPatterns (IWICMetadataReaderInfo *iface, REFGUID container_guid, UINT length, WICMetadataPattern *patterns, UINT *count, UINT *actual_length)
 
static HRESULT WINAPI MetadataReaderInfo_MatchesPattern (IWICMetadataReaderInfo *iface, REFGUID container_guid, IStream *stream, BOOL *matches)
 
static HRESULT WINAPI MetadataReaderInfo_CreateInstance (IWICMetadataReaderInfo *iface, IWICMetadataReader **reader)
 
static void read_metadata_patterns (MetadataReaderInfo *info, GUID *container_guid, struct metadata_container *container)
 
static BOOL read_metadata_info (MetadataReaderInfo *info)
 
static HRESULT MetadataReaderInfo_Constructor (HKEY classkey, REFCLSID clsid, ComponentInfo **info)
 
static int ComponentInfo_Compare (const void *key, const struct wine_rb_entry *entry)
 
HRESULT CreateComponentInfo (REFCLSID clsid, IWICComponentInfo **ppIInfo)
 
void ReleaseComponentInfos (void)
 
HRESULT get_decoder_info (REFCLSID clsid, IWICBitmapDecoderInfo **info)
 
static ComponentEnumimpl_from_IEnumUnknown (IEnumUnknown *iface)
 
static HRESULT WINAPI ComponentEnum_QueryInterface (IEnumUnknown *iface, REFIID iid, void **ppv)
 
static ULONG WINAPI ComponentEnum_AddRef (IEnumUnknown *iface)
 
static ULONG WINAPI ComponentEnum_Release (IEnumUnknown *iface)
 
static HRESULT WINAPI ComponentEnum_Next (IEnumUnknown *iface, ULONG celt, IUnknown **rgelt, ULONG *pceltFetched)
 
static HRESULT WINAPI ComponentEnum_Skip (IEnumUnknown *iface, ULONG celt)
 
static HRESULT WINAPI ComponentEnum_Reset (IEnumUnknown *iface)
 
static HRESULT WINAPI ComponentEnum_Clone (IEnumUnknown *iface, IEnumUnknown **ppenum)
 
HRESULT CreateComponentEnumerator (DWORD componentTypes, DWORD options, IEnumUnknown **ppIEnumUnknown)
 
static BOOL is_1bpp_format (const WICPixelFormatGUID *format)
 
HRESULT WINAPI WICConvertBitmapSource (REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst)
 

Variables

static const IWICBitmapDecoderInfoVtbl BitmapDecoderInfo_Vtbl
 
static const IWICBitmapEncoderInfoVtbl BitmapEncoderInfo_Vtbl
 
static const IWICFormatConverterInfoVtbl FormatConverterInfo_Vtbl
 
static const IWICPixelFormatInfo2Vtbl PixelFormatInfo_Vtbl
 
static const IWICMetadataReaderInfoVtbl MetadataReaderInfo_Vtbl
 
static const struct category categories []
 
static struct wine_rb_tree component_info_cache = { ComponentInfo_Compare }
 
static CRITICAL_SECTION component_info_cache_cs = { &component_info_cache_cs_dbg, -1, 0, 0, 0, 0 }
 
static CRITICAL_SECTION_DEBUG component_info_cache_cs_dbg
 
static const IEnumUnknownVtbl ComponentEnumVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file info.c.

Function Documentation

◆ BitmapDecoderInfo_AddRef()

static ULONG WINAPI BitmapDecoderInfo_AddRef ( IWICBitmapDecoderInfo iface)
static

Definition at line 228 of file info.c.

229{
231 ULONG ref = InterlockedIncrement(&This->base.ref);
232
233 TRACE("(%p) refcount=%lu\n", iface, ref);
234
235 return ref;
236}
#define InterlockedIncrement
Definition: armddk.h:53
static BitmapDecoderInfo * impl_from_IWICBitmapDecoderInfo(IWICBitmapDecoderInfo *iface)
Definition: info.c:198
#define TRACE(s)
Definition: solgame.cpp:4
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ BitmapDecoderInfo_Constructor()

static HRESULT BitmapDecoderInfo_Constructor ( HKEY  classkey,
REFCLSID  clsid,
ComponentInfo **  ret 
)
static

Definition at line 655 of file info.c.

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}
#define RegCloseKey(hKey)
Definition: registry.h:49
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static void read_bitmap_patterns(BitmapDecoderInfo *info)
Definition: info.c:551
static const IWICBitmapDecoderInfoVtbl BitmapDecoderInfo_Vtbl
Definition: info.c:522
#define S_OK
Definition: intsafe.h:52
REFCLSID clsid
Definition: msctf.c:82
#define calloc
Definition: rosglue.h:14
int ret

◆ BitmapDecoderInfo_CreateInstance()

static HRESULT WINAPI BitmapDecoderInfo_CreateInstance ( IWICBitmapDecoderInfo iface,
IWICBitmapDecoder **  ppIBitmapDecoder 
)
static

Definition at line 512 of file info.c.

514{
516
517 TRACE("(%p,%p)\n", iface, ppIBitmapDecoder);
518
519 return create_instance(&This->base.clsid, &IID_IWICBitmapDecoder, (void**)ppIBitmapDecoder);
520}
HRESULT create_instance(const CLSID *clsid, const IID *iid, void **ppv)
Definition: clsfactory.c:212

◆ BitmapDecoderInfo_DoesSupportAnimation()

static HRESULT WINAPI BitmapDecoderInfo_DoesSupportAnimation ( IWICBitmapDecoderInfo iface,
BOOL pfSupportAnimation 
)
static

Definition at line 393 of file info.c.

395{
396 FIXME("(%p,%p): stub\n", iface, pfSupportAnimation);
397 return E_NOTIMPL;
398}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ BitmapDecoderInfo_DoesSupportChromaKey()

static HRESULT WINAPI BitmapDecoderInfo_DoesSupportChromaKey ( IWICBitmapDecoderInfo iface,
BOOL pfSupportChromaKey 
)
static

Definition at line 400 of file info.c.

402{
403 FIXME("(%p,%p): stub\n", iface, pfSupportChromaKey);
404 return E_NOTIMPL;
405}

◆ BitmapDecoderInfo_DoesSupportLossless()

static HRESULT WINAPI BitmapDecoderInfo_DoesSupportLossless ( IWICBitmapDecoderInfo iface,
BOOL pfSupportLossless 
)
static

Definition at line 407 of file info.c.

409{
410 FIXME("(%p,%p): stub\n", iface, pfSupportLossless);
411 return E_NOTIMPL;
412}

◆ BitmapDecoderInfo_DoesSupportMultiframe()

static HRESULT WINAPI BitmapDecoderInfo_DoesSupportMultiframe ( IWICBitmapDecoderInfo iface,
BOOL pfSupportMultiframe 
)
static

Definition at line 414 of file info.c.

416{
417 FIXME("(%p,%p): stub\n", iface, pfSupportMultiframe);
418 return E_NOTIMPL;
419}

◆ BitmapDecoderInfo_GetAuthor()

static HRESULT WINAPI BitmapDecoderInfo_GetAuthor ( IWICBitmapDecoderInfo iface,
UINT  cchAuthor,
WCHAR wzAuthor,
UINT pcchActual 
)
static

Definition at line 282 of file info.c.

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}
static HRESULT ComponentInfo_GetStringValue(HKEY classkey, LPCWSTR value, UINT buffer_size, WCHAR *buffer, UINT *actual_size)
Definition: info.c:44
#define L(x)
Definition: ntvdm.h:50

◆ BitmapDecoderInfo_GetCLSID()

static HRESULT WINAPI BitmapDecoderInfo_GetCLSID ( IWICBitmapDecoderInfo iface,
CLSID pclsid 
)
static

Definition at line 264 of file info.c.

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}
#define E_INVALIDARG
Definition: ddrawi.h:101

◆ BitmapDecoderInfo_GetColorManagementVersion()

static HRESULT WINAPI BitmapDecoderInfo_GetColorManagementVersion ( IWICBitmapDecoderInfo iface,
UINT  cchColorManagementVersion,
WCHAR wzColorManagementVersion,
UINT pcchActual 
)
static

Definition at line 350 of file info.c.

352{
353 FIXME("(%p,%u,%p,%p): stub\n", iface, cchColorManagementVersion, wzColorManagementVersion, pcchActual);
354 return E_NOTIMPL;
355}

◆ BitmapDecoderInfo_GetComponentType()

static HRESULT WINAPI BitmapDecoderInfo_GetComponentType ( IWICBitmapDecoderInfo iface,
WICComponentType pType 
)
static

Definition at line 255 of file info.c.

257{
258 TRACE("(%p,%p)\n", iface, pType);
259 if (!pType) return E_INVALIDARG;
260 *pType = WICDecoder;
261 return S_OK;
262}
@ WICDecoder
Definition: wincodec.idl:126

◆ BitmapDecoderInfo_GetContainerFormat()

static HRESULT WINAPI BitmapDecoderInfo_GetContainerFormat ( IWICBitmapDecoderInfo iface,
GUID pguidContainerFormat 
)
static

Definition at line 334 of file info.c.

336{
338 TRACE("(%p,%p)\n", iface, pguidContainerFormat);
339 return ComponentInfo_GetGUIDValue(This->classkey, L"ContainerFormat", pguidContainerFormat);
340}
static HRESULT ComponentInfo_GetGUIDValue(HKEY classkey, LPCWSTR value, GUID *result)
Definition: info.c:74

◆ BitmapDecoderInfo_GetDeviceManufacturer()

static HRESULT WINAPI BitmapDecoderInfo_GetDeviceManufacturer ( IWICBitmapDecoderInfo iface,
UINT  cchDeviceManufacturer,
WCHAR wzDeviceManufacturer,
UINT pcchActual 
)
static

Definition at line 357 of file info.c.

359{
360 FIXME("(%p,%u,%p,%p): stub\n", iface, cchDeviceManufacturer, wzDeviceManufacturer, pcchActual);
361 return E_NOTIMPL;
362}

◆ BitmapDecoderInfo_GetDeviceModels()

static HRESULT WINAPI BitmapDecoderInfo_GetDeviceModels ( IWICBitmapDecoderInfo iface,
UINT  cchDeviceModels,
WCHAR wzDeviceModels,
UINT pcchActual 
)
static

Definition at line 364 of file info.c.

366{
367 FIXME("(%p,%u,%p,%p): stub\n", iface, cchDeviceModels, wzDeviceModels, pcchActual);
368 return E_NOTIMPL;
369}

◆ BitmapDecoderInfo_GetFileExtensions()

static HRESULT WINAPI BitmapDecoderInfo_GetFileExtensions ( IWICBitmapDecoderInfo iface,
UINT  cchFileExtensions,
WCHAR wzFileExtensions,
UINT pcchActual 
)
static

Definition at line 382 of file info.c.

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}

◆ BitmapDecoderInfo_GetFriendlyName()

static HRESULT WINAPI BitmapDecoderInfo_GetFriendlyName ( IWICBitmapDecoderInfo iface,
UINT  cchFriendlyName,
WCHAR wzFriendlyName,
UINT pcchActual 
)
static

Definition at line 323 of file info.c.

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}

◆ BitmapDecoderInfo_GetMimeTypes()

static HRESULT WINAPI BitmapDecoderInfo_GetMimeTypes ( IWICBitmapDecoderInfo iface,
UINT  cchMimeTypes,
WCHAR wzMimeTypes,
UINT pcchActual 
)
static

Definition at line 371 of file info.c.

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}

◆ BitmapDecoderInfo_GetPatterns()

static HRESULT WINAPI BitmapDecoderInfo_GetPatterns ( IWICBitmapDecoderInfo iface,
UINT  cbSizePatterns,
WICBitmapPattern pPatterns,
UINT pcPatterns,
UINT pcbPatternsActual 
)
static

Definition at line 428 of file info.c.

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}
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define WINCODEC_ERR_INSUFFICIENTBUFFER
Definition: winerror.h:3311

◆ BitmapDecoderInfo_GetPixelFormats()

static HRESULT WINAPI BitmapDecoderInfo_GetPixelFormats ( IWICBitmapDecoderInfo iface,
UINT  cFormats,
GUID pguidPixelFormats,
UINT pcActual 
)
static

Definition at line 342 of file info.c.

344{
346 TRACE("(%p,%u,%p,%p)\n", iface, cFormats, pguidPixelFormats, pcActual);
347 return ComponentInfo_GetGuidList(This->classkey, L"Formats", cFormats, pguidPixelFormats, pcActual);
348}
static HRESULT ComponentInfo_GetGuidList(HKEY classkey, LPCWSTR subkeyname, UINT buffersize, GUID *buffer, UINT *actual_size)
Definition: info.c:123

◆ BitmapDecoderInfo_GetSigningStatus()

static HRESULT WINAPI BitmapDecoderInfo_GetSigningStatus ( IWICBitmapDecoderInfo iface,
DWORD pStatus 
)
static

Definition at line 276 of file info.c.

277{
278 FIXME("(%p,%p): stub\n", iface, pStatus);
279 return E_NOTIMPL;
280}
__in WDFDMATRANSACTION __out NTSTATUS * pStatus

◆ BitmapDecoderInfo_GetSpecVersion()

static HRESULT WINAPI BitmapDecoderInfo_GetSpecVersion ( IWICBitmapDecoderInfo iface,
UINT  cchSpecVersion,
WCHAR wzSpecVersion,
UINT pcchActual 
)
static

Definition at line 312 of file info.c.

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}

◆ BitmapDecoderInfo_GetVendorGUID()

static HRESULT WINAPI BitmapDecoderInfo_GetVendorGUID ( IWICBitmapDecoderInfo iface,
GUID pguidVendor 
)
static

Definition at line 292 of file info.c.

293{
295
296 TRACE("(%p,%p)\n", iface, pguidVendor);
297
298 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", pguidVendor);
299}

◆ BitmapDecoderInfo_GetVersion()

static HRESULT WINAPI BitmapDecoderInfo_GetVersion ( IWICBitmapDecoderInfo iface,
UINT  cchVersion,
WCHAR wzVersion,
UINT pcchActual 
)
static

Definition at line 301 of file info.c.

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}

◆ BitmapDecoderInfo_MatchesMimeType()

static HRESULT WINAPI BitmapDecoderInfo_MatchesMimeType ( IWICBitmapDecoderInfo iface,
LPCWSTR  wzMimeType,
BOOL pfMatches 
)
static

Definition at line 421 of file info.c.

423{
424 FIXME("(%p,%s,%p): stub\n", iface, debugstr_w(wzMimeType), pfMatches);
425 return E_NOTIMPL;
426}
#define debugstr_w
Definition: kernel32.h:32

◆ BitmapDecoderInfo_MatchesPattern()

static HRESULT WINAPI BitmapDecoderInfo_MatchesPattern ( IWICBitmapDecoderInfo iface,
IStream pIStream,
BOOL pfMatches 
)
static

Definition at line 448 of file info.c.

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}
static SIZE_T datasize
Definition: asm.c:30
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
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
#define FAILED(hr)
Definition: intsafe.h:51
unsigned int UINT
Definition: ndis.h:50
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
HRESULT hr
Definition: shlfolder.c:183
LONGLONG QuadPart
Definition: typedefs.h:114
#define S_FALSE
Definition: winerror.h:2357
#define STG_E_INVALIDFUNCTION
Definition: winerror.h:2564
unsigned char BYTE
Definition: xxhash.c:193

◆ BitmapDecoderInfo_QueryInterface()

static HRESULT WINAPI BitmapDecoderInfo_QueryInterface ( IWICBitmapDecoderInfo iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 203 of file info.c.

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}
const GUID IID_IUnknown
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ BitmapDecoderInfo_Release()

static ULONG WINAPI BitmapDecoderInfo_Release ( IWICBitmapDecoderInfo iface)
static

Definition at line 238 of file info.c.

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}
#define InterlockedDecrement
Definition: armddk.h:52

◆ BitmapEncoderInfo_AddRef()

static ULONG WINAPI BitmapEncoderInfo_AddRef ( IWICBitmapEncoderInfo iface)
static

Definition at line 712 of file info.c.

713{
715 ULONG ref = InterlockedIncrement(&This->base.ref);
716
717 TRACE("(%p) refcount=%lu\n", iface, ref);
718
719 return ref;
720}
static BitmapEncoderInfo * impl_from_IWICBitmapEncoderInfo(IWICBitmapEncoderInfo *iface)
Definition: info.c:682

◆ BitmapEncoderInfo_Constructor()

static HRESULT BitmapEncoderInfo_Constructor ( HKEY  classkey,
REFCLSID  clsid,
ComponentInfo **  ret 
)
static

Definition at line 948 of file info.c.

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}
static const IWICBitmapEncoderInfoVtbl BitmapEncoderInfo_Vtbl
Definition: info.c:921

◆ BitmapEncoderInfo_CreateInstance()

static HRESULT WINAPI BitmapEncoderInfo_CreateInstance ( IWICBitmapEncoderInfo iface,
IWICBitmapEncoder **  ppIBitmapEncoder 
)
static

Definition at line 911 of file info.c.

913{
915
916 TRACE("(%p,%p)\n", iface, ppIBitmapEncoder);
917
918 return create_instance(&This->base.clsid, &IID_IWICBitmapEncoder, (void**)ppIBitmapEncoder);
919}

◆ BitmapEncoderInfo_DoesSupportAnimation()

static HRESULT WINAPI BitmapEncoderInfo_DoesSupportAnimation ( IWICBitmapEncoderInfo iface,
BOOL pfSupportAnimation 
)
static

Definition at line 876 of file info.c.

878{
879 FIXME("(%p,%p): stub\n", iface, pfSupportAnimation);
880 return E_NOTIMPL;
881}

◆ BitmapEncoderInfo_DoesSupportChromaKey()

static HRESULT WINAPI BitmapEncoderInfo_DoesSupportChromaKey ( IWICBitmapEncoderInfo iface,
BOOL pfSupportChromaKey 
)
static

Definition at line 883 of file info.c.

885{
886 FIXME("(%p,%p): stub\n", iface, pfSupportChromaKey);
887 return E_NOTIMPL;
888}

◆ BitmapEncoderInfo_DoesSupportLossless()

static HRESULT WINAPI BitmapEncoderInfo_DoesSupportLossless ( IWICBitmapEncoderInfo iface,
BOOL pfSupportLossless 
)
static

Definition at line 890 of file info.c.

892{
893 FIXME("(%p,%p): stub\n", iface, pfSupportLossless);
894 return E_NOTIMPL;
895}

◆ BitmapEncoderInfo_DoesSupportMultiframe()

static HRESULT WINAPI BitmapEncoderInfo_DoesSupportMultiframe ( IWICBitmapEncoderInfo iface,
BOOL pfSupportMultiframe 
)
static

Definition at line 897 of file info.c.

899{
900 FIXME("(%p,%p): stub\n", iface, pfSupportMultiframe);
901 return E_NOTIMPL;
902}

◆ BitmapEncoderInfo_GetAuthor()

static HRESULT WINAPI BitmapEncoderInfo_GetAuthor ( IWICBitmapEncoderInfo iface,
UINT  cchAuthor,
WCHAR wzAuthor,
UINT pcchActual 
)
static

Definition at line 765 of file info.c.

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}

◆ BitmapEncoderInfo_GetCLSID()

static HRESULT WINAPI BitmapEncoderInfo_GetCLSID ( IWICBitmapEncoderInfo iface,
CLSID pclsid 
)
static

Definition at line 747 of file info.c.

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}

◆ BitmapEncoderInfo_GetColorManagementVersion()

static HRESULT WINAPI BitmapEncoderInfo_GetColorManagementVersion ( IWICBitmapEncoderInfo iface,
UINT  cchColorManagementVersion,
WCHAR wzColorManagementVersion,
UINT pcchActual 
)
static

Definition at line 833 of file info.c.

835{
836 FIXME("(%p,%u,%p,%p): stub\n", iface, cchColorManagementVersion, wzColorManagementVersion, pcchActual);
837 return E_NOTIMPL;
838}

◆ BitmapEncoderInfo_GetComponentType()

static HRESULT WINAPI BitmapEncoderInfo_GetComponentType ( IWICBitmapEncoderInfo iface,
WICComponentType pType 
)
static

Definition at line 738 of file info.c.

740{
741 TRACE("(%p,%p)\n", iface, pType);
742 if (!pType) return E_INVALIDARG;
743 *pType = WICEncoder;
744 return S_OK;
745}
@ WICEncoder
Definition: wincodec.idl:127

◆ BitmapEncoderInfo_GetContainerFormat()

static HRESULT WINAPI BitmapEncoderInfo_GetContainerFormat ( IWICBitmapEncoderInfo iface,
GUID pguidContainerFormat 
)
static

Definition at line 817 of file info.c.

819{
821 TRACE("(%p,%p)\n", iface, pguidContainerFormat);
822 return ComponentInfo_GetGUIDValue(This->classkey, L"ContainerFormat", pguidContainerFormat);
823}

◆ BitmapEncoderInfo_GetDeviceManufacturer()

static HRESULT WINAPI BitmapEncoderInfo_GetDeviceManufacturer ( IWICBitmapEncoderInfo iface,
UINT  cchDeviceManufacturer,
WCHAR wzDeviceManufacturer,
UINT pcchActual 
)
static

Definition at line 840 of file info.c.

842{
843 FIXME("(%p,%u,%p,%p): stub\n", iface, cchDeviceManufacturer, wzDeviceManufacturer, pcchActual);
844 return E_NOTIMPL;
845}

◆ BitmapEncoderInfo_GetDeviceModels()

static HRESULT WINAPI BitmapEncoderInfo_GetDeviceModels ( IWICBitmapEncoderInfo iface,
UINT  cchDeviceModels,
WCHAR wzDeviceModels,
UINT pcchActual 
)
static

Definition at line 847 of file info.c.

849{
850 FIXME("(%p,%u,%p,%p): stub\n", iface, cchDeviceModels, wzDeviceModels, pcchActual);
851 return E_NOTIMPL;
852}

◆ BitmapEncoderInfo_GetFileExtensions()

static HRESULT WINAPI BitmapEncoderInfo_GetFileExtensions ( IWICBitmapEncoderInfo iface,
UINT  cchFileExtensions,
WCHAR wzFileExtensions,
UINT pcchActual 
)
static

Definition at line 865 of file info.c.

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}

◆ BitmapEncoderInfo_GetFriendlyName()

static HRESULT WINAPI BitmapEncoderInfo_GetFriendlyName ( IWICBitmapEncoderInfo iface,
UINT  cchFriendlyName,
WCHAR wzFriendlyName,
UINT pcchActual 
)
static

Definition at line 806 of file info.c.

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}

◆ BitmapEncoderInfo_GetMimeTypes()

static HRESULT WINAPI BitmapEncoderInfo_GetMimeTypes ( IWICBitmapEncoderInfo iface,
UINT  cchMimeTypes,
WCHAR wzMimeTypes,
UINT pcchActual 
)
static

Definition at line 854 of file info.c.

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}

◆ BitmapEncoderInfo_GetPixelFormats()

static HRESULT WINAPI BitmapEncoderInfo_GetPixelFormats ( IWICBitmapEncoderInfo iface,
UINT  cFormats,
GUID pguidPixelFormats,
UINT pcActual 
)
static

Definition at line 825 of file info.c.

827{
829 TRACE("(%p,%u,%p,%p)\n", iface, cFormats, pguidPixelFormats, pcActual);
830 return ComponentInfo_GetGuidList(This->classkey, L"Formats", cFormats, pguidPixelFormats, pcActual);
831}

◆ BitmapEncoderInfo_GetSigningStatus()

static HRESULT WINAPI BitmapEncoderInfo_GetSigningStatus ( IWICBitmapEncoderInfo iface,
DWORD pStatus 
)
static

Definition at line 759 of file info.c.

760{
761 FIXME("(%p,%p): stub\n", iface, pStatus);
762 return E_NOTIMPL;
763}

◆ BitmapEncoderInfo_GetSpecVersion()

static HRESULT WINAPI BitmapEncoderInfo_GetSpecVersion ( IWICBitmapEncoderInfo iface,
UINT  cchSpecVersion,
WCHAR wzSpecVersion,
UINT pcchActual 
)
static

Definition at line 795 of file info.c.

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}

◆ BitmapEncoderInfo_GetVendorGUID()

static HRESULT WINAPI BitmapEncoderInfo_GetVendorGUID ( IWICBitmapEncoderInfo iface,
GUID pguidVendor 
)
static

Definition at line 775 of file info.c.

776{
778
779 TRACE("(%p,%p)\n", iface, pguidVendor);
780
781 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", pguidVendor);
782}

◆ BitmapEncoderInfo_GetVersion()

static HRESULT WINAPI BitmapEncoderInfo_GetVersion ( IWICBitmapEncoderInfo iface,
UINT  cchVersion,
WCHAR wzVersion,
UINT pcchActual 
)
static

Definition at line 784 of file info.c.

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}

◆ BitmapEncoderInfo_MatchesMimeType()

static HRESULT WINAPI BitmapEncoderInfo_MatchesMimeType ( IWICBitmapEncoderInfo iface,
LPCWSTR  wzMimeType,
BOOL pfMatches 
)
static

Definition at line 904 of file info.c.

906{
907 FIXME("(%p,%s,%p): stub\n", iface, debugstr_w(wzMimeType), pfMatches);
908 return E_NOTIMPL;
909}

◆ BitmapEncoderInfo_QueryInterface()

static HRESULT WINAPI BitmapEncoderInfo_QueryInterface ( IWICBitmapEncoderInfo iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 687 of file info.c.

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}

◆ BitmapEncoderInfo_Release()

static ULONG WINAPI BitmapEncoderInfo_Release ( IWICBitmapEncoderInfo iface)
static

Definition at line 722 of file info.c.

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}

◆ ComponentEnum_AddRef()

static ULONG WINAPI ComponentEnum_AddRef ( IEnumUnknown iface)
static

Definition at line 2176 of file info.c.

2177{
2180
2181 TRACE("(%p) refcount=%lu\n", iface, ref);
2182
2183 return ref;
2184}
static ComponentEnum * impl_from_IEnumUnknown(IEnumUnknown *iface)
Definition: info.c:2141

◆ ComponentEnum_Clone()

static HRESULT WINAPI ComponentEnum_Clone ( IEnumUnknown iface,
IEnumUnknown **  ppenum 
)
static

Definition at line 2274 of file info.c.

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}
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
Definition: list.h:37
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
static const IEnumUnknownVtbl ComponentEnumVtbl
Definition: info.c:2151
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
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
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:912
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:919
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define DWORD_PTR
Definition: treelist.c:76
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
Definition: winnt_old.h:1116

◆ ComponentEnum_Next()

static HRESULT WINAPI ComponentEnum_Next ( IEnumUnknown iface,
ULONG  celt,
IUnknown **  rgelt,
ULONG pceltFetched 
)
static

Definition at line 2210 of file info.c.

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}
static ATOM item
Definition: dde.c:856
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
#define LIST_ENTRY(type)
Definition: queue.h:175

◆ ComponentEnum_QueryInterface()

static HRESULT WINAPI ComponentEnum_QueryInterface ( IEnumUnknown iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 2153 of file info.c.

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}
const GUID IID_IEnumUnknown

◆ ComponentEnum_Release()

static ULONG WINAPI ComponentEnum_Release ( IEnumUnknown iface)
static

Definition at line 2186 of file info.c.

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}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
const char cursor[]
Definition: icontest.c:13
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

◆ ComponentEnum_Reset()

static HRESULT WINAPI ComponentEnum_Reset ( IEnumUnknown iface)
static

Definition at line 2262 of file info.c.

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}
Definition: list.h:15

◆ ComponentEnum_Skip()

static HRESULT WINAPI ComponentEnum_Skip ( IEnumUnknown iface,
ULONG  celt 
)
static

Definition at line 2240 of file info.c.

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}

◆ ComponentInfo_Compare()

static int ComponentInfo_Compare ( const void key,
const struct wine_rb_entry entry 
)
static

Definition at line 2013 of file info.c.

2014{
2016 return memcmp(key, &info->clsid, sizeof(info->clsid));
2017}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define WINE_RB_ENTRY_VALUE(element, type, field)
Definition: rbtree.h:31
Definition: copy.c:22

◆ ComponentInfo_GetGuidList()

static HRESULT ComponentInfo_GetGuidList ( HKEY  classkey,
LPCWSTR  subkeyname,
UINT  buffersize,
GUID buffer,
UINT actual_size 
)
static

Definition at line 123 of file info.c.

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}
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
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
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint buffer
Definition: glext.h:5915
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define KEY_READ
Definition: nt_native.h:1023
long LONG
Definition: pedump.c:60
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by BitmapDecoderInfo_GetPixelFormats(), BitmapEncoderInfo_GetPixelFormats(), and read_metadata_info().

◆ ComponentInfo_GetGUIDValue()

static HRESULT ComponentInfo_GetGUIDValue ( HKEY  classkey,
LPCWSTR  value,
GUID result 
)
static

Definition at line 74 of file info.c.

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}
#define ERR(fmt,...)
Definition: precomp.h:57
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1931
#define RRF_NOEXPAND
Definition: driver.c:583
#define RRF_RT_REG_SZ
Definition: driver.c:575
GLuint64EXT * result
Definition: glext.h:11304
Definition: pdh_main.c:96

Referenced by BitmapDecoderInfo_GetContainerFormat(), BitmapDecoderInfo_GetVendorGUID(), BitmapEncoderInfo_GetContainerFormat(), BitmapEncoderInfo_GetVendorGUID(), FormatConverterInfo_GetVendorGUID(), MetadataReaderInfo_GetMetadataFormat(), MetadataReaderInfo_GetVendorGUID(), and PixelFormatInfo_GetVendorGUID().

◆ ComponentInfo_GetStringValue()

static HRESULT ComponentInfo_GetStringValue ( HKEY  classkey,
LPCWSTR  value,
UINT  buffer_size,
WCHAR buffer,
UINT actual_size 
)
static

Definition at line 44 of file info.c.

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}
#define ERROR_MORE_DATA
Definition: dderror.h:13
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
wchar_t const *const size_t const buffer_size
Definition: stat.cpp:95

Referenced by BitmapDecoderInfo_GetAuthor(), BitmapDecoderInfo_GetFileExtensions(), BitmapDecoderInfo_GetFriendlyName(), BitmapDecoderInfo_GetMimeTypes(), BitmapDecoderInfo_GetSpecVersion(), BitmapDecoderInfo_GetVersion(), BitmapEncoderInfo_GetAuthor(), BitmapEncoderInfo_GetFileExtensions(), BitmapEncoderInfo_GetFriendlyName(), BitmapEncoderInfo_GetMimeTypes(), BitmapEncoderInfo_GetSpecVersion(), BitmapEncoderInfo_GetVersion(), FormatConverterInfo_GetAuthor(), FormatConverterInfo_GetFriendlyName(), FormatConverterInfo_GetSpecVersion(), FormatConverterInfo_GetVersion(), MetadataReaderInfo_GetAuthor(), MetadataReaderInfo_GetFriendlyName(), MetadataReaderInfo_GetSpecVersion(), MetadataReaderInfo_GetVersion(), PixelFormatInfo_GetAuthor(), PixelFormatInfo_GetFriendlyName(), PixelFormatInfo_GetSpecVersion(), and PixelFormatInfo_GetVersion().

◆ ComponentInfo_GetUINTValue()

static HRESULT ComponentInfo_GetUINTValue ( HKEY  classkey,
LPCWSTR  value,
void result 
)
static

Definition at line 102 of file info.c.

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}
#define RRF_RT_DWORD
Definition: driver.c:581
#define DWORD
Definition: nt_native.h:44

Referenced by MetadataReaderInfo_DoesRequireFullStream(), MetadataReaderInfo_DoesSupportPadding(), PixelFormatInfo_GetBitsPerPixel(), PixelFormatInfo_GetChannelCount(), PixelFormatInfo_GetNumericRepresentation(), and PixelFormatInfo_SupportsTransparency().

◆ ConverterSupportsFormat()

static BOOL ConverterSupportsFormat ( IWICFormatConverterInfo iface,
const WCHAR formatguid 
)
static

Definition at line 1125 of file info.c.

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}
static FormatConverterInfo * impl_from_IWICFormatConverterInfo(IWICFormatConverterInfo *iface)
Definition: info.c:973
GLuint res
Definition: glext.h:9613

Referenced by WICConvertBitmapSource().

◆ CreateComponentEnumerator()

HRESULT CreateComponentEnumerator ( DWORD  componentTypes,
DWORD  options,
IEnumUnknown **  ppIEnumUnknown 
)

Definition at line 2339 of file info.c.

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}
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
HRESULT CreateComponentInfo(REFCLSID clsid, IWICComponentInfo **ppIInfo)
Definition: info.c:2030
GLsizei GLenum * categories
Definition: glext.h:11561
#define SUCCEEDED(hr)
Definition: intsafe.h:50
WICComponentType type
Definition: info.c:1999
const GUID * catid
Definition: info.c:2000
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10

Referenced by find_decoder(), foreach_component(), ImagingFactory_CreateComponentEnumerator(), ImagingFactory_CreateDecoder(), ImagingFactory_CreateEncoder(), and WICConvertBitmapSource().

◆ CreateComponentInfo()

HRESULT CreateComponentInfo ( REFCLSID  clsid,
IWICComponentInfo **  ppIInfo 
)

Definition at line 2030 of file info.c.

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}
static struct wine_rb_tree component_info_cache
Definition: info.c:2019
static CRITICAL_SECTION component_info_cache_cs
Definition: info.c:2021
unsigned int BOOL
Definition: ntddk_ex.h:94
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
static struct wine_rb_entry * wine_rb_get(const struct wine_rb_tree *tree, const void *key)
Definition: rbtree.h:203
static int wine_rb_put(struct wine_rb_tree *tree, const void *key, struct wine_rb_entry *entry)
Definition: rbtree.h:215
Definition: svc_auth_des.c:77
HRESULT(* constructor)(HKEY, REFCLSID, ComponentInfo **)
Definition: info.c:2001
Definition: rbtree.h:36

Referenced by BmpEncoder_GetEncoderInfo(), CommonEncoder_GetEncoderInfo(), create_bitmap_from_source_rect(), CreateComponentEnumerator(), DdsEncoder_GetEncoderInfo(), get_decoder_info(), get_pixelformat_bpp(), GifEncoder_GetEncoderInfo(), ImagingFactory_CreateComponentInfo(), and MetadataHandler_GetMetadataHandlerInfo().

◆ FormatConverterInfo_AddRef()

static ULONG WINAPI FormatConverterInfo_AddRef ( IWICFormatConverterInfo iface)
static

Definition at line 1002 of file info.c.

1003{
1005 ULONG ref = InterlockedIncrement(&This->base.ref);
1006
1007 TRACE("(%p) refcount=%lu\n", iface, ref);
1008
1009 return ref;
1010}

◆ FormatConverterInfo_Constructor()

static HRESULT FormatConverterInfo_Constructor ( HKEY  classkey,
REFCLSID  clsid,
ComponentInfo **  ret 
)
static

Definition at line 1161 of file info.c.

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}
static const IWICFormatConverterInfoVtbl FormatConverterInfo_Vtbl
Definition: info.c:1145

◆ FormatConverterInfo_CreateInstance()

static HRESULT WINAPI FormatConverterInfo_CreateInstance ( IWICFormatConverterInfo iface,
IWICFormatConverter **  ppIFormatConverter 
)
static

Definition at line 1114 of file info.c.

1116{
1118
1119 TRACE("(%p,%p)\n", iface, ppIFormatConverter);
1120
1121 return create_instance(&This->base.clsid, &IID_IWICFormatConverter,
1122 (void**)ppIFormatConverter);
1123}

◆ FormatConverterInfo_GetAuthor()

static HRESULT WINAPI FormatConverterInfo_GetAuthor ( IWICFormatConverterInfo iface,
UINT  cchAuthor,
WCHAR wzAuthor,
UINT pcchActual 
)
static

Definition at line 1055 of file info.c.

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}

◆ FormatConverterInfo_GetCLSID()

static HRESULT WINAPI FormatConverterInfo_GetCLSID ( IWICFormatConverterInfo iface,
CLSID pclsid 
)
static

Definition at line 1037 of file info.c.

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}

◆ FormatConverterInfo_GetComponentType()

static HRESULT WINAPI FormatConverterInfo_GetComponentType ( IWICFormatConverterInfo iface,
WICComponentType pType 
)
static

Definition at line 1028 of file info.c.

1030{
1031 TRACE("(%p,%p)\n", iface, pType);
1032 if (!pType) return E_INVALIDARG;
1033 *pType = WICPixelFormatConverter;
1034 return S_OK;
1035}
@ WICPixelFormatConverter
Definition: wincodec.idl:128

◆ FormatConverterInfo_GetFriendlyName()

static HRESULT WINAPI FormatConverterInfo_GetFriendlyName ( IWICFormatConverterInfo iface,
UINT  cchFriendlyName,
WCHAR wzFriendlyName,
UINT pcchActual 
)
static

Definition at line 1096 of file info.c.

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}

◆ FormatConverterInfo_GetPixelFormats()

static HRESULT WINAPI FormatConverterInfo_GetPixelFormats ( IWICFormatConverterInfo iface,
UINT  cFormats,
GUID pguidPixelFormats,
UINT pcActual 
)
static

Definition at line 1107 of file info.c.

1109{
1110 FIXME("(%p,%u,%p,%p): stub\n", iface, cFormats, pguidPixelFormats, pcActual);
1111 return E_NOTIMPL;
1112}

◆ FormatConverterInfo_GetSigningStatus()

static HRESULT WINAPI FormatConverterInfo_GetSigningStatus ( IWICFormatConverterInfo iface,
DWORD pStatus 
)
static

Definition at line 1049 of file info.c.

1050{
1051 FIXME("(%p,%p): stub\n", iface, pStatus);
1052 return E_NOTIMPL;
1053}

◆ FormatConverterInfo_GetSpecVersion()

static HRESULT WINAPI FormatConverterInfo_GetSpecVersion ( IWICFormatConverterInfo iface,
UINT  cchSpecVersion,
WCHAR wzSpecVersion,
UINT pcchActual 
)
static

Definition at line 1085 of file info.c.

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}

◆ FormatConverterInfo_GetVendorGUID()

static HRESULT WINAPI FormatConverterInfo_GetVendorGUID ( IWICFormatConverterInfo iface,
GUID pguidVendor 
)
static

Definition at line 1065 of file info.c.

1066{
1068
1069 TRACE("(%p,%p)\n", iface, pguidVendor);
1070
1071 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", pguidVendor);
1072}

◆ FormatConverterInfo_GetVersion()

static HRESULT WINAPI FormatConverterInfo_GetVersion ( IWICFormatConverterInfo iface,
UINT  cchVersion,
WCHAR wzVersion,
UINT pcchActual 
)
static

Definition at line 1074 of file info.c.

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}

◆ FormatConverterInfo_QueryInterface()

static HRESULT WINAPI FormatConverterInfo_QueryInterface ( IWICFormatConverterInfo iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 978 of file info.c.

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}

◆ FormatConverterInfo_Release()

static ULONG WINAPI FormatConverterInfo_Release ( IWICFormatConverterInfo iface)
static

Definition at line 1012 of file info.c.

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}

◆ get_decoder_info()

HRESULT get_decoder_info ( REFCLSID  clsid,
IWICBitmapDecoderInfo **  info 
)

Definition at line 2117 of file info.c.

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}

◆ get_metadata_container()

static struct metadata_container * get_metadata_container ( MetadataReaderInfo info,
const GUID guid 
)
static

Definition at line 1485 of file info.c.

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}
const GUID * guid
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

Referenced by MetadataReaderInfo_GetPatterns(), and MetadataReaderInfo_MatchesPattern().

◆ impl_from_IEnumUnknown()

static ComponentEnum * impl_from_IEnumUnknown ( IEnumUnknown iface)
inlinestatic

Definition at line 2141 of file info.c.

2142{
2143 return CONTAINING_RECORD(iface, ComponentEnum, IEnumUnknown_iface);
2144}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by ComponentEnum_AddRef(), ComponentEnum_Clone(), ComponentEnum_Next(), ComponentEnum_QueryInterface(), ComponentEnum_Release(), ComponentEnum_Reset(), and ComponentEnum_Skip().

◆ impl_from_IWICBitmapDecoderInfo()

◆ impl_from_IWICBitmapEncoderInfo()

◆ impl_from_IWICFormatConverterInfo()

◆ impl_from_IWICMetadataReaderInfo()

◆ impl_from_IWICPixelFormatInfo2()

◆ is_1bpp_format()

static BOOL is_1bpp_format ( const WICPixelFormatGUID format)
static

Definition at line 2431 of file info.c.

2432{
2433 return IsEqualGUID(format, &GUID_WICPixelFormatBlackWhite) ||
2434 IsEqualGUID(format, &GUID_WICPixelFormat1bppIndexed);
2435}
Definition: format.c:58

Referenced by WICConvertBitmapSource().

◆ MetadataReaderInfo_AddRef()

static ULONG WINAPI MetadataReaderInfo_AddRef ( IWICMetadataReaderInfo iface)
static

Definition at line 1527 of file info.c.

1528{
1530 ULONG ref = InterlockedIncrement(&This->base.ref);
1531
1532 TRACE("(%p) refcount=%lu\n", iface, ref);
1533 return ref;
1534}
static MetadataReaderInfo * impl_from_IWICMetadataReaderInfo(IWICMetadataReaderInfo *iface)
Definition: info.c:1496

◆ MetadataReaderInfo_Constructor()

static HRESULT MetadataReaderInfo_Constructor ( HKEY  classkey,
REFCLSID  clsid,
ComponentInfo **  info 
)
static

Definition at line 1972 of file info.c.

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}
static BOOL read_metadata_info(MetadataReaderInfo *info)
Definition: info.c:1935
static const IWICMetadataReaderInfoVtbl MetadataReaderInfo_Vtbl
Definition: info.c:1801
#define WINCODEC_ERR_COMPONENTNOTFOUND
Definition: winerror.h:3296

◆ MetadataReaderInfo_CreateInstance()

static HRESULT WINAPI MetadataReaderInfo_CreateInstance ( IWICMetadataReaderInfo iface,
IWICMetadataReader **  reader 
)
static

Definition at line 1791 of file info.c.

1793{
1795
1796 TRACE("(%p,%p)\n", iface, reader);
1797
1798 return create_instance(&This->base.clsid, &IID_IWICMetadataReader, (void **)reader);
1799}
Definition: reader.h:84

◆ MetadataReaderInfo_DoesRequireFixedSize()

static HRESULT WINAPI MetadataReaderInfo_DoesRequireFixedSize ( IWICMetadataReaderInfo iface,
BOOL param 
)
static

Definition at line 1695 of file info.c.

1697{
1698 FIXME("(%p,%p): stub\n", iface, param);
1699 return E_NOTIMPL;
1700}
GLfloat param
Definition: glext.h:5796

◆ MetadataReaderInfo_DoesRequireFullStream()

static HRESULT WINAPI MetadataReaderInfo_DoesRequireFullStream ( IWICMetadataReaderInfo iface,
BOOL param 
)
static

Definition at line 1679 of file info.c.

1681{
1683 TRACE("(%p,%p)\n", iface, param);
1684 return ComponentInfo_GetUINTValue(This->classkey, L"RequiresFullStream", param);
1685}
static HRESULT ComponentInfo_GetUINTValue(HKEY classkey, LPCWSTR value, void *result)
Definition: info.c:102

◆ MetadataReaderInfo_DoesSupportPadding()

static HRESULT WINAPI MetadataReaderInfo_DoesSupportPadding ( IWICMetadataReaderInfo iface,
BOOL param 
)
static

Definition at line 1687 of file info.c.

1689{
1691 TRACE("(%p,%p)\n", iface, param);
1692 return ComponentInfo_GetUINTValue(This->classkey, L"SupportsPadding", param);
1693}

◆ MetadataReaderInfo_GetAuthor()

static HRESULT WINAPI MetadataReaderInfo_GetAuthor ( IWICMetadataReaderInfo iface,
UINT  length,
WCHAR author,
UINT actual_length 
)
static

Definition at line 1585 of file info.c.

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}
GLuint GLsizei GLsizei * length
Definition: glext.h:6040

◆ MetadataReaderInfo_GetCLSID()

static HRESULT WINAPI MetadataReaderInfo_GetCLSID ( IWICMetadataReaderInfo iface,
CLSID clsid 
)
static

Definition at line 1566 of file info.c.

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}

◆ MetadataReaderInfo_GetComponentType()

static HRESULT WINAPI MetadataReaderInfo_GetComponentType ( IWICMetadataReaderInfo iface,
WICComponentType type 
)
static

Definition at line 1556 of file info.c.

1558{
1559 TRACE("(%p,%p)\n", iface, type);
1560
1561 if (!type) return E_INVALIDARG;
1563 return S_OK;
1564}
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
@ WICMetadataReader
Definition: wincodec.idl:129

◆ MetadataReaderInfo_GetContainerFormats()

static HRESULT WINAPI MetadataReaderInfo_GetContainerFormats ( IWICMetadataReaderInfo iface,
UINT  length,
GUID formats,
UINT actual_length 
)
static

Definition at line 1645 of file info.c.

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}
static const struct pixel_format_desc formats[]
Definition: util.c:59

◆ MetadataReaderInfo_GetDeviceManufacturer()

static HRESULT WINAPI MetadataReaderInfo_GetDeviceManufacturer ( IWICMetadataReaderInfo iface,
UINT  length,
WCHAR manufacturer,
UINT actual_length 
)
static

Definition at line 1665 of file info.c.

1667{
1668 FIXME("(%p,%u,%p,%p): stub\n", iface, length, manufacturer, actual_length);
1669 return E_NOTIMPL;
1670}

◆ MetadataReaderInfo_GetDeviceModels()

static HRESULT WINAPI MetadataReaderInfo_GetDeviceModels ( IWICMetadataReaderInfo iface,
UINT  length,
WCHAR models,
UINT actual_length 
)
static

Definition at line 1672 of file info.c.

1674{
1675 FIXME("(%p,%u,%p,%p): stub\n", iface, length, models, actual_length);
1676 return E_NOTIMPL;
1677}

◆ MetadataReaderInfo_GetFriendlyName()

static HRESULT WINAPI MetadataReaderInfo_GetFriendlyName ( IWICMetadataReaderInfo iface,
UINT  length,
WCHAR name,
UINT actual_length 
)
static

Definition at line 1626 of file info.c.

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}
Definition: name.c:39

◆ MetadataReaderInfo_GetMetadataFormat()

static HRESULT WINAPI MetadataReaderInfo_GetMetadataFormat ( IWICMetadataReaderInfo iface,
GUID format 
)
static

Definition at line 1637 of file info.c.

1639{
1641 TRACE("(%p,%p)\n", iface, format);
1642 return ComponentInfo_GetGUIDValue(This->classkey, L"MetadataFormat", format);
1643}

◆ MetadataReaderInfo_GetPatterns()

static HRESULT WINAPI MetadataReaderInfo_GetPatterns ( IWICMetadataReaderInfo iface,
REFGUID  container_guid,
UINT  length,
WICMetadataPattern patterns,
UINT count,
UINT actual_length 
)
static

Definition at line 1702 of file info.c.

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}
static struct metadata_container * get_metadata_container(MetadataReaderInfo *info, const GUID *guid)
Definition: info.c:1485
GLuint GLuint GLsizei count
Definition: gl.h:1545
UINT patterns_size
Definition: info.c:1473
WICMetadataPattern * patterns
Definition: info.c:1471

◆ MetadataReaderInfo_GetSigningStatus()

static HRESULT WINAPI MetadataReaderInfo_GetSigningStatus ( IWICMetadataReaderInfo iface,
DWORD status 
)
static

Definition at line 1578 of file info.c.

1580{
1581 FIXME("(%p,%p): stub\n", iface, status);
1582 return E_NOTIMPL;
1583}
Definition: ps.c:97

◆ MetadataReaderInfo_GetSpecVersion()

static HRESULT WINAPI MetadataReaderInfo_GetSpecVersion ( IWICMetadataReaderInfo iface,
UINT  length,
WCHAR version,
UINT actual_length 
)
static

Definition at line 1615 of file info.c.

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}
static const WCHAR version[]
Definition: asmname.c:66

◆ MetadataReaderInfo_GetVendorGUID()

static HRESULT WINAPI MetadataReaderInfo_GetVendorGUID ( IWICMetadataReaderInfo iface,
GUID vendor 
)
static

Definition at line 1595 of file info.c.

1597{
1599
1600 TRACE("(%p,%p)\n", iface, vendor);
1601
1602 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", vendor);
1603}
const WCHAR * vendor
Definition: db.cpp:872

◆ MetadataReaderInfo_GetVersion()

static HRESULT WINAPI MetadataReaderInfo_GetVersion ( IWICMetadataReaderInfo iface,
UINT  length,
WCHAR version,
UINT actual_length 
)
static

Definition at line 1605 of file info.c.

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}

◆ MetadataReaderInfo_MatchesPattern()

static HRESULT WINAPI MetadataReaderInfo_MatchesPattern ( IWICMetadataReaderInfo iface,
REFGUID  container_guid,
IStream stream,
BOOL matches 
)
static

Definition at line 1726 of file info.c.

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}
#define matches(FN)
Definition: match.h:70
Definition: parse.h:23

◆ MetadataReaderInfo_QueryInterface()

static HRESULT WINAPI MetadataReaderInfo_QueryInterface ( IWICMetadataReaderInfo iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1501 of file info.c.

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}
REFIID riid
Definition: atlbase.h:39

◆ MetadataReaderInfo_Release()

static ULONG WINAPI MetadataReaderInfo_Release ( IWICMetadataReaderInfo iface)
static

Definition at line 1536 of file info.c.

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}

◆ PixelFormatInfo_AddRef()

static ULONG WINAPI PixelFormatInfo_AddRef ( IWICPixelFormatInfo2 iface)
static

Definition at line 1216 of file info.c.

1217{
1219 ULONG ref = InterlockedIncrement(&This->base.ref);
1220
1221 TRACE("(%p) refcount=%lu\n", iface, ref);
1222
1223 return ref;
1224}
static PixelFormatInfo * impl_from_IWICPixelFormatInfo2(IWICPixelFormatInfo2 *iface)
Definition: info.c:1186

◆ PixelFormatInfo_Constructor()

static HRESULT PixelFormatInfo_Constructor ( HKEY  classkey,
REFCLSID  clsid,
ComponentInfo **  ret 
)
static

Definition at line 1449 of file info.c.

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}
static const IWICPixelFormatInfo2Vtbl PixelFormatInfo_Vtbl
Definition: info.c:1428

◆ PixelFormatInfo_GetAuthor()

static HRESULT WINAPI PixelFormatInfo_GetAuthor ( IWICPixelFormatInfo2 iface,
UINT  cchAuthor,
WCHAR wzAuthor,
UINT pcchActual 
)
static

Definition at line 1276 of file info.c.

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}

◆ PixelFormatInfo_GetBitsPerPixel()

static HRESULT WINAPI PixelFormatInfo_GetBitsPerPixel ( IWICPixelFormatInfo2 iface,
UINT puiBitsPerPixel 
)
static

Definition at line 1348 of file info.c.

1350{
1352
1353 TRACE("(%p,%p)\n", iface, puiBitsPerPixel);
1354
1355 return ComponentInfo_GetUINTValue(This->classkey, L"BitLength", puiBitsPerPixel);
1356}

◆ PixelFormatInfo_GetChannelCount()

static HRESULT WINAPI PixelFormatInfo_GetChannelCount ( IWICPixelFormatInfo2 iface,
UINT puiChannelCount 
)
static

Definition at line 1358 of file info.c.

1360{
1362
1363 TRACE("(%p,%p)\n", iface, puiChannelCount);
1364
1365 return ComponentInfo_GetUINTValue(This->classkey, L"ChannelCount", puiChannelCount);
1366}

Referenced by PixelFormatInfo_GetChannelMask().

◆ PixelFormatInfo_GetChannelMask()

static HRESULT WINAPI PixelFormatInfo_GetChannelMask ( IWICPixelFormatInfo2 iface,
UINT  uiChannelIndex,
UINT  cbMaskBuffer,
BYTE pbMaskBuffer,
UINT pcbActual 
)
static

Definition at line 1368 of file info.c.

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}
#define RRF_RT_REG_BINARY
Definition: driver.c:577
static HRESULT WINAPI PixelFormatInfo_GetChannelCount(IWICPixelFormatInfo2 *iface, UINT *puiChannelCount)
Definition: info.c:1358
#define swprintf
Definition: precomp.h:40

◆ PixelFormatInfo_GetCLSID()

static HRESULT WINAPI PixelFormatInfo_GetCLSID ( IWICPixelFormatInfo2 iface,
CLSID pclsid 
)
static

Definition at line 1251 of file info.c.

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}

◆ PixelFormatInfo_GetColorContext()

static HRESULT WINAPI PixelFormatInfo_GetColorContext ( IWICPixelFormatInfo2 iface,
IWICColorContext **  ppIColorContext 
)
static

Definition at line 1341 of file info.c.

1343{
1344 FIXME("(%p,%p): stub\n", iface, ppIColorContext);
1345 return E_NOTIMPL;
1346}

◆ PixelFormatInfo_GetComponentType()

static HRESULT WINAPI PixelFormatInfo_GetComponentType ( IWICPixelFormatInfo2 iface,
WICComponentType pType 
)
static

Definition at line 1242 of file info.c.

1244{
1245 TRACE("(%p,%p)\n", iface, pType);
1246 if (!pType) return E_INVALIDARG;
1247 *pType = WICPixelFormat;
1248 return S_OK;
1249}
@ WICPixelFormat
Definition: wincodec.idl:131

◆ PixelFormatInfo_GetFormatGUID()

static HRESULT WINAPI PixelFormatInfo_GetFormatGUID ( IWICPixelFormatInfo2 iface,
GUID pFormat 
)
static

Definition at line 1328 of file info.c.

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}

◆ PixelFormatInfo_GetFriendlyName()

static HRESULT WINAPI PixelFormatInfo_GetFriendlyName ( IWICPixelFormatInfo2 iface,
UINT  cchFriendlyName,
WCHAR wzFriendlyName,
UINT pcchActual 
)
static

Definition at line 1317 of file info.c.

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}

◆ PixelFormatInfo_GetNumericRepresentation()

static HRESULT WINAPI PixelFormatInfo_GetNumericRepresentation ( IWICPixelFormatInfo2 iface,
WICPixelFormatNumericRepresentation pNumericRepresentation 
)
static

Definition at line 1418 of file info.c.

1420{
1422
1423 TRACE("(%p,%p)\n", iface, pNumericRepresentation);
1424
1425 return ComponentInfo_GetUINTValue(This->classkey, L"NumericRepresentation", pNumericRepresentation);
1426}

◆ PixelFormatInfo_GetSigningStatus()

static HRESULT WINAPI PixelFormatInfo_GetSigningStatus ( IWICPixelFormatInfo2 iface,
DWORD pStatus 
)
static

Definition at line 1263 of file info.c.

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}
@ WICComponentSigned
Definition: wincodec.idl:136

◆ PixelFormatInfo_GetSpecVersion()

static HRESULT WINAPI PixelFormatInfo_GetSpecVersion ( IWICPixelFormatInfo2 iface,
UINT  cchSpecVersion,
WCHAR wzSpecVersion,
UINT pcchActual 
)
static

Definition at line 1306 of file info.c.

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}

◆ PixelFormatInfo_GetVendorGUID()

static HRESULT WINAPI PixelFormatInfo_GetVendorGUID ( IWICPixelFormatInfo2 iface,
GUID pguidVendor 
)
static

Definition at line 1286 of file info.c.

1287{
1289
1290 TRACE("(%p,%p)\n", iface, pguidVendor);
1291
1292 return ComponentInfo_GetGUIDValue(This->classkey, L"Vendor", pguidVendor);
1293}

◆ PixelFormatInfo_GetVersion()

static HRESULT WINAPI PixelFormatInfo_GetVersion ( IWICPixelFormatInfo2 iface,
UINT  cchVersion,
WCHAR wzVersion,
UINT pcchActual 
)
static

Definition at line 1295 of file info.c.

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}

◆ PixelFormatInfo_QueryInterface()

static HRESULT WINAPI PixelFormatInfo_QueryInterface ( IWICPixelFormatInfo2 iface,
REFIID  iid,
void **  ppv 
)
static

Definition at line 1191 of file info.c.

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}

◆ PixelFormatInfo_Release()

static ULONG WINAPI PixelFormatInfo_Release ( IWICPixelFormatInfo2 iface)
static

Definition at line 1226 of file info.c.

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}

◆ PixelFormatInfo_SupportsTransparency()

static HRESULT WINAPI PixelFormatInfo_SupportsTransparency ( IWICPixelFormatInfo2 iface,
BOOL pfSupportsTransparency 
)
static

Definition at line 1408 of file info.c.

1410{
1412
1413 TRACE("(%p,%p)\n", iface, pfSupportsTransparency);
1414
1415 return ComponentInfo_GetUINTValue(This->classkey, L"SupportsTransparency", pfSupportsTransparency);
1416}

◆ read_bitmap_patterns()

static void read_bitmap_patterns ( BitmapDecoderInfo info)
static

Definition at line 551 of file info.c.

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}
#define realloc
Definition: debug_ros.c:6
#define RRF_RT_QWORD
Definition: driver.c:582
unsigned int Mask
Definition: fpcontrol.c:82
struct _ULARGE_INTEGER ULARGE_INTEGER
#define BOOL
Definition: nt_native.h:43
static COORD Position
Definition: mouse.c:34

Referenced by BitmapDecoderInfo_Constructor().

◆ read_metadata_info()

static BOOL read_metadata_info ( MetadataReaderInfo info)
static

Definition at line 1935 of file info.c.

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}
static void read_metadata_patterns(MetadataReaderInfo *info, GUID *container_guid, struct metadata_container *container)
Definition: info.c:1825

Referenced by MetadataReaderInfo_Constructor().

◆ read_metadata_patterns()

static void read_metadata_patterns ( MetadataReaderInfo info,
GUID container_guid,
struct metadata_container container 
)
static

Definition at line 1825 of file info.c.

1827{
1828 DWORD pattern_count=0;
1829 UINT patterns_size=0;
1830 WCHAR subkeyname[11], guidkeyname[39];
1831 LONG res;
1832 HKEY containers_key, guid_key, patternkey;
1833 UINT i;
1834 WICMetadataPattern *patterns;
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
1846 res = RegQueryInfoKeyW(guid_key, NULL, NULL, NULL, &pattern_count,
1847 NULL, NULL, NULL, NULL, NULL, NULL, NULL);
1848 if (res != ERROR_SUCCESS)
1849 {
1850 RegCloseKey(guid_key);
1851 return;
1852 }
1853
1854 patterns_size = pattern_count * sizeof(WICMetadataPattern);
1855 patterns = malloc(patterns_size);
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;
1872 patterns[i].Length = length;
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
1879 patterns[i].Position.QuadPart = 0;
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
1903 length = patterns[i].Length;
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}
uint64_t DWORD64
Definition: typedefs.h:67

Referenced by read_metadata_info().

◆ ReleaseComponentInfos()

void ReleaseComponentInfos ( void  )

Definition at line 2110 of file info.c.

2111{
2112 ComponentInfo *info, *next_info;
2114 IWICComponentInfo_Release(&info->IWICComponentInfo_iface);
2115}
#define WINE_RB_FOR_EACH_ENTRY_DESTRUCTOR(elem, elem2, tree, type, field)
Definition: rbtree.h:166

Referenced by DllMain().

◆ WICConvertBitmapSource()

HRESULT WINAPI WICConvertBitmapSource ( REFWICPixelFormatGUID  dstFormat,
IWICBitmapSource pISrc,
IWICBitmapSource **  ppIDst 
)

Definition at line 2437 of file info.c.

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}
static BOOL ConverterSupportsFormat(IWICFormatConverterInfo *iface, const WCHAR *formatguid)
Definition: info.c:1125
static BOOL is_1bpp_format(const WICPixelFormatGUID *format)
Definition: info.c:2431
HRESULT CreateComponentEnumerator(DWORD componentTypes, DWORD options, IEnumUnknown **ppIEnumUnknown)
Definition: info.c:2339
@ WICBitmapDitherTypeNone
Definition: wincodec.idl:57
@ WICBitmapPaletteTypeMedianCut
Definition: wincodec.idl:93

Referenced by BitmapScaler_Initialize(), blit_gif_frame(), ColorTransform_Initialize(), decode_frame_wic(), OLEPictureImpl_LoadWICSource(), PaletteImpl_InitializeFromBitmap(), ReadIcoDib(), ReadIcoPng(), test_conversion(), test_invalid_conversion(), WICSetEncoderFormat_Proxy(), and write_source().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wincodecs  )

Variable Documentation

◆ BitmapDecoderInfo_Vtbl

const IWICBitmapDecoderInfoVtbl BitmapDecoderInfo_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportLossless(IWICBitmapDecoderInfo *iface, BOOL *pfSupportLossless)
Definition: info.c:407
static HRESULT WINAPI BitmapDecoderInfo_GetFriendlyName(IWICBitmapDecoderInfo *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
Definition: info.c:323
static HRESULT WINAPI BitmapDecoderInfo_QueryInterface(IWICBitmapDecoderInfo *iface, REFIID iid, void **ppv)
Definition: info.c:203
static HRESULT WINAPI BitmapDecoderInfo_GetFileExtensions(IWICBitmapDecoderInfo *iface, UINT cchFileExtensions, WCHAR *wzFileExtensions, UINT *pcchActual)
Definition: info.c:382
static HRESULT WINAPI BitmapDecoderInfo_GetDeviceModels(IWICBitmapDecoderInfo *iface, UINT cchDeviceModels, WCHAR *wzDeviceModels, UINT *pcchActual)
Definition: info.c:364
static HRESULT WINAPI BitmapDecoderInfo_GetColorManagementVersion(IWICBitmapDecoderInfo *iface, UINT cchColorManagementVersion, WCHAR *wzColorManagementVersion, UINT *pcchActual)
Definition: info.c:350
static HRESULT WINAPI BitmapDecoderInfo_GetAuthor(IWICBitmapDecoderInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
Definition: info.c:282
static HRESULT WINAPI BitmapDecoderInfo_GetCLSID(IWICBitmapDecoderInfo *iface, CLSID *pclsid)
Definition: info.c:264
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 BitmapDecoderInfo_GetComponentType(IWICBitmapDecoderInfo *iface, WICComponentType *pType)
Definition: info.c:255
static ULONG WINAPI BitmapDecoderInfo_Release(IWICBitmapDecoderInfo *iface)
Definition: info.c:238
static HRESULT WINAPI BitmapDecoderInfo_GetMimeTypes(IWICBitmapDecoderInfo *iface, UINT cchMimeTypes, WCHAR *wzMimeTypes, UINT *pcchActual)
Definition: info.c:371
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportAnimation(IWICBitmapDecoderInfo *iface, BOOL *pfSupportAnimation)
Definition: info.c:393
static HRESULT WINAPI BitmapDecoderInfo_MatchesPattern(IWICBitmapDecoderInfo *iface, IStream *pIStream, BOOL *pfMatches)
Definition: info.c:448
static HRESULT WINAPI BitmapDecoderInfo_GetPixelFormats(IWICBitmapDecoderInfo *iface, UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
Definition: info.c:342
static HRESULT WINAPI BitmapDecoderInfo_CreateInstance(IWICBitmapDecoderInfo *iface, IWICBitmapDecoder **ppIBitmapDecoder)
Definition: info.c:512
static HRESULT WINAPI BitmapDecoderInfo_DoesSupportMultiframe(IWICBitmapDecoderInfo *iface, BOOL *pfSupportMultiframe)
Definition: info.c:414
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 BitmapDecoderInfo_GetDeviceManufacturer(IWICBitmapDecoderInfo *iface, UINT cchDeviceManufacturer, WCHAR *wzDeviceManufacturer, UINT *pcchActual)
Definition: info.c:357
static HRESULT WINAPI BitmapDecoderInfo_MatchesMimeType(IWICBitmapDecoderInfo *iface, LPCWSTR wzMimeType, BOOL *pfMatches)
Definition: info.c:421
static HRESULT WINAPI BitmapDecoderInfo_GetContainerFormat(IWICBitmapDecoderInfo *iface, GUID *pguidContainerFormat)
Definition: info.c:334
static HRESULT WINAPI BitmapDecoderInfo_GetVersion(IWICBitmapDecoderInfo *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
Definition: info.c:301
static HRESULT WINAPI BitmapDecoderInfo_GetSigningStatus(IWICBitmapDecoderInfo *iface, DWORD *pStatus)
Definition: info.c:276

Definition at line 522 of file info.c.

Referenced by BitmapDecoderInfo_Constructor().

◆ BitmapEncoderInfo_Vtbl

const IWICBitmapEncoderInfoVtbl BitmapEncoderInfo_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI BitmapEncoderInfo_GetAuthor(IWICBitmapEncoderInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
Definition: info.c:765
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 BitmapEncoderInfo_GetFileExtensions(IWICBitmapEncoderInfo *iface, UINT cchFileExtensions, WCHAR *wzFileExtensions, UINT *pcchActual)
Definition: info.c:865
static ULONG WINAPI BitmapEncoderInfo_Release(IWICBitmapEncoderInfo *iface)
Definition: info.c:722
static HRESULT WINAPI BitmapEncoderInfo_DoesSupportAnimation(IWICBitmapEncoderInfo *iface, BOOL *pfSupportAnimation)
Definition: info.c:876
static HRESULT WINAPI BitmapEncoderInfo_GetFriendlyName(IWICBitmapEncoderInfo *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
Definition: info.c:806
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
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 HRESULT WINAPI BitmapEncoderInfo_GetColorManagementVersion(IWICBitmapEncoderInfo *iface, UINT cchColorManagementVersion, WCHAR *wzColorManagementVersion, UINT *pcchActual)
Definition: info.c:833
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 BitmapEncoderInfo_GetDeviceModels(IWICBitmapEncoderInfo *iface, UINT cchDeviceModels, WCHAR *wzDeviceModels, UINT *pcchActual)
Definition: info.c:847
static HRESULT WINAPI BitmapEncoderInfo_QueryInterface(IWICBitmapEncoderInfo *iface, REFIID iid, void **ppv)
Definition: info.c:687
static HRESULT WINAPI BitmapEncoderInfo_GetMimeTypes(IWICBitmapEncoderInfo *iface, UINT cchMimeTypes, WCHAR *wzMimeTypes, UINT *pcchActual)
Definition: info.c:854
static HRESULT WINAPI BitmapEncoderInfo_GetSigningStatus(IWICBitmapEncoderInfo *iface, DWORD *pStatus)
Definition: info.c:759
static HRESULT WINAPI BitmapEncoderInfo_GetCLSID(IWICBitmapEncoderInfo *iface, CLSID *pclsid)
Definition: info.c:747
static HRESULT WINAPI BitmapEncoderInfo_MatchesMimeType(IWICBitmapEncoderInfo *iface, LPCWSTR wzMimeType, BOOL *pfMatches)
Definition: info.c:904
static HRESULT WINAPI BitmapEncoderInfo_GetComponentType(IWICBitmapEncoderInfo *iface, WICComponentType *pType)
Definition: info.c:738
static HRESULT WINAPI BitmapEncoderInfo_GetVendorGUID(IWICBitmapEncoderInfo *iface, GUID *pguidVendor)
Definition: info.c:775
static HRESULT WINAPI BitmapEncoderInfo_GetVersion(IWICBitmapEncoderInfo *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
Definition: info.c:784
static HRESULT WINAPI BitmapEncoderInfo_GetContainerFormat(IWICBitmapEncoderInfo *iface, GUID *pguidContainerFormat)
Definition: info.c:817

Definition at line 921 of file info.c.

Referenced by BitmapEncoderInfo_Constructor().

◆ categories

Initial value:
= {
{WICDecoder, &CATID_WICBitmapDecoders, BitmapDecoderInfo_Constructor},
{WICEncoder, &CATID_WICBitmapEncoders, BitmapEncoderInfo_Constructor},
{WICPixelFormat, &CATID_WICPixelFormats, PixelFormatInfo_Constructor},
{WICMetadataReader, &CATID_WICMetadataReader, MetadataReaderInfo_Constructor},
{0}
}
static HRESULT PixelFormatInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
Definition: info.c:1449
static HRESULT MetadataReaderInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **info)
Definition: info.c:1972
static HRESULT BitmapEncoderInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
Definition: info.c:948
static HRESULT FormatConverterInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
Definition: info.c:1161
static HRESULT BitmapDecoderInfo_Constructor(HKEY classkey, REFCLSID clsid, ComponentInfo **ret)
Definition: info.c:655

Definition at line 2004 of file info.c.

◆ component_info_cache

struct wine_rb_tree component_info_cache = { ComponentInfo_Compare }
static

Definition at line 2019 of file info.c.

Referenced by CreateComponentInfo(), and ReleaseComponentInfos().

◆ component_info_cache_cs

static CRITICAL_SECTION component_info_cache_cs = { &component_info_cache_cs_dbg, -1, 0, 0, 0, 0 }
static

Definition at line 2021 of file info.c.

Referenced by CreateComponentInfo().

◆ component_info_cache_cs_dbg

CRITICAL_SECTION_DEBUG component_info_cache_cs_dbg
static
Initial value:
=
{
0, 0, { (DWORD_PTR)(__FILE__ ": component_info_cache") }
}
static CRITICAL_SECTION_DEBUG component_info_cache_cs_dbg
Definition: info.c:2022
LIST_ENTRY ProcessLocksList
Definition: winbase.h:908

Definition at line 2022 of file info.c.

◆ ComponentEnumVtbl

static const IEnumUnknownVtbl ComponentEnumVtbl
static
Initial value:
= {
}
static HRESULT WINAPI ComponentEnum_Skip(IEnumUnknown *iface, ULONG celt)
Definition: info.c:2240
static HRESULT WINAPI ComponentEnum_QueryInterface(IEnumUnknown *iface, REFIID iid, void **ppv)
Definition: info.c:2153
static ULONG WINAPI ComponentEnum_AddRef(IEnumUnknown *iface)
Definition: info.c:2176
static HRESULT WINAPI ComponentEnum_Reset(IEnumUnknown *iface)
Definition: info.c:2262
static ULONG WINAPI ComponentEnum_Release(IEnumUnknown *iface)
Definition: info.c:2186
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

Definition at line 2151 of file info.c.

Referenced by ComponentEnum_Clone(), and CreateComponentEnumerator().

◆ FormatConverterInfo_Vtbl

const IWICFormatConverterInfoVtbl FormatConverterInfo_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI FormatConverterInfo_GetComponentType(IWICFormatConverterInfo *iface, WICComponentType *pType)
Definition: info.c:1028
static HRESULT WINAPI FormatConverterInfo_GetVendorGUID(IWICFormatConverterInfo *iface, GUID *pguidVendor)
Definition: info.c:1065
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 ULONG WINAPI FormatConverterInfo_AddRef(IWICFormatConverterInfo *iface)
Definition: info.c:1002
static HRESULT WINAPI FormatConverterInfo_GetSigningStatus(IWICFormatConverterInfo *iface, DWORD *pStatus)
Definition: info.c:1049
static HRESULT WINAPI FormatConverterInfo_GetCLSID(IWICFormatConverterInfo *iface, CLSID *pclsid)
Definition: info.c:1037
static HRESULT WINAPI FormatConverterInfo_GetAuthor(IWICFormatConverterInfo *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
Definition: info.c:1055
static HRESULT WINAPI FormatConverterInfo_QueryInterface(IWICFormatConverterInfo *iface, REFIID iid, void **ppv)
Definition: info.c:978
static HRESULT WINAPI FormatConverterInfo_GetVersion(IWICFormatConverterInfo *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
Definition: info.c:1074
static HRESULT WINAPI FormatConverterInfo_GetSpecVersion(IWICFormatConverterInfo *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
Definition: info.c:1085
static HRESULT WINAPI FormatConverterInfo_CreateInstance(IWICFormatConverterInfo *iface, IWICFormatConverter **ppIFormatConverter)
Definition: info.c:1114
static HRESULT WINAPI FormatConverterInfo_GetPixelFormats(IWICFormatConverterInfo *iface, UINT cFormats, GUID *pguidPixelFormats, UINT *pcActual)
Definition: info.c:1107

Definition at line 1145 of file info.c.

Referenced by FormatConverterInfo_Constructor().

◆ MetadataReaderInfo_Vtbl

const IWICMetadataReaderInfoVtbl MetadataReaderInfo_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI MetadataReaderInfo_GetDeviceManufacturer(IWICMetadataReaderInfo *iface, UINT length, WCHAR *manufacturer, UINT *actual_length)
Definition: info.c:1665
static HRESULT WINAPI MetadataReaderInfo_GetMetadataFormat(IWICMetadataReaderInfo *iface, GUID *format)
Definition: info.c:1637
static HRESULT WINAPI MetadataReaderInfo_GetFriendlyName(IWICMetadataReaderInfo *iface, UINT length, WCHAR *name, UINT *actual_length)
Definition: info.c:1626
static HRESULT WINAPI MetadataReaderInfo_GetVersion(IWICMetadataReaderInfo *iface, UINT length, WCHAR *version, UINT *actual_length)
Definition: info.c:1605
static HRESULT WINAPI MetadataReaderInfo_GetContainerFormats(IWICMetadataReaderInfo *iface, UINT length, GUID *formats, UINT *actual_length)
Definition: info.c:1645
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 MetadataReaderInfo_GetDeviceModels(IWICMetadataReaderInfo *iface, UINT length, WCHAR *models, UINT *actual_length)
Definition: info.c:1672
static HRESULT WINAPI MetadataReaderInfo_MatchesPattern(IWICMetadataReaderInfo *iface, REFGUID container_guid, IStream *stream, BOOL *matches)
Definition: info.c:1726
static HRESULT WINAPI MetadataReaderInfo_GetSpecVersion(IWICMetadataReaderInfo *iface, UINT length, WCHAR *version, UINT *actual_length)
Definition: info.c:1615
static HRESULT WINAPI MetadataReaderInfo_GetAuthor(IWICMetadataReaderInfo *iface, UINT length, WCHAR *author, UINT *actual_length)
Definition: info.c:1585
static HRESULT WINAPI MetadataReaderInfo_DoesSupportPadding(IWICMetadataReaderInfo *iface, BOOL *param)
Definition: info.c:1687
static HRESULT WINAPI MetadataReaderInfo_QueryInterface(IWICMetadataReaderInfo *iface, REFIID riid, void **ppv)
Definition: info.c:1501
static HRESULT WINAPI MetadataReaderInfo_CreateInstance(IWICMetadataReaderInfo *iface, IWICMetadataReader **reader)
Definition: info.c:1791
static HRESULT WINAPI MetadataReaderInfo_GetCLSID(IWICMetadataReaderInfo *iface, CLSID *clsid)
Definition: info.c:1566
static HRESULT WINAPI MetadataReaderInfo_GetSigningStatus(IWICMetadataReaderInfo *iface, DWORD *status)
Definition: info.c:1578
static ULONG WINAPI MetadataReaderInfo_AddRef(IWICMetadataReaderInfo *iface)
Definition: info.c:1527
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 MetadataReaderInfo_GetComponentType(IWICMetadataReaderInfo *iface, WICComponentType *type)
Definition: info.c:1556
static HRESULT WINAPI MetadataReaderInfo_GetVendorGUID(IWICMetadataReaderInfo *iface, GUID *vendor)
Definition: info.c:1595

Definition at line 1801 of file info.c.

Referenced by MetadataReaderInfo_Constructor().

◆ PixelFormatInfo_Vtbl

const IWICPixelFormatInfo2Vtbl PixelFormatInfo_Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI PixelFormatInfo_QueryInterface(IWICPixelFormatInfo2 *iface, REFIID iid, void **ppv)
Definition: info.c:1191
static HRESULT WINAPI PixelFormatInfo_GetFriendlyName(IWICPixelFormatInfo2 *iface, UINT cchFriendlyName, WCHAR *wzFriendlyName, UINT *pcchActual)
Definition: info.c:1317
static HRESULT WINAPI PixelFormatInfo_SupportsTransparency(IWICPixelFormatInfo2 *iface, BOOL *pfSupportsTransparency)
Definition: info.c:1408
static HRESULT WINAPI PixelFormatInfo_GetComponentType(IWICPixelFormatInfo2 *iface, WICComponentType *pType)
Definition: info.c:1242
static HRESULT WINAPI PixelFormatInfo_GetColorContext(IWICPixelFormatInfo2 *iface, IWICColorContext **ppIColorContext)
Definition: info.c:1341
static HRESULT WINAPI PixelFormatInfo_GetBitsPerPixel(IWICPixelFormatInfo2 *iface, UINT *puiBitsPerPixel)
Definition: info.c:1348
static HRESULT WINAPI PixelFormatInfo_GetNumericRepresentation(IWICPixelFormatInfo2 *iface, WICPixelFormatNumericRepresentation *pNumericRepresentation)
Definition: info.c:1418
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 ULONG WINAPI PixelFormatInfo_Release(IWICPixelFormatInfo2 *iface)
Definition: info.c:1226
static HRESULT WINAPI PixelFormatInfo_GetVersion(IWICPixelFormatInfo2 *iface, UINT cchVersion, WCHAR *wzVersion, UINT *pcchActual)
Definition: info.c:1295
static ULONG WINAPI PixelFormatInfo_AddRef(IWICPixelFormatInfo2 *iface)
Definition: info.c:1216
static HRESULT WINAPI PixelFormatInfo_GetFormatGUID(IWICPixelFormatInfo2 *iface, GUID *pFormat)
Definition: info.c:1328
static HRESULT WINAPI PixelFormatInfo_GetSpecVersion(IWICPixelFormatInfo2 *iface, UINT cchSpecVersion, WCHAR *wzSpecVersion, UINT *pcchActual)
Definition: info.c:1306
static HRESULT WINAPI PixelFormatInfo_GetSigningStatus(IWICPixelFormatInfo2 *iface, DWORD *pStatus)
Definition: info.c:1263
static HRESULT WINAPI PixelFormatInfo_GetAuthor(IWICPixelFormatInfo2 *iface, UINT cchAuthor, WCHAR *wzAuthor, UINT *pcchActual)
Definition: info.c:1276

Definition at line 1428 of file info.c.

Referenced by PixelFormatInfo_Constructor().