ReactOS 0.4.16-dev-257-g6aa11ac
regsvr.c File Reference
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winreg.h"
#include "winerror.h"
#include "objbase.h"
#include "ocidl.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wincodecs_private.h"
Include dependency graph for regsvr.c:

Go to the source code of this file.

Classes

struct  decoder_pattern
 
struct  regsvr_decoder
 
struct  regsvr_encoder
 
struct  regsvr_converter
 
struct  metadata_pattern
 
struct  reader_containers
 
struct  regsvr_metadatareader
 
struct  regsvr_pixelformat
 
struct  regsvr_category
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wincodecs)
 
static HRESULT register_decoders (struct regsvr_decoder const *list)
 
static HRESULT unregister_decoders (struct regsvr_decoder const *list)
 
static HRESULT register_encoders (struct regsvr_encoder const *list)
 
static HRESULT unregister_encoders (struct regsvr_encoder const *list)
 
static HRESULT register_converters (struct regsvr_converter const *list)
 
static HRESULT unregister_converters (struct regsvr_converter const *list)
 
static HRESULT register_metadatareaders (struct regsvr_metadatareader const *list)
 
static HRESULT unregister_metadatareaders (struct regsvr_metadatareader const *list)
 
static HRESULT register_pixelformats (struct regsvr_pixelformat const *list)
 
static HRESULT unregister_pixelformats (struct regsvr_pixelformat const *list)
 
static HRESULT register_categories (const struct regsvr_category *list)
 
static HRESULT unregister_categories (const struct regsvr_category *list)
 
HRESULT WINAPI WIC_DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 

Variables

static const WCHAR clsid_keyname []
 
static const char author_valuename [] = "Author"
 
static const char friendlyname_valuename [] = "FriendlyName"
 
static const WCHAR vendor_valuename [] = {'V','e','n','d','o','r',0}
 
static const WCHAR containerformat_valuename [] = {'C','o','n','t','a','i','n','e','r','F','o','r','m','a','t',0}
 
static const char version_valuename [] = "Version"
 
static const char mimetypes_valuename [] = "MimeTypes"
 
static const char extensions_valuename [] = "FileExtensions"
 
static const WCHAR formats_keyname [] = {'F','o','r','m','a','t','s',0}
 
static const WCHAR patterns_keyname [] = {'P','a','t','t','e','r','n','s',0}
 
static const WCHAR instance_keyname [] = {'I','n','s','t','a','n','c','e',0}
 
static const WCHAR clsid_valuename [] = {'C','L','S','I','D',0}
 
static const char length_valuename [] = "Length"
 
static const char position_valuename [] = "Position"
 
static const char pattern_valuename [] = "Pattern"
 
static const char mask_valuename [] = "Mask"
 
static const char endofstream_valuename [] = "EndOfStream"
 
static const WCHAR pixelformats_keyname [] = {'P','i','x','e','l','F','o','r','m','a','t','s',0}
 
static const WCHAR metadataformat_valuename [] = {'M','e','t','a','d','a','t','a','F','o','r','m','a','t',0}
 
static const char specversion_valuename [] = "SpecVersion"
 
static const char requiresfullstream_valuename [] = "RequiresFullStream"
 
static const char supportspadding_valuename [] = "SupportsPadding"
 
static const char requiresfixedsize_valuename [] = "FixedSize"
 
static const WCHAR containers_keyname [] = {'C','o','n','t','a','i','n','e','r','s',0}
 
static const char dataoffset_valuename [] = "DataOffset"
 
static const char bitsperpixel_valuename [] = "BitLength"
 
static const char channelcount_valuename [] = "ChannelCount"
 
static const char numericrepresentation_valuename [] = "NumericRepresentation"
 
static const char supportstransparency_valuename [] = "SupportsTransparency"
 
static const WCHAR channelmasks_keyname [] = {'C','h','a','n','n','e','l','M','a','s','k','s',0}
 
static const BYTE mask_all [] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}
 
static const BYTE bmp_magic [] = {0x42,0x4d}
 
static GUID const *const bmp_formats []
 
static struct decoder_pattern const bmp_patterns []
 
static const BYTE gif87a_magic [6] = "GIF87a"
 
static const BYTE gif89a_magic [6] = "GIF89a"
 
static GUID const *const gif_formats []
 
static struct decoder_pattern const gif_patterns []
 
static const BYTE ico_magic [] = {00,00,01,00}
 
static GUID const *const ico_formats []
 
static struct decoder_pattern const ico_patterns []
 
static const BYTE jpeg_magic [] = {0xff, 0xd8}
 
static GUID const *const jpeg_formats []
 
static struct decoder_pattern const jpeg_patterns []
 
static const BYTE png_magic [] = {137,80,78,71,13,10,26,10}
 
static GUID const *const png_formats []
 
static struct decoder_pattern const png_patterns []
 
static const BYTE tiff_magic_le [] = {0x49,0x49,42,0}
 
static const BYTE tiff_magic_be [] = {0x4d,0x4d,0,42}
 
static GUID const *const tiff_decode_formats []
 
static struct decoder_pattern const tiff_patterns []
 
static const BYTE tga_footer_magic [18] = "TRUEVISION-XFILE."
 
static const BYTE tga_indexed_magic [18] = {0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0}
 
static const BYTE tga_indexed_mask [18] = {0,0xff,0xf7,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xcf}
 
static const BYTE tga_truecolor_magic [18] = {0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
 
static const BYTE tga_truecolor_mask [18] = {0,0xff,0xf7,0,0,0,0,0,0,0,0,0,0,0,0,0,0x87,0xc0}
 
static const BYTE tga_grayscale_magic [18] = {0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0}
 
static const BYTE tga_grayscale_mask [18] = {0,0xff,0xf7,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xcf}
 
static GUID const *const tga_formats []
 
static struct decoder_pattern const tga_patterns []
 
static struct regsvr_decoder const decoder_list []
 
static GUID const *const bmp_encode_formats []
 
static GUID const *const png_encode_formats []
 
static GUID const *const tiff_encode_formats []
 
static GUID const *const icns_encode_formats []
 
static struct regsvr_encoder const encoder_list []
 
static GUID const *const converter_formats []
 
static struct regsvr_converter const converter_list []
 
static const BYTE no_magic [1] = { 0 }
 
static const BYTE no_mask [1] = { 0 }
 
static const struct metadata_pattern ifd_metadata_pattern []
 
static const struct reader_containers ifd_containers []
 
static const BYTE tEXt [] = "tEXt"
 
static const struct metadata_pattern pngtext_metadata_pattern []
 
static const struct reader_containers pngtext_containers []
 
static const BYTE gAMA [] = "gAMA"
 
static const struct metadata_pattern pnggama_metadata_pattern []
 
static const struct reader_containers pnggama_containers []
 
static const BYTE cHRM [] = "cHRM"
 
static const struct metadata_pattern pngchrm_metadata_pattern []
 
static const struct reader_containers pngchrm_containers []
 
static const struct metadata_pattern lsd_metadata_patterns []
 
static const struct reader_containers lsd_containers []
 
static const BYTE imd_magic [] = { 0x2c }
 
static const struct metadata_pattern imd_metadata_pattern []
 
static const struct reader_containers imd_containers []
 
static const BYTE gce_magic [] = { 0x21, 0xf9, 0x04 }
 
static const struct metadata_pattern gce_metadata_pattern []
 
static const struct reader_containers gce_containers []
 
static const BYTE ape_magic [] = { 0x21, 0xff, 0x0b }
 
static const struct metadata_pattern ape_metadata_pattern []
 
static const struct reader_containers ape_containers []
 
static const BYTE gif_comment_magic [] = { 0x21, 0xfe }
 
static const struct metadata_pattern gif_comment_metadata_pattern []
 
static const struct reader_containers gif_comment_containers []
 
static struct regsvr_metadatareader const metadatareader_list []
 
static BYTE const channel_mask_1bit [] = { 0x01 }
 
static BYTE const channel_mask_2bit [] = { 0x03 }
 
static BYTE const channel_mask_4bit [] = { 0x0f }
 
static BYTE const channel_mask_8bit [] = { 0xff, 0x00, 0x00, 0x00 }
 
static BYTE const channel_mask_8bit2 [] = { 0x00, 0xff, 0x00, 0x00 }
 
static BYTE const channel_mask_8bit3 [] = { 0x00, 0x00, 0xff, 0x00 }
 
static BYTE const channel_mask_8bit4 [] = { 0x00, 0x00, 0x00, 0xff }
 
static BYTE const channel_mask_16bit [] = { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
 
static BYTE const channel_mask_16bit2 [] = { 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
 
static BYTE const channel_mask_16bit3 [] = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 }
 
static BYTE const channel_mask_16bit4 [] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff }
 
static BYTE const channel_mask_32bit [] = { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
 
static BYTE const channel_mask_128bit1 [] = { 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }
 
static BYTE const channel_mask_128bit2 [] = { 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }
 
static BYTE const channel_mask_128bit3 [] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00 }
 
static BYTE const channel_mask_128bit4 [] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff }
 
static BYTE const channel_mask_5bit [] = { 0x1f, 0x00 }
 
static BYTE const channel_mask_5bit2 [] = { 0xe0, 0x03 }
 
static BYTE const channel_mask_5bit3 [] = { 0x00, 0x7c }
 
static BYTE const channel_mask_5bit4 [] = { 0x00, 0x80 }
 
static BYTE const channel_mask_BGR565_2 [] = { 0xe0, 0x07 }
 
static BYTE const channel_mask_BGR565_3 [] = { 0x00, 0xf8 }
 
static BYTE const *const channel_masks_1bit [] = { channel_mask_1bit }
 
static BYTE const *const channel_masks_2bit [] = { channel_mask_2bit }
 
static BYTE const *const channel_masks_4bit [] = { channel_mask_4bit }
 
static BYTE const *const channel_masks_8bit []
 
static BYTE const *const channel_masks_16bit []
 
static BYTE const *const channel_masks_32bit [] = { channel_mask_32bit }
 
static BYTE const *const channel_masks_128bit [] = { channel_mask_128bit1, channel_mask_128bit2, channel_mask_128bit3, channel_mask_128bit4 }
 
static BYTE const *const channel_masks_BGRA5551 []
 
static BYTE const *const channel_masks_BGR565 []
 
static struct regsvr_pixelformat const pixelformat_list []
 
static const struct regsvr_category category_list []
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 19 of file regsvr.c.

Function Documentation

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 2213 of file regsvr.c.

2214{
2215 HRESULT hr;
2216
2217 TRACE("\n");
2218
2219 hr = WIC_DllUnregisterServer();
2220 if (SUCCEEDED(hr))
2222 if (SUCCEEDED(hr))
2224 if (SUCCEEDED(hr))
2226 if (SUCCEEDED(hr))
2228 if (SUCCEEDED(hr))
2230 if (SUCCEEDED(hr))
2232 return hr;
2233}
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
static struct regsvr_converter const converter_list[]
Definition: regsvr.c:1493
static HRESULT unregister_decoders(struct regsvr_decoder const *list)
Definition: regsvr.c:351
static HRESULT unregister_metadatareaders(struct regsvr_metadatareader const *list)
Definition: regsvr.c:896
static HRESULT unregister_converters(struct regsvr_converter const *list)
Definition: regsvr.c:686
static HRESULT unregister_pixelformats(struct regsvr_pixelformat const *list)
Definition: regsvr.c:1071
static struct regsvr_encoder const encoder_list[]
Definition: regsvr.c:1401
static struct regsvr_pixelformat const pixelformat_list[]
Definition: regsvr.c:1789
static struct regsvr_metadatareader const metadatareader_list[]
Definition: regsvr.c:1639
static struct regsvr_decoder const decoder_list[]
Definition: regsvr.c:1269
static const struct regsvr_category category_list[]
Definition: regsvr.c:2095
static HRESULT unregister_encoders(struct regsvr_encoder const *list)
Definition: regsvr.c:529
static HRESULT unregister_categories(const struct regsvr_category *list)
Definition: regsvr.c:2148

◆ register_categories()

static HRESULT register_categories ( const struct regsvr_category list)
static

Definition at line 2104 of file regsvr.c.

2105{
2106 LONG res;
2107 WCHAR buf[39];
2108 HKEY coclass_key, categories_key, instance_key;
2109
2111 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
2112 if (res != ERROR_SUCCESS) return HRESULT_FROM_WIN32(res);
2113
2114 StringFromGUID2(&CLSID_WICImagingCategories, buf, 39);
2115 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
2116 KEY_READ | KEY_WRITE, NULL, &categories_key, NULL);
2117 if (res != ERROR_SUCCESS)
2118 {
2119 RegCloseKey(coclass_key);
2120 return HRESULT_FROM_WIN32(res);
2121 }
2122
2123 res = RegCreateKeyExW(categories_key, instance_keyname, 0, NULL, 0,
2124 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
2125
2126 for (; res == ERROR_SUCCESS && list->clsid; list++)
2127 {
2128 HKEY instance_clsid_key;
2129
2130 StringFromGUID2(list->clsid, buf, 39);
2131 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
2132 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
2133 if (res == ERROR_SUCCESS)
2134 {
2135 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
2136 (const BYTE *)buf, 78);
2137 RegCloseKey(instance_clsid_key);
2138 }
2139 }
2140
2141 RegCloseKey(instance_key);
2142 RegCloseKey(categories_key);
2143 RegCloseKey(coclass_key);
2144
2146}
#define RegCloseKey(hKey)
Definition: registry.h:49
Definition: list.h:37
#define ERROR_SUCCESS
Definition: deptool.c:10
static WCHAR const clsid_keyname[6]
Definition: regsvr.c:78
#define NULL
Definition: types.h:112
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
GLuint res
Definition: glext.h:9613
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define S_OK
Definition: intsafe.h:52
#define REG_SZ
Definition: layer.c:22
#define KEY_READ
Definition: nt_native.h:1023
#define KEY_WRITE
Definition: nt_native.h:1031
long LONG
Definition: pedump.c:60
static const WCHAR instance_keyname[]
Definition: regsvr.c:162
static const WCHAR clsid_valuename[]
Definition: regsvr.c:163
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193

Referenced by WIC_DllRegisterServer().

◆ register_converters()

static HRESULT register_converters ( struct regsvr_converter const list)
static

Definition at line 579 of file regsvr.c.

580{
582 HKEY coclass_key;
583 WCHAR buf[39];
584 HKEY converters_key;
585 HKEY instance_key;
586
588 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
589 if (res == ERROR_SUCCESS) {
590 StringFromGUID2(&CATID_WICFormatConverters, buf, 39);
591 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
592 KEY_READ | KEY_WRITE, NULL, &converters_key, NULL);
593 if (res == ERROR_SUCCESS)
594 {
595 res = RegCreateKeyExW(converters_key, instance_keyname, 0, NULL, 0,
596 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
597 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
598 }
599 if (res != ERROR_SUCCESS)
600 RegCloseKey(coclass_key);
601 }
602 if (res != ERROR_SUCCESS) goto error_return;
603
604 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
605 HKEY clsid_key;
606 HKEY instance_clsid_key;
607
608 StringFromGUID2(list->clsid, buf, 39);
609 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
610 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
611 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
612
613 StringFromGUID2(list->clsid, buf, 39);
614 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
615 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
616 if (res == ERROR_SUCCESS) {
617 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
618 (const BYTE*)buf, 78);
619 RegCloseKey(instance_clsid_key);
620 }
621 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
622
623 if (list->author) {
624 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
625 (const BYTE*)list->author,
626 strlen(list->author) + 1);
627 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
628 }
629
630 if (list->friendlyname) {
632 (const BYTE*)list->friendlyname,
633 strlen(list->friendlyname) + 1);
634 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
635 }
636
637 if (list->vendor) {
638 StringFromGUID2(list->vendor, buf, 39);
639 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
640 (const BYTE*)buf, 78);
641 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
642 }
643
644 if (list->version) {
646 (const BYTE*)list->version,
647 strlen(list->version) + 1);
648 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
649 }
650
651 if (list->formats) {
652 HKEY formats_key;
653 GUID const * const *format;
654
655 res = RegCreateKeyExW(clsid_key, pixelformats_keyname, 0, NULL, 0,
656 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
657 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
658 for (format=list->formats; *format; ++format)
659 {
660 HKEY format_key;
662 res = RegCreateKeyExW(formats_key, buf, 0, NULL, 0,
663 KEY_READ | KEY_WRITE, NULL, &format_key, NULL);
664 if (res != ERROR_SUCCESS) break;
665 RegCloseKey(format_key);
666 }
667 RegCloseKey(formats_key);
668 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
669 }
670
671 error_close_clsid_key:
672 RegCloseKey(clsid_key);
673 }
674
675error_close_coclass_key:
676 RegCloseKey(instance_key);
677 RegCloseKey(converters_key);
678 RegCloseKey(coclass_key);
679error_return:
681}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
Definition: reg.c:4799
#define list
Definition: rosglue.h:35
Definition: format.c:58
static const char author_valuename[]
Definition: regsvr.c:153
static const char friendlyname_valuename[]
Definition: regsvr.c:154
static const WCHAR vendor_valuename[]
Definition: regsvr.c:155
static const char version_valuename[]
Definition: regsvr.c:157
static const WCHAR pixelformats_keyname[]
Definition: regsvr.c:169

Referenced by WIC_DllRegisterServer().

◆ register_decoders()

static HRESULT register_decoders ( struct regsvr_decoder const list)
static

Definition at line 186 of file regsvr.c.

187{
189 HKEY coclass_key;
190 WCHAR buf[39];
191 HKEY decoders_key;
192 HKEY instance_key;
193
195 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
196 if (res == ERROR_SUCCESS) {
197 StringFromGUID2(&CATID_WICBitmapDecoders, buf, 39);
198 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
199 KEY_READ | KEY_WRITE, NULL, &decoders_key, NULL);
200 if (res == ERROR_SUCCESS)
201 {
202 res = RegCreateKeyExW(decoders_key, instance_keyname, 0, NULL, 0,
203 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
204 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
205 }
206 if (res != ERROR_SUCCESS)
207 RegCloseKey(coclass_key);
208 }
209 if (res != ERROR_SUCCESS) goto error_return;
210
211 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
212 HKEY clsid_key;
213 HKEY instance_clsid_key;
214
215 StringFromGUID2(list->clsid, buf, 39);
216 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
217 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
218 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
219
220 StringFromGUID2(list->clsid, buf, 39);
221 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
222 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
223 if (res == ERROR_SUCCESS) {
224 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
225 (const BYTE*)buf, 78);
226 RegCloseKey(instance_clsid_key);
227 }
228 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
229
230 if (list->author) {
231 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
232 (const BYTE*)list->author,
233 strlen(list->author) + 1);
234 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
235 }
236
237 if (list->friendlyname) {
239 (const BYTE*)list->friendlyname,
240 strlen(list->friendlyname) + 1);
241 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
242 }
243
244 if (list->vendor) {
245 StringFromGUID2(list->vendor, buf, 39);
246 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
247 (const BYTE*)buf, 78);
248 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
249 }
250
251 if (list->container_format) {
252 StringFromGUID2(list->container_format, buf, 39);
254 (const BYTE*)buf, 78);
255 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
256 }
257
258 if (list->version) {
260 (const BYTE*)list->version,
261 strlen(list->version) + 1);
262 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
263 }
264
265 if (list->mimetypes) {
267 (const BYTE*)list->mimetypes,
268 strlen(list->mimetypes) + 1);
269 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
270 }
271
272 if (list->extensions) {
274 (const BYTE*)list->extensions,
275 strlen(list->extensions) + 1);
276 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
277 }
278
279 if (list->formats) {
280 HKEY formats_key;
281 GUID const * const *format;
282
283 res = RegCreateKeyExW(clsid_key, formats_keyname, 0, NULL, 0,
284 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
285 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
286 for (format=list->formats; *format; ++format)
287 {
288 HKEY format_key;
290 res = RegCreateKeyExW(formats_key, buf, 0, NULL, 0,
291 KEY_READ | KEY_WRITE, NULL, &format_key, NULL);
292 if (res != ERROR_SUCCESS) break;
293 RegCloseKey(format_key);
294 }
295 RegCloseKey(formats_key);
296 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
297 }
298
299 if (list->patterns) {
300 HKEY patterns_key;
301 int i;
302
303 res = RegCreateKeyExW(clsid_key, patterns_keyname, 0, NULL, 0,
304 KEY_READ | KEY_WRITE, NULL, &patterns_key, NULL);
305 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
306 for (i=0; list->patterns[i].length; i++)
307 {
308 HKEY pattern_key;
309 static const WCHAR int_format[] = {'%','i',0};
310 snprintfW(buf, 39, int_format, i);
311 res = RegCreateKeyExW(patterns_key, buf, 0, NULL, 0,
312 KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
313 if (res != ERROR_SUCCESS) break;
314 res = RegSetValueExA(pattern_key, length_valuename, 0, REG_DWORD,
315 (const BYTE*)&list->patterns[i].length, 4);
316 if (res == ERROR_SUCCESS)
318 (const BYTE*)&list->patterns[i].position, 4);
319 if (res == ERROR_SUCCESS)
321 list->patterns[i].pattern,
322 list->patterns[i].length);
323 if (res == ERROR_SUCCESS)
324 res = RegSetValueExA(pattern_key, mask_valuename, 0, REG_BINARY,
325 list->patterns[i].mask,
326 list->patterns[i].length);
327 if (res == ERROR_SUCCESS)
329 (const BYTE*)&list->patterns[i].endofstream, 4);
330 RegCloseKey(pattern_key);
331 }
332 RegCloseKey(patterns_key);
333 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
334 }
335
336 error_close_clsid_key:
337 RegCloseKey(clsid_key);
338 }
339
340error_close_coclass_key:
341 RegCloseKey(instance_key);
342 RegCloseKey(decoders_key);
343 RegCloseKey(coclass_key);
344error_return:
346}
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 REG_BINARY
Definition: nt_native.h:1496
#define snprintfW
Definition: unicode.h:66
#define REG_DWORD
Definition: sdbapi.c:596
static const char position_valuename[]
Definition: regsvr.c:165
static const char mimetypes_valuename[]
Definition: regsvr.c:158
static const WCHAR containerformat_valuename[]
Definition: regsvr.c:156
static const char endofstream_valuename[]
Definition: regsvr.c:168
static const WCHAR formats_keyname[]
Definition: regsvr.c:160
static const char pattern_valuename[]
Definition: regsvr.c:166
static const char extensions_valuename[]
Definition: regsvr.c:159
static const char length_valuename[]
Definition: regsvr.c:164
static const WCHAR patterns_keyname[]
Definition: regsvr.c:161
static const char mask_valuename[]
Definition: regsvr.c:167

Referenced by WIC_DllRegisterServer().

◆ register_encoders()

static HRESULT register_encoders ( struct regsvr_encoder const list)
static

Definition at line 401 of file regsvr.c.

402{
404 HKEY coclass_key;
405 WCHAR buf[39];
406 HKEY encoders_key;
407 HKEY instance_key;
408
410 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
411 if (res == ERROR_SUCCESS) {
412 StringFromGUID2(&CATID_WICBitmapEncoders, buf, 39);
413 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
414 KEY_READ | KEY_WRITE, NULL, &encoders_key, NULL);
415 if (res == ERROR_SUCCESS)
416 {
417 res = RegCreateKeyExW(encoders_key, instance_keyname, 0, NULL, 0,
418 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
419 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
420 }
421 if (res != ERROR_SUCCESS)
422 RegCloseKey(coclass_key);
423 }
424 if (res != ERROR_SUCCESS) goto error_return;
425
426 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
427 HKEY clsid_key;
428 HKEY instance_clsid_key;
429
430 StringFromGUID2(list->clsid, buf, 39);
431 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
432 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
433 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
434
435 StringFromGUID2(list->clsid, buf, 39);
436 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
437 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
438 if (res == ERROR_SUCCESS) {
439 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
440 (const BYTE*)buf, 78);
441 RegCloseKey(instance_clsid_key);
442 }
443 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
444
445 if (list->author) {
446 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
447 (const BYTE*)list->author,
448 strlen(list->author) + 1);
449 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
450 }
451
452 if (list->friendlyname) {
454 (const BYTE*)list->friendlyname,
455 strlen(list->friendlyname) + 1);
456 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
457 }
458
459 if (list->vendor) {
460 StringFromGUID2(list->vendor, buf, 39);
461 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
462 (const BYTE*)buf, 78);
463 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
464 }
465
466 if (list->container_format) {
467 StringFromGUID2(list->container_format, buf, 39);
469 (const BYTE*)buf, 78);
470 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
471 }
472
473 if (list->version) {
475 (const BYTE*)list->version,
476 strlen(list->version) + 1);
477 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
478 }
479
480 if (list->mimetypes) {
482 (const BYTE*)list->mimetypes,
483 strlen(list->mimetypes) + 1);
484 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
485 }
486
487 if (list->extensions) {
489 (const BYTE*)list->extensions,
490 strlen(list->extensions) + 1);
491 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
492 }
493
494 if (list->formats) {
495 HKEY formats_key;
496 GUID const * const *format;
497
498 res = RegCreateKeyExW(clsid_key, formats_keyname, 0, NULL, 0,
499 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
500 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
501 for (format=list->formats; *format; ++format)
502 {
503 HKEY format_key;
505 res = RegCreateKeyExW(formats_key, buf, 0, NULL, 0,
506 KEY_READ | KEY_WRITE, NULL, &format_key, NULL);
507 if (res != ERROR_SUCCESS) break;
508 RegCloseKey(format_key);
509 }
510 RegCloseKey(formats_key);
511 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
512 }
513
514 error_close_clsid_key:
515 RegCloseKey(clsid_key);
516 }
517
518error_close_coclass_key:
519 RegCloseKey(instance_key);
520 RegCloseKey(encoders_key);
521 RegCloseKey(coclass_key);
522error_return:
524}

Referenced by WIC_DllRegisterServer().

◆ register_metadatareaders()

static HRESULT register_metadatareaders ( struct regsvr_metadatareader const list)
static

Definition at line 736 of file regsvr.c.

737{
739 HKEY coclass_key;
740 WCHAR buf[39];
741 HKEY readers_key;
742 HKEY instance_key;
743
745 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
746 if (res == ERROR_SUCCESS) {
747 StringFromGUID2(&CATID_WICMetadataReader, buf, 39);
748 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
749 KEY_READ | KEY_WRITE, NULL, &readers_key, NULL);
750 if (res == ERROR_SUCCESS)
751 {
752 res = RegCreateKeyExW(readers_key, instance_keyname, 0, NULL, 0,
753 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
754 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
755 }
756 if (res != ERROR_SUCCESS)
757 RegCloseKey(coclass_key);
758 }
759 if (res != ERROR_SUCCESS) goto error_return;
760
761 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
762 HKEY clsid_key;
763 HKEY instance_clsid_key;
764
765 StringFromGUID2(list->clsid, buf, 39);
766 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
767 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
768 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
769
770 StringFromGUID2(list->clsid, buf, 39);
771 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
772 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
773 if (res == ERROR_SUCCESS) {
774 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
775 (const BYTE*)buf, 78);
776 RegCloseKey(instance_clsid_key);
777 }
778 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
779
780 if (list->author) {
781 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
782 (const BYTE*)list->author,
783 strlen(list->author) + 1);
784 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
785 }
786
787 if (list->friendlyname) {
789 (const BYTE*)list->friendlyname,
790 strlen(list->friendlyname) + 1);
791 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
792 }
793
794 if (list->vendor) {
795 StringFromGUID2(list->vendor, buf, 39);
796 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
797 (const BYTE*)buf, 78);
798 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
799 }
800
801 if (list->metadata_format) {
802 StringFromGUID2(list->metadata_format, buf, 39);
804 (const BYTE*)buf, 78);
805 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
806 }
807
808 if (list->version) {
810 (const BYTE*)list->version,
811 strlen(list->version) + 1);
812 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
813 }
814
815 if (list->specversion) {
817 (const BYTE*)list->version,
818 strlen(list->version) + 1);
819 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
820 }
821
823 (const BYTE*)&list->requires_fullstream, 4);
824 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
825
827 (const BYTE*)&list->supports_padding, 4);
828 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
829
830 if (list->requires_fixedsize) {
832 (const BYTE*)&list->requires_fixedsize, 4);
833 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
834 }
835
836 if (list->containers) {
837 HKEY containers_key;
838 const struct reader_containers *container;
839
840 res = RegCreateKeyExW(clsid_key, containers_keyname, 0, NULL, 0,
841 KEY_READ | KEY_WRITE, NULL, &containers_key, NULL);
842 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
843 for (container=list->containers; container->format; ++container)
844 {
845 HKEY format_key;
846 int i;
847 StringFromGUID2(container->format, buf, 39);
848 res = RegCreateKeyExW(containers_key, buf, 0, NULL, 0,
849 KEY_READ | KEY_WRITE, NULL, &format_key, NULL);
850 if (res != ERROR_SUCCESS) break;
851
852 for (i=0; container->patterns[i].length; i++)
853 {
854 HKEY pattern_key;
855 static const WCHAR int_format[] = {'%','i',0};
856 snprintfW(buf, 39, int_format, i);
857 res = RegCreateKeyExW(format_key, buf, 0, NULL, 0,
858 KEY_READ | KEY_WRITE, NULL, &pattern_key, NULL);
859 if (res != ERROR_SUCCESS) break;
861 (const BYTE*)&container->patterns[i].position, 4);
862 if (res == ERROR_SUCCESS)
864 container->patterns[i].pattern,
865 container->patterns[i].length);
866 if (res == ERROR_SUCCESS)
867 res = RegSetValueExA(pattern_key, mask_valuename, 0, REG_BINARY,
868 container->patterns[i].mask,
869 container->patterns[i].length);
870 if (res == ERROR_SUCCESS && container->patterns[i].data_offset)
872 (const BYTE*)&container->patterns[i].data_offset, 4);
873 RegCloseKey(pattern_key);
874 }
875
876 RegCloseKey(format_key);
877 }
878 RegCloseKey(containers_key);
879 }
880
881 error_close_clsid_key:
882 RegCloseKey(clsid_key);
883 }
884
885error_close_coclass_key:
886 RegCloseKey(instance_key);
887 RegCloseKey(readers_key);
888 RegCloseKey(coclass_key);
889error_return:
891}
static const char specversion_valuename[]
Definition: regsvr.c:171
static const char requiresfullstream_valuename[]
Definition: regsvr.c:172
static const char dataoffset_valuename[]
Definition: regsvr.c:176
static const char requiresfixedsize_valuename[]
Definition: regsvr.c:174
static const WCHAR containers_keyname[]
Definition: regsvr.c:175
static const WCHAR metadataformat_valuename[]
Definition: regsvr.c:170
static const char supportspadding_valuename[]
Definition: regsvr.c:173

Referenced by WIC_DllRegisterServer().

◆ register_pixelformats()

static HRESULT register_pixelformats ( struct regsvr_pixelformat const list)
static

Definition at line 946 of file regsvr.c.

947{
949 HKEY coclass_key;
950 WCHAR buf[39];
951 HKEY formats_key;
952 HKEY instance_key;
953
955 KEY_READ | KEY_WRITE, NULL, &coclass_key, NULL);
956 if (res == ERROR_SUCCESS) {
957 StringFromGUID2(&CATID_WICPixelFormats, buf, 39);
958 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
959 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
960 if (res == ERROR_SUCCESS)
961 {
962 res = RegCreateKeyExW(formats_key, instance_keyname, 0, NULL, 0,
963 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
964 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
965 }
966 if (res != ERROR_SUCCESS)
967 RegCloseKey(coclass_key);
968 }
969 if (res != ERROR_SUCCESS) goto error_return;
970
971 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
972 HKEY clsid_key;
973 HKEY instance_clsid_key;
974
975 StringFromGUID2(list->clsid, buf, 39);
976 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
977 KEY_READ | KEY_WRITE, NULL, &clsid_key, NULL);
978 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
979
980 StringFromGUID2(list->clsid, buf, 39);
981 res = RegCreateKeyExW(instance_key, buf, 0, NULL, 0,
982 KEY_READ | KEY_WRITE, NULL, &instance_clsid_key, NULL);
983 if (res == ERROR_SUCCESS) {
984 res = RegSetValueExW(instance_clsid_key, clsid_valuename, 0, REG_SZ,
985 (const BYTE*)buf, 78);
986 RegCloseKey(instance_clsid_key);
987 }
988 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
989
990 if (list->author) {
991 res = RegSetValueExA(clsid_key, author_valuename, 0, REG_SZ,
992 (const BYTE*)list->author,
993 strlen(list->author) + 1);
994 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
995 }
996
997 if (list->friendlyname) {
999 (const BYTE*)list->friendlyname,
1000 strlen(list->friendlyname) + 1);
1001 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1002 }
1003
1004 if (list->vendor) {
1005 StringFromGUID2(list->vendor, buf, 39);
1006 res = RegSetValueExW(clsid_key, vendor_valuename, 0, REG_SZ,
1007 (const BYTE*)buf, 78);
1008 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1009 }
1010
1011 if (list->version) {
1012 res = RegSetValueExA(clsid_key, version_valuename, 0, REG_SZ,
1013 (const BYTE*)list->version,
1014 strlen(list->version) + 1);
1015 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1016 }
1017
1019 (const BYTE*)&list->bitsperpixel, 4);
1020 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1021
1023 (const BYTE*)&list->channelcount, 4);
1024 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1025
1027 (const BYTE*)&list->numericrepresentation, 4);
1028 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1029
1031 (const BYTE*)&list->supportsalpha, 4);
1032 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1033
1034 if (list->channelmasks) {
1035 static const WCHAR valuename_format[] = {'%','d',0};
1036 HKEY masks_key;
1037 UINT i, mask_size;
1039
1040 mask_size = (list->bitsperpixel + 7)/8;
1041
1042 res = RegCreateKeyExW(clsid_key, channelmasks_keyname, 0, NULL, 0,
1043 KEY_READ | KEY_WRITE, NULL, &masks_key, NULL);
1044 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1045 for (i=0; i < list->channelcount; i++)
1046 {
1047 sprintfW(mask_valuename, valuename_format, i);
1049 list->channelmasks[i], mask_size);
1050 if (res != ERROR_SUCCESS) break;
1051 }
1052 RegCloseKey(masks_key);
1053 if (res != ERROR_SUCCESS) goto error_close_clsid_key;
1054 }
1055
1056 error_close_clsid_key:
1057 RegCloseKey(clsid_key);
1058 }
1059
1060error_close_coclass_key:
1061 RegCloseKey(instance_key);
1062 RegCloseKey(formats_key);
1063 RegCloseKey(coclass_key);
1064error_return:
1066}
unsigned int UINT
Definition: ndis.h:50
#define sprintfW
Definition: unicode.h:64
static const char bitsperpixel_valuename[]
Definition: regsvr.c:177
static const WCHAR channelmasks_keyname[]
Definition: regsvr.c:181
static const char channelcount_valuename[]
Definition: regsvr.c:178
static const char numericrepresentation_valuename[]
Definition: regsvr.c:179
static const char supportstransparency_valuename[]
Definition: regsvr.c:180

Referenced by WIC_DllRegisterServer().

◆ unregister_categories()

static HRESULT unregister_categories ( const struct regsvr_category list)
static

Definition at line 2148 of file regsvr.c.

2149{
2150 LONG res;
2151 WCHAR buf[39];
2152 HKEY coclass_key, categories_key, instance_key;
2153
2155 KEY_READ | KEY_WRITE, &coclass_key);
2156 if (res != ERROR_SUCCESS) return HRESULT_FROM_WIN32(res);
2157
2158 StringFromGUID2(&CLSID_WICImagingCategories, buf, 39);
2159 res = RegOpenKeyExW(coclass_key, buf, 0,
2160 KEY_READ | KEY_WRITE, &categories_key);
2161 if (res != ERROR_SUCCESS)
2162 {
2164 RegCloseKey(coclass_key);
2165 return HRESULT_FROM_WIN32(res);
2166 }
2167
2168 res = RegOpenKeyExW(categories_key, instance_keyname, 0,
2169 KEY_READ | KEY_WRITE, &instance_key);
2170
2171 for (; res == ERROR_SUCCESS && list->clsid; list++)
2172 {
2173 StringFromGUID2(list->clsid, buf, 39);
2174 res = RegDeleteTreeW(instance_key, buf);
2175 }
2176
2177 RegCloseKey(instance_key);
2178 RegCloseKey(categories_key);
2179
2180 StringFromGUID2(&CLSID_WICImagingCategories, buf, 39);
2181 res = RegDeleteTreeW(coclass_key, buf);
2182
2183 RegCloseKey(coclass_key);
2184
2186}
LSTATUS WINAPI RegDeleteTreeW(_In_ HKEY, _In_opt_ LPCWSTR)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79

Referenced by DllUnregisterServer().

◆ unregister_converters()

static HRESULT unregister_converters ( struct regsvr_converter const list)
static

Definition at line 686 of file regsvr.c.

687{
689 HKEY coclass_key;
690 WCHAR buf[39];
691 HKEY converters_key;
692 HKEY instance_key;
693
695 KEY_READ | KEY_WRITE, &coclass_key);
696 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
697
698 if (res == ERROR_SUCCESS) {
699 StringFromGUID2(&CATID_WICFormatConverters, buf, 39);
700 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
701 KEY_READ | KEY_WRITE, NULL, &converters_key, NULL);
702 if (res == ERROR_SUCCESS)
703 {
704 res = RegCreateKeyExW(converters_key, instance_keyname, 0, NULL, 0,
705 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
706 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
707 }
708 if (res != ERROR_SUCCESS)
709 RegCloseKey(coclass_key);
710 }
711 if (res != ERROR_SUCCESS) goto error_return;
712
713 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
714 StringFromGUID2(list->clsid, buf, 39);
715
716 res = RegDeleteTreeW(coclass_key, buf);
718 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
719
720 res = RegDeleteTreeW(instance_key, buf);
722 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
723 }
724
725error_close_coclass_key:
726 RegCloseKey(instance_key);
727 RegCloseKey(converters_key);
728 RegCloseKey(coclass_key);
729error_return:
731}

Referenced by DllUnregisterServer().

◆ unregister_decoders()

static HRESULT unregister_decoders ( struct regsvr_decoder const list)
static

Definition at line 351 of file regsvr.c.

352{
354 HKEY coclass_key;
355 WCHAR buf[39];
356 HKEY decoders_key;
357 HKEY instance_key;
358
360 KEY_READ | KEY_WRITE, &coclass_key);
361 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
362
363 if (res == ERROR_SUCCESS) {
364 StringFromGUID2(&CATID_WICBitmapDecoders, buf, 39);
365 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
366 KEY_READ | KEY_WRITE, NULL, &decoders_key, NULL);
367 if (res == ERROR_SUCCESS)
368 {
369 res = RegCreateKeyExW(decoders_key, instance_keyname, 0, NULL, 0,
370 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
371 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
372 }
373 if (res != ERROR_SUCCESS)
374 RegCloseKey(coclass_key);
375 }
376 if (res != ERROR_SUCCESS) goto error_return;
377
378 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
379 StringFromGUID2(list->clsid, buf, 39);
380
381 res = RegDeleteTreeW(coclass_key, buf);
383 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
384
385 res = RegDeleteTreeW(instance_key, buf);
387 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
388 }
389
390error_close_coclass_key:
391 RegCloseKey(instance_key);
392 RegCloseKey(decoders_key);
393 RegCloseKey(coclass_key);
394error_return:
396}

Referenced by DllUnregisterServer().

◆ unregister_encoders()

static HRESULT unregister_encoders ( struct regsvr_encoder const list)
static

Definition at line 529 of file regsvr.c.

530{
532 HKEY coclass_key;
533 WCHAR buf[39];
534 HKEY encoders_key;
535 HKEY instance_key;
536
538 KEY_READ | KEY_WRITE, &coclass_key);
539 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
540
541 if (res == ERROR_SUCCESS) {
542 StringFromGUID2(&CATID_WICBitmapEncoders, buf, 39);
543 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
544 KEY_READ | KEY_WRITE, NULL, &encoders_key, NULL);
545 if (res == ERROR_SUCCESS)
546 {
547 res = RegCreateKeyExW(encoders_key, instance_keyname, 0, NULL, 0,
548 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
549 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
550 }
551 if (res != ERROR_SUCCESS)
552 RegCloseKey(coclass_key);
553 }
554 if (res != ERROR_SUCCESS) goto error_return;
555
556 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
557 StringFromGUID2(list->clsid, buf, 39);
558
559 res = RegDeleteTreeW(coclass_key, buf);
561 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
562
563 res = RegDeleteTreeW(instance_key, buf);
565 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
566 }
567
568error_close_coclass_key:
569 RegCloseKey(instance_key);
570 RegCloseKey(encoders_key);
571 RegCloseKey(coclass_key);
572error_return:
574}

Referenced by DllUnregisterServer().

◆ unregister_metadatareaders()

static HRESULT unregister_metadatareaders ( struct regsvr_metadatareader const list)
static

Definition at line 896 of file regsvr.c.

897{
899 HKEY coclass_key;
900 WCHAR buf[39];
901 HKEY readers_key;
902 HKEY instance_key;
903
905 KEY_READ | KEY_WRITE, &coclass_key);
906 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
907
908 if (res == ERROR_SUCCESS) {
909 StringFromGUID2(&CATID_WICMetadataReader, buf, 39);
910 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
911 KEY_READ | KEY_WRITE, NULL, &readers_key, NULL);
912 if (res == ERROR_SUCCESS)
913 {
914 res = RegCreateKeyExW(readers_key, instance_keyname, 0, NULL, 0,
915 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
916 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
917 }
918 if (res != ERROR_SUCCESS)
919 RegCloseKey(coclass_key);
920 }
921 if (res != ERROR_SUCCESS) goto error_return;
922
923 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
924 StringFromGUID2(list->clsid, buf, 39);
925
926 res = RegDeleteTreeW(coclass_key, buf);
928 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
929
930 res = RegDeleteTreeW(instance_key, buf);
932 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
933 }
934
935error_close_coclass_key:
936 RegCloseKey(instance_key);
937 RegCloseKey(readers_key);
938 RegCloseKey(coclass_key);
939error_return:
941}

Referenced by DllUnregisterServer().

◆ unregister_pixelformats()

static HRESULT unregister_pixelformats ( struct regsvr_pixelformat const list)
static

Definition at line 1071 of file regsvr.c.

1072{
1074 HKEY coclass_key;
1075 WCHAR buf[39];
1076 HKEY formats_key;
1077 HKEY instance_key;
1078
1080 KEY_READ | KEY_WRITE, &coclass_key);
1081 if (res == ERROR_FILE_NOT_FOUND) return S_OK;
1082
1083 if (res == ERROR_SUCCESS) {
1084 StringFromGUID2(&CATID_WICPixelFormats, buf, 39);
1085 res = RegCreateKeyExW(coclass_key, buf, 0, NULL, 0,
1086 KEY_READ | KEY_WRITE, NULL, &formats_key, NULL);
1087 if (res == ERROR_SUCCESS)
1088 {
1089 res = RegCreateKeyExW(formats_key, instance_keyname, 0, NULL, 0,
1090 KEY_READ | KEY_WRITE, NULL, &instance_key, NULL);
1091 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
1092 }
1093 if (res != ERROR_SUCCESS)
1094 RegCloseKey(coclass_key);
1095 }
1096 if (res != ERROR_SUCCESS) goto error_return;
1097
1098 for (; res == ERROR_SUCCESS && list->clsid; ++list) {
1099 StringFromGUID2(list->clsid, buf, 39);
1100
1101 res = RegDeleteTreeW(coclass_key, buf);
1103 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
1104
1105 res = RegDeleteTreeW(instance_key, buf);
1107 if (res != ERROR_SUCCESS) goto error_close_coclass_key;
1108 }
1109
1110error_close_coclass_key:
1111 RegCloseKey(instance_key);
1112 RegCloseKey(formats_key);
1113 RegCloseKey(coclass_key);
1114error_return:
1116}

Referenced by DllUnregisterServer().

◆ WIC_DllRegisterServer()

HRESULT WINAPI WIC_DllRegisterServer ( void  )

Definition at line 2188 of file regsvr.c.

2192{
2193 HRESULT hr;
2194
2195 TRACE("\n");
2196
2198 if (SUCCEEDED(hr))
2200 if (SUCCEEDED(hr))
2202 if (SUCCEEDED(hr))
2204 if (SUCCEEDED(hr))
2206 if (SUCCEEDED(hr))
2208 if (SUCCEEDED(hr))
2210 return hr;
2211}
static HRESULT register_converters(struct regsvr_converter const *list)
Definition: regsvr.c:579
static HRESULT register_encoders(struct regsvr_encoder const *list)
Definition: regsvr.c:401
HRESULT WINAPI WIC_DllRegisterServer(void)
Definition: regsvr.c:2188
static HRESULT register_decoders(struct regsvr_decoder const *list)
Definition: regsvr.c:186
static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list)
Definition: regsvr.c:736
static HRESULT register_categories(const struct regsvr_category *list)
Definition: regsvr.c:2104
static HRESULT register_pixelformats(struct regsvr_pixelformat const *list)
Definition: regsvr.c:946

Referenced by WIC_DllRegisterServer().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wincodecs  )

Variable Documentation

◆ ape_containers

const struct reader_containers ape_containers[]
static
Initial value:
= {
{
&GUID_ContainerFormatGif,
},
{ NULL }
}
static const struct metadata_pattern ape_metadata_pattern[]
Definition: regsvr.c:1611

Definition at line 1616 of file regsvr.c.

◆ ape_magic

const BYTE ape_magic[] = { 0x21, 0xff, 0x0b }
static

Definition at line 1609 of file regsvr.c.

◆ ape_metadata_pattern

const struct metadata_pattern ape_metadata_pattern[]
static
Initial value:
= {
{ 0, 3, ape_magic, mask_all, 0 },
{ 0 }
}
static const BYTE mask_all[]
Definition: regsvr.c:1121
static const BYTE ape_magic[]
Definition: regsvr.c:1609

Definition at line 1611 of file regsvr.c.

◆ author_valuename

const char author_valuename[] = "Author"
static

◆ bitsperpixel_valuename

const char bitsperpixel_valuename[] = "BitLength"
static

Definition at line 177 of file regsvr.c.

Referenced by register_pixelformats().

◆ bmp_encode_formats

GUID const* const bmp_encode_formats[]
static
Initial value:
= {
&GUID_WICPixelFormat16bppBGR555,
&GUID_WICPixelFormat16bppBGR565,
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat32bppBGR,
&GUID_WICPixelFormatBlackWhite,
&GUID_WICPixelFormat1bppIndexed,
&GUID_WICPixelFormat4bppIndexed,
&GUID_WICPixelFormat8bppIndexed,
}

Definition at line 1350 of file regsvr.c.

◆ bmp_formats

GUID const* const bmp_formats[]
static
Initial value:
= {
&GUID_WICPixelFormat1bppIndexed,
&GUID_WICPixelFormat2bppIndexed,
&GUID_WICPixelFormat4bppIndexed,
&GUID_WICPixelFormat8bppIndexed,
&GUID_WICPixelFormat16bppBGR555,
&GUID_WICPixelFormat16bppBGR565,
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat32bppBGR,
&GUID_WICPixelFormat32bppBGRA,
}

Definition at line 1125 of file regsvr.c.

◆ bmp_magic

const BYTE bmp_magic[] = {0x42,0x4d}
static

Definition at line 1123 of file regsvr.c.

◆ bmp_patterns

struct decoder_pattern const bmp_patterns[]
static
Initial value:
= {
{0}
}
static const BYTE bmp_magic[]
Definition: regsvr.c:1123

Definition at line 1138 of file regsvr.c.

◆ category_list

const struct regsvr_category category_list[]
static
Initial value:
= {
{ &CATID_WICBitmapDecoders },
{ &CATID_WICBitmapEncoders },
{ &CATID_WICFormatConverters },
{ &CATID_WICMetadataReader },
{ &CATID_WICPixelFormats },
{ NULL }
}

Definition at line 2095 of file regsvr.c.

Referenced by DllUnregisterServer(), and WIC_DllRegisterServer().

◆ channel_mask_128bit1

BYTE const channel_mask_128bit1[] = { 0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }
static

Definition at line 1759 of file regsvr.c.

◆ channel_mask_128bit2

BYTE const channel_mask_128bit2[] = { 0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }
static

Definition at line 1760 of file regsvr.c.

◆ channel_mask_128bit3

BYTE const channel_mask_128bit3[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0x00 }
static

Definition at line 1761 of file regsvr.c.

◆ channel_mask_128bit4

BYTE const channel_mask_128bit4[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff }
static

Definition at line 1762 of file regsvr.c.

◆ channel_mask_16bit

BYTE const channel_mask_16bit[] = { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
static

Definition at line 1752 of file regsvr.c.

◆ channel_mask_16bit2

BYTE const channel_mask_16bit2[] = { 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
static

Definition at line 1753 of file regsvr.c.

◆ channel_mask_16bit3

BYTE const channel_mask_16bit3[] = { 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 }
static

Definition at line 1754 of file regsvr.c.

◆ channel_mask_16bit4

BYTE const channel_mask_16bit4[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff }
static

Definition at line 1755 of file regsvr.c.

◆ channel_mask_1bit

BYTE const channel_mask_1bit[] = { 0x01 }
static

Definition at line 1743 of file regsvr.c.

◆ channel_mask_2bit

BYTE const channel_mask_2bit[] = { 0x03 }
static

Definition at line 1744 of file regsvr.c.

◆ channel_mask_32bit

BYTE const channel_mask_32bit[] = { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
static

Definition at line 1757 of file regsvr.c.

◆ channel_mask_4bit

BYTE const channel_mask_4bit[] = { 0x0f }
static

Definition at line 1745 of file regsvr.c.

◆ channel_mask_5bit

BYTE const channel_mask_5bit[] = { 0x1f, 0x00 }
static

Definition at line 1764 of file regsvr.c.

◆ channel_mask_5bit2

BYTE const channel_mask_5bit2[] = { 0xe0, 0x03 }
static

Definition at line 1765 of file regsvr.c.

◆ channel_mask_5bit3

BYTE const channel_mask_5bit3[] = { 0x00, 0x7c }
static

Definition at line 1766 of file regsvr.c.

◆ channel_mask_5bit4

BYTE const channel_mask_5bit4[] = { 0x00, 0x80 }
static

Definition at line 1767 of file regsvr.c.

◆ channel_mask_8bit

BYTE const channel_mask_8bit[] = { 0xff, 0x00, 0x00, 0x00 }
static

Definition at line 1747 of file regsvr.c.

◆ channel_mask_8bit2

BYTE const channel_mask_8bit2[] = { 0x00, 0xff, 0x00, 0x00 }
static

Definition at line 1748 of file regsvr.c.

◆ channel_mask_8bit3

BYTE const channel_mask_8bit3[] = { 0x00, 0x00, 0xff, 0x00 }
static

Definition at line 1749 of file regsvr.c.

◆ channel_mask_8bit4

BYTE const channel_mask_8bit4[] = { 0x00, 0x00, 0x00, 0xff }
static

Definition at line 1750 of file regsvr.c.

◆ channel_mask_BGR565_2

BYTE const channel_mask_BGR565_2[] = { 0xe0, 0x07 }
static

Definition at line 1769 of file regsvr.c.

◆ channel_mask_BGR565_3

BYTE const channel_mask_BGR565_3[] = { 0x00, 0xf8 }
static

Definition at line 1770 of file regsvr.c.

◆ channel_masks_128bit

Definition at line 1781 of file regsvr.c.

◆ channel_masks_16bit

BYTE const* const channel_masks_16bit[]
static
Initial value:
static BYTE const channel_mask_16bit[]
Definition: regsvr.c:1752
static BYTE const channel_mask_16bit2[]
Definition: regsvr.c:1753
static BYTE const channel_mask_16bit4[]
Definition: regsvr.c:1755
static BYTE const channel_mask_16bit3[]
Definition: regsvr.c:1754

Definition at line 1777 of file regsvr.c.

◆ channel_masks_1bit

BYTE const* const channel_masks_1bit[] = { channel_mask_1bit }
static

Definition at line 1772 of file regsvr.c.

◆ channel_masks_2bit

BYTE const* const channel_masks_2bit[] = { channel_mask_2bit }
static

Definition at line 1773 of file regsvr.c.

◆ channel_masks_32bit

BYTE const* const channel_masks_32bit[] = { channel_mask_32bit }
static

Definition at line 1780 of file regsvr.c.

◆ channel_masks_4bit

BYTE const* const channel_masks_4bit[] = { channel_mask_4bit }
static

Definition at line 1774 of file regsvr.c.

◆ channel_masks_8bit

BYTE const* const channel_masks_8bit[]
static
Initial value:
static BYTE const channel_mask_8bit4[]
Definition: regsvr.c:1750
static BYTE const channel_mask_8bit[]
Definition: regsvr.c:1747
static BYTE const channel_mask_8bit3[]
Definition: regsvr.c:1749
static BYTE const channel_mask_8bit2[]
Definition: regsvr.c:1748

Definition at line 1775 of file regsvr.c.

◆ channel_masks_BGR565

BYTE const* const channel_masks_BGR565[]
static
Initial value:
static BYTE const channel_mask_5bit[]
Definition: regsvr.c:1764
static BYTE const channel_mask_BGR565_3[]
Definition: regsvr.c:1770
static BYTE const channel_mask_BGR565_2[]
Definition: regsvr.c:1769

Definition at line 1786 of file regsvr.c.

◆ channel_masks_BGRA5551

BYTE const* const channel_masks_BGRA5551[]
static
Initial value:
static BYTE const channel_mask_5bit2[]
Definition: regsvr.c:1765
static BYTE const channel_mask_5bit4[]
Definition: regsvr.c:1767
static BYTE const channel_mask_5bit3[]
Definition: regsvr.c:1766

Definition at line 1783 of file regsvr.c.

◆ channelcount_valuename

const char channelcount_valuename[] = "ChannelCount"
static

Definition at line 178 of file regsvr.c.

Referenced by register_pixelformats().

◆ channelmasks_keyname

const WCHAR channelmasks_keyname[] = {'C','h','a','n','n','e','l','M','a','s','k','s',0}
static

Definition at line 181 of file regsvr.c.

Referenced by register_pixelformats().

◆ cHRM

const BYTE cHRM[] = "cHRM"
static

Definition at line 1550 of file regsvr.c.

◆ clsid_keyname

const WCHAR clsid_keyname[]
static
Initial value:
= {
'C', 'L', 'S', 'I', 'D', 0 }

Definition at line 151 of file regsvr.c.

◆ clsid_valuename

const WCHAR clsid_valuename[] = {'C','L','S','I','D',0}
static

◆ containerformat_valuename

const WCHAR containerformat_valuename[] = {'C','o','n','t','a','i','n','e','r','F','o','r','m','a','t',0}
static

Definition at line 156 of file regsvr.c.

Referenced by register_decoders(), and register_encoders().

◆ containers_keyname

const WCHAR containers_keyname[] = {'C','o','n','t','a','i','n','e','r','s',0}
static

Definition at line 175 of file regsvr.c.

Referenced by register_metadatareaders().

◆ converter_formats

GUID const* const converter_formats[]
static
Initial value:
= {
&GUID_WICPixelFormat1bppIndexed,
&GUID_WICPixelFormat2bppIndexed,
&GUID_WICPixelFormat4bppIndexed,
&GUID_WICPixelFormat8bppIndexed,
&GUID_WICPixelFormatBlackWhite,
&GUID_WICPixelFormat2bppGray,
&GUID_WICPixelFormat4bppGray,
&GUID_WICPixelFormat8bppGray,
&GUID_WICPixelFormat16bppGray,
&GUID_WICPixelFormat16bppBGR555,
&GUID_WICPixelFormat16bppBGR565,
&GUID_WICPixelFormat16bppBGRA5551,
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat24bppRGB,
&GUID_WICPixelFormat32bppBGR,
&GUID_WICPixelFormat32bppRGB,
&GUID_WICPixelFormat32bppBGRA,
&GUID_WICPixelFormat32bppRGBA,
&GUID_WICPixelFormat32bppPBGRA,
&GUID_WICPixelFormat32bppPRGBA,
&GUID_WICPixelFormat32bppGrayFloat,
&GUID_WICPixelFormat48bppRGB,
&GUID_WICPixelFormat64bppRGBA,
&GUID_WICPixelFormat32bppCMYK,
}

Definition at line 1465 of file regsvr.c.

◆ converter_list

struct regsvr_converter const converter_list[]
static
Initial value:
= {
{ &CLSID_WICDefaultFormatConverter,
"The Wine Project",
"Default Pixel Format Converter",
"1.0.0.0",
&GUID_VendorMicrosoft,
},
{ NULL }
}
static GUID const *const converter_formats[]
Definition: regsvr.c:1465

Definition at line 1493 of file regsvr.c.

Referenced by DllUnregisterServer(), and WIC_DllRegisterServer().

◆ dataoffset_valuename

const char dataoffset_valuename[] = "DataOffset"
static

Definition at line 176 of file regsvr.c.

Referenced by register_metadatareaders().

◆ decoder_list

struct regsvr_decoder const decoder_list[]
static

Definition at line 1269 of file regsvr.c.

Referenced by DllUnregisterServer(), and WIC_DllRegisterServer().

◆ encoder_list

struct regsvr_encoder const encoder_list[]
static

Definition at line 1401 of file regsvr.c.

Referenced by DllUnregisterServer(), and WIC_DllRegisterServer().

◆ endofstream_valuename

const char endofstream_valuename[] = "EndOfStream"
static

Definition at line 168 of file regsvr.c.

Referenced by register_decoders().

◆ extensions_valuename

const char extensions_valuename[] = "FileExtensions"
static

Definition at line 159 of file regsvr.c.

Referenced by register_decoders(), and register_encoders().

◆ formats_keyname

const WCHAR formats_keyname[] = {'F','o','r','m','a','t','s',0}
static

Definition at line 160 of file regsvr.c.

Referenced by register_decoders(), and register_encoders().

◆ friendlyname_valuename

const char friendlyname_valuename[] = "FriendlyName"
static

◆ gAMA

const BYTE gAMA[] = "gAMA"
static

Definition at line 1535 of file regsvr.c.

◆ gce_containers

const struct reader_containers gce_containers[]
static
Initial value:
= {
{
&GUID_ContainerFormatGif,
},
{ NULL }
}
static const struct metadata_pattern gce_metadata_pattern[]
Definition: regsvr.c:1596

Definition at line 1601 of file regsvr.c.

◆ gce_magic

const BYTE gce_magic[] = { 0x21, 0xf9, 0x04 }
static

Definition at line 1594 of file regsvr.c.

◆ gce_metadata_pattern

const struct metadata_pattern gce_metadata_pattern[]
static
Initial value:
= {
{ 0, 3, gce_magic, mask_all, 3 },
{ 0 }
}
static const BYTE gce_magic[]
Definition: regsvr.c:1594

Definition at line 1596 of file regsvr.c.

◆ gif87a_magic

const BYTE gif87a_magic[6] = "GIF87a"
static

Definition at line 1143 of file regsvr.c.

◆ gif89a_magic

const BYTE gif89a_magic[6] = "GIF89a"
static

Definition at line 1144 of file regsvr.c.

◆ gif_comment_containers

const struct reader_containers gif_comment_containers[]
static
Initial value:
= {
{
&GUID_ContainerFormatGif,
},
{ NULL }
}
static const struct metadata_pattern gif_comment_metadata_pattern[]
Definition: regsvr.c:1626

Definition at line 1631 of file regsvr.c.

◆ gif_comment_magic

const BYTE gif_comment_magic[] = { 0x21, 0xfe }
static

Definition at line 1624 of file regsvr.c.

◆ gif_comment_metadata_pattern

const struct metadata_pattern gif_comment_metadata_pattern[]
static
Initial value:
= {
{ 0, 2, gif_comment_magic, mask_all, 0 },
{ 0 }
}
static const BYTE gif_comment_magic[]
Definition: regsvr.c:1624

Definition at line 1626 of file regsvr.c.

◆ gif_formats

GUID const* const gif_formats[]
static
Initial value:
= {
&GUID_WICPixelFormat8bppIndexed,
}

Definition at line 1146 of file regsvr.c.

◆ gif_patterns

struct decoder_pattern const gif_patterns[]
static
Initial value:
= {
{0}
}
static const BYTE gif87a_magic[6]
Definition: regsvr.c:1143
static const BYTE gif89a_magic[6]
Definition: regsvr.c:1144

Definition at line 1151 of file regsvr.c.

◆ icns_encode_formats

GUID const* const icns_encode_formats[]
static
Initial value:
= {
&GUID_WICPixelFormat32bppBGRA,
}

Definition at line 1396 of file regsvr.c.

◆ ico_formats

GUID const* const ico_formats[]
static
Initial value:
= {
&GUID_WICPixelFormat32bppBGRA,
}

Definition at line 1159 of file regsvr.c.

◆ ico_magic

const BYTE ico_magic[] = {00,00,01,00}
static

Definition at line 1157 of file regsvr.c.

◆ ico_patterns

struct decoder_pattern const ico_patterns[]
static
Initial value:
= {
{0}
}
static const BYTE ico_magic[]
Definition: regsvr.c:1157

Definition at line 1164 of file regsvr.c.

◆ ifd_containers

const struct reader_containers ifd_containers[]
static
Initial value:
= {
{
&GUID_ContainerFormatTiff,
},
{ NULL }
}
static const struct metadata_pattern ifd_metadata_pattern[]
Definition: regsvr.c:1507

Definition at line 1512 of file regsvr.c.

◆ ifd_metadata_pattern

const struct metadata_pattern ifd_metadata_pattern[]
static
Initial value:
= {
{ 0, 1, no_magic, no_mask, 0 },
{ 0 }
}
static const BYTE no_mask[1]
Definition: regsvr.c:1505
static const BYTE no_magic[1]
Definition: regsvr.c:1504

Definition at line 1507 of file regsvr.c.

◆ imd_containers

const struct reader_containers imd_containers[]
static
Initial value:
= {
{
&GUID_ContainerFormatGif,
},
{ NULL }
}
static const struct metadata_pattern imd_metadata_pattern[]
Definition: regsvr.c:1581

Definition at line 1586 of file regsvr.c.

◆ imd_magic

const BYTE imd_magic[] = { 0x2c }
static

Definition at line 1579 of file regsvr.c.

◆ imd_metadata_pattern

const struct metadata_pattern imd_metadata_pattern[]
static
Initial value:
= {
{ 0, 1, imd_magic, mask_all, 1 },
{ 0 }
}
static const BYTE imd_magic[]
Definition: regsvr.c:1579

Definition at line 1581 of file regsvr.c.

◆ instance_keyname

◆ jpeg_formats

GUID const* const jpeg_formats[]
static
Initial value:
= {
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat32bppCMYK,
&GUID_WICPixelFormat8bppGray,
}

Definition at line 1171 of file regsvr.c.

◆ jpeg_magic

const BYTE jpeg_magic[] = {0xff, 0xd8}
static

Definition at line 1169 of file regsvr.c.

◆ jpeg_patterns

struct decoder_pattern const jpeg_patterns[]
static
Initial value:
= {
{0}
}
static const BYTE jpeg_magic[]
Definition: regsvr.c:1169

Definition at line 1178 of file regsvr.c.

◆ length_valuename

const char length_valuename[] = "Length"
static

Definition at line 164 of file regsvr.c.

Referenced by register_decoders().

◆ lsd_containers

const struct reader_containers lsd_containers[]
static
Initial value:
= {
{
&GUID_ContainerFormatGif,
},
{ NULL }
}
static const struct metadata_pattern lsd_metadata_patterns[]
Definition: regsvr.c:1565

Definition at line 1571 of file regsvr.c.

◆ lsd_metadata_patterns

const struct metadata_pattern lsd_metadata_patterns[]
static
Initial value:
= {
{ 0, 6, gif87a_magic, mask_all, 0 },
{ 0, 6, gif89a_magic, mask_all, 0 },
{ 0 }
}

Definition at line 1565 of file regsvr.c.

◆ mask_all

const BYTE mask_all[] = {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}
static

Definition at line 1121 of file regsvr.c.

◆ mask_valuename

const char mask_valuename[] = "Mask"
static

Definition at line 167 of file regsvr.c.

Referenced by register_decoders(), register_metadatareaders(), and register_pixelformats().

◆ metadataformat_valuename

const WCHAR metadataformat_valuename[] = {'M','e','t','a','d','a','t','a','F','o','r','m','a','t',0}
static

Definition at line 170 of file regsvr.c.

Referenced by register_metadatareaders().

◆ metadatareader_list

struct regsvr_metadatareader const metadatareader_list[]
static

Definition at line 1639 of file regsvr.c.

Referenced by DllUnregisterServer(), and WIC_DllRegisterServer().

◆ mimetypes_valuename

const char mimetypes_valuename[] = "MimeTypes"
static

Definition at line 158 of file regsvr.c.

Referenced by register_decoders(), and register_encoders().

◆ no_magic

const BYTE no_magic[1] = { 0 }
static

Definition at line 1504 of file regsvr.c.

◆ no_mask

const BYTE no_mask[1] = { 0 }
static

Definition at line 1505 of file regsvr.c.

◆ numericrepresentation_valuename

const char numericrepresentation_valuename[] = "NumericRepresentation"
static

Definition at line 179 of file regsvr.c.

Referenced by register_pixelformats().

◆ pattern_valuename

const char pattern_valuename[] = "Pattern"
static

Definition at line 166 of file regsvr.c.

Referenced by register_decoders(), and register_metadatareaders().

◆ patterns_keyname

const WCHAR patterns_keyname[] = {'P','a','t','t','e','r','n','s',0}
static

Definition at line 161 of file regsvr.c.

Referenced by register_decoders().

◆ pixelformat_list

struct regsvr_pixelformat const pixelformat_list[]
static

Definition at line 1789 of file regsvr.c.

Referenced by DllUnregisterServer(), and WIC_DllRegisterServer().

◆ pixelformats_keyname

const WCHAR pixelformats_keyname[] = {'P','i','x','e','l','F','o','r','m','a','t','s',0}
static

Definition at line 169 of file regsvr.c.

Referenced by register_converters().

◆ png_encode_formats

GUID const* const png_encode_formats[]
static
Initial value:
= {
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormatBlackWhite,
&GUID_WICPixelFormat2bppGray,
&GUID_WICPixelFormat4bppGray,
&GUID_WICPixelFormat8bppGray,
&GUID_WICPixelFormat16bppGray,
&GUID_WICPixelFormat32bppBGR,
&GUID_WICPixelFormat32bppBGRA,
&GUID_WICPixelFormat48bppRGB,
&GUID_WICPixelFormat64bppRGBA,
&GUID_WICPixelFormat1bppIndexed,
&GUID_WICPixelFormat2bppIndexed,
&GUID_WICPixelFormat4bppIndexed,
&GUID_WICPixelFormat8bppIndexed,
}

Definition at line 1362 of file regsvr.c.

◆ png_formats

GUID const* const png_formats[]
static
Initial value:
= {
&GUID_WICPixelFormatBlackWhite,
&GUID_WICPixelFormat2bppGray,
&GUID_WICPixelFormat4bppGray,
&GUID_WICPixelFormat8bppGray,
&GUID_WICPixelFormat16bppGray,
&GUID_WICPixelFormat32bppBGRA,
&GUID_WICPixelFormat64bppRGBA,
&GUID_WICPixelFormat1bppIndexed,
&GUID_WICPixelFormat2bppIndexed,
&GUID_WICPixelFormat4bppIndexed,
&GUID_WICPixelFormat8bppIndexed,
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat48bppRGB,
}

Definition at line 1185 of file regsvr.c.

◆ png_magic

const BYTE png_magic[] = {137,80,78,71,13,10,26,10}
static

Definition at line 1183 of file regsvr.c.

◆ png_patterns

struct decoder_pattern const png_patterns[]
static
Initial value:
= {
{0}
}
static const BYTE png_magic[]
Definition: regsvr.c:1183

Definition at line 1202 of file regsvr.c.

◆ pngchrm_containers

const struct reader_containers pngchrm_containers[]
static
Initial value:
= {
{
&GUID_ContainerFormatPng,
},
{ NULL }
}
static const struct metadata_pattern pngchrm_metadata_pattern[]
Definition: regsvr.c:1552

Definition at line 1557 of file regsvr.c.

◆ pngchrm_metadata_pattern

const struct metadata_pattern pngchrm_metadata_pattern[]
static
Initial value:
= {
{ 4, 4, cHRM, mask_all, 4 },
{ 0 }
}
static const BYTE cHRM[]
Definition: regsvr.c:1550

Definition at line 1552 of file regsvr.c.

◆ pnggama_containers

const struct reader_containers pnggama_containers[]
static
Initial value:
= {
{
&GUID_ContainerFormatPng,
},
{ NULL }
}
static const struct metadata_pattern pnggama_metadata_pattern[]
Definition: regsvr.c:1537

Definition at line 1542 of file regsvr.c.

◆ pnggama_metadata_pattern

const struct metadata_pattern pnggama_metadata_pattern[]
static
Initial value:
= {
{ 4, 4, gAMA, mask_all, 4 },
{ 0 }
}
static const BYTE gAMA[]
Definition: regsvr.c:1535

Definition at line 1537 of file regsvr.c.

◆ pngtext_containers

const struct reader_containers pngtext_containers[]
static
Initial value:
= {
{
&GUID_ContainerFormatPng,
},
{ NULL }
}
static const struct metadata_pattern pngtext_metadata_pattern[]
Definition: regsvr.c:1522

Definition at line 1527 of file regsvr.c.

◆ pngtext_metadata_pattern

const struct metadata_pattern pngtext_metadata_pattern[]
static
Initial value:
= {
{ 4, 4, tEXt, mask_all, 4 },
{ 0 }
}
static const BYTE tEXt[]
Definition: regsvr.c:1520

Definition at line 1522 of file regsvr.c.

◆ position_valuename

const char position_valuename[] = "Position"
static

Definition at line 165 of file regsvr.c.

Referenced by register_decoders(), and register_metadatareaders().

◆ requiresfixedsize_valuename

const char requiresfixedsize_valuename[] = "FixedSize"
static

Definition at line 174 of file regsvr.c.

Referenced by register_metadatareaders().

◆ requiresfullstream_valuename

const char requiresfullstream_valuename[] = "RequiresFullStream"
static

Definition at line 172 of file regsvr.c.

Referenced by register_metadatareaders().

◆ specversion_valuename

const char specversion_valuename[] = "SpecVersion"
static

Definition at line 171 of file regsvr.c.

Referenced by register_metadatareaders().

◆ supportspadding_valuename

const char supportspadding_valuename[] = "SupportsPadding"
static

Definition at line 173 of file regsvr.c.

Referenced by register_metadatareaders().

◆ supportstransparency_valuename

const char supportstransparency_valuename[] = "SupportsTransparency"
static

Definition at line 180 of file regsvr.c.

Referenced by register_pixelformats().

◆ tEXt

const BYTE tEXt[] = "tEXt"
static

Definition at line 1520 of file regsvr.c.

◆ tga_footer_magic

const BYTE tga_footer_magic[18] = "TRUEVISION-XFILE."
static

Definition at line 1239 of file regsvr.c.

◆ tga_formats

GUID const* const tga_formats[]
static
Initial value:
= {
&GUID_WICPixelFormat8bppGray,
&GUID_WICPixelFormat8bppIndexed,
&GUID_WICPixelFormat16bppGray,
&GUID_WICPixelFormat16bppBGR555,
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat32bppBGRA,
&GUID_WICPixelFormat32bppPBGRA,
}

Definition at line 1250 of file regsvr.c.

◆ tga_grayscale_magic

const BYTE tga_grayscale_magic[18] = {0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0}
static

Definition at line 1247 of file regsvr.c.

◆ tga_grayscale_mask

const BYTE tga_grayscale_mask[18] = {0,0xff,0xf7,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xcf}
static

Definition at line 1248 of file regsvr.c.

◆ tga_indexed_magic

const BYTE tga_indexed_magic[18] = {0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0}
static

Definition at line 1241 of file regsvr.c.

◆ tga_indexed_mask

const BYTE tga_indexed_mask[18] = {0,0xff,0xf7,0,0,0,0,0,0,0,0,0,0,0,0,0,0xff,0xcf}
static

Definition at line 1242 of file regsvr.c.

◆ tga_patterns

struct decoder_pattern const tga_patterns[]
static
Initial value:
= {
{0}
}
static const BYTE tga_footer_magic[18]
Definition: regsvr.c:1239
static const BYTE tga_indexed_magic[18]
Definition: regsvr.c:1241
static const BYTE tga_grayscale_magic[18]
Definition: regsvr.c:1247
static const BYTE tga_grayscale_mask[18]
Definition: regsvr.c:1248
static const BYTE tga_truecolor_mask[18]
Definition: regsvr.c:1245
static const BYTE tga_indexed_mask[18]
Definition: regsvr.c:1242
static const BYTE tga_truecolor_magic[18]
Definition: regsvr.c:1244

Definition at line 1261 of file regsvr.c.

◆ tga_truecolor_magic

const BYTE tga_truecolor_magic[18] = {0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
static

Definition at line 1244 of file regsvr.c.

◆ tga_truecolor_mask

const BYTE tga_truecolor_mask[18] = {0,0xff,0xf7,0,0,0,0,0,0,0,0,0,0,0,0,0,0x87,0xc0}
static

Definition at line 1245 of file regsvr.c.

◆ tiff_decode_formats

GUID const* const tiff_decode_formats[]
static
Initial value:
= {
&GUID_WICPixelFormatBlackWhite,
&GUID_WICPixelFormat4bppGray,
&GUID_WICPixelFormat8bppGray,
&GUID_WICPixelFormat16bppGray,
&GUID_WICPixelFormat32bppGrayFloat,
&GUID_WICPixelFormat1bppIndexed,
&GUID_WICPixelFormat2bppIndexed,
&GUID_WICPixelFormat4bppIndexed,
&GUID_WICPixelFormat8bppIndexed,
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat32bppBGR,
&GUID_WICPixelFormat32bppBGRA,
&GUID_WICPixelFormat32bppPBGRA,
&GUID_WICPixelFormat48bppRGB,
&GUID_WICPixelFormat64bppRGBA,
&GUID_WICPixelFormat64bppPRGBA,
&GUID_WICPixelFormat32bppCMYK,
&GUID_WICPixelFormat64bppCMYK,
&GUID_WICPixelFormat128bppRGBAFloat,
}

Definition at line 1210 of file regsvr.c.

◆ tiff_encode_formats

GUID const* const tiff_encode_formats[]
static
Initial value:
= {
&GUID_WICPixelFormatBlackWhite,
&GUID_WICPixelFormat4bppGray,
&GUID_WICPixelFormat8bppGray,
&GUID_WICPixelFormat1bppIndexed,
&GUID_WICPixelFormat4bppIndexed,
&GUID_WICPixelFormat8bppIndexed,
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat32bppBGRA,
&GUID_WICPixelFormat32bppPBGRA,
&GUID_WICPixelFormat48bppRGB,
&GUID_WICPixelFormat64bppRGBA,
&GUID_WICPixelFormat64bppPRGBA,
}

Definition at line 1380 of file regsvr.c.

◆ tiff_magic_be

const BYTE tiff_magic_be[] = {0x4d,0x4d,0,42}
static

Definition at line 1208 of file regsvr.c.

◆ tiff_magic_le

const BYTE tiff_magic_le[] = {0x49,0x49,42,0}
static

Definition at line 1207 of file regsvr.c.

◆ tiff_patterns

struct decoder_pattern const tiff_patterns[]
static
Initial value:
= {
{0}
}
static const BYTE tiff_magic_be[]
Definition: regsvr.c:1208
static const BYTE tiff_magic_le[]
Definition: regsvr.c:1207

Definition at line 1233 of file regsvr.c.

◆ vendor_valuename

const WCHAR vendor_valuename[] = {'V','e','n','d','o','r',0}
static

◆ version_valuename

const char version_valuename[] = "Version"
static