Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
40185b6c
Commit
40185b6c
authored
Jun 22, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Add WICImagingCategories registration.
parent
fc413c70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
0 deletions
+103
-0
regsvr.c
dlls/windowscodecs/regsvr.c
+102
-0
wincodec.idl
include/wincodec.idl
+1
-0
No files found.
dlls/windowscodecs/regsvr.c
View file @
40185b6c
...
...
@@ -1788,6 +1788,104 @@ static struct regsvr_pixelformat const pixelformat_list[] = {
{
NULL
}
/* list terminator */
};
struct
regsvr_category
{
const
CLSID
*
clsid
;
/* NULL for end of list */
};
static
const
struct
regsvr_category
category_list
[]
=
{
{
&
CATID_WICBitmapDecoders
},
{
&
CATID_WICBitmapEncoders
},
{
&
CATID_WICFormatConverters
},
{
&
CATID_WICMetadataReader
},
{
&
CATID_WICPixelFormats
},
{
NULL
}
};
static
HRESULT
register_categories
(
const
struct
regsvr_category
*
list
)
{
LONG
res
;
WCHAR
buf
[
39
];
HKEY
coclass_key
,
categories_key
,
instance_key
;
res
=
RegCreateKeyExW
(
HKEY_CLASSES_ROOT
,
clsid_keyname
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
coclass_key
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
return
HRESULT_FROM_WIN32
(
res
);
StringFromGUID2
(
&
CLSID_WICImagingCategories
,
buf
,
39
);
res
=
RegCreateKeyExW
(
coclass_key
,
buf
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
categories_key
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
{
RegCloseKey
(
coclass_key
);
return
HRESULT_FROM_WIN32
(
res
);
}
res
=
RegCreateKeyExW
(
categories_key
,
instance_keyname
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
instance_key
,
NULL
);
for
(;
res
==
ERROR_SUCCESS
&&
list
->
clsid
;
list
++
)
{
HKEY
instance_clsid_key
;
StringFromGUID2
(
list
->
clsid
,
buf
,
39
);
res
=
RegCreateKeyExW
(
instance_key
,
buf
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
instance_clsid_key
,
NULL
);
if
(
res
==
ERROR_SUCCESS
)
{
res
=
RegSetValueExW
(
instance_clsid_key
,
clsid_valuename
,
0
,
REG_SZ
,
(
const
BYTE
*
)
buf
,
78
);
RegCloseKey
(
instance_clsid_key
);
}
}
RegCloseKey
(
instance_key
);
RegCloseKey
(
categories_key
);
RegCloseKey
(
coclass_key
);
return
res
!=
ERROR_SUCCESS
?
HRESULT_FROM_WIN32
(
res
)
:
S_OK
;
}
static
HRESULT
unregister_categories
(
const
struct
regsvr_category
*
list
)
{
LONG
res
;
WCHAR
buf
[
39
];
HKEY
coclass_key
,
categories_key
,
instance_key
;
res
=
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
clsid_keyname
,
0
,
KEY_READ
|
KEY_WRITE
,
&
coclass_key
);
if
(
res
!=
ERROR_SUCCESS
)
return
HRESULT_FROM_WIN32
(
res
);
StringFromGUID2
(
&
CLSID_WICImagingCategories
,
buf
,
39
);
res
=
RegOpenKeyExW
(
coclass_key
,
buf
,
0
,
KEY_READ
|
KEY_WRITE
,
&
categories_key
);
if
(
res
!=
ERROR_SUCCESS
)
{
if
(
res
==
ERROR_FILE_NOT_FOUND
)
res
=
ERROR_SUCCESS
;
RegCloseKey
(
coclass_key
);
return
HRESULT_FROM_WIN32
(
res
);
}
res
=
RegOpenKeyExW
(
categories_key
,
instance_keyname
,
0
,
KEY_READ
|
KEY_WRITE
,
&
instance_key
);
for
(;
res
==
ERROR_SUCCESS
&&
list
->
clsid
;
list
++
)
{
StringFromGUID2
(
list
->
clsid
,
buf
,
39
);
res
=
RegDeleteTreeW
(
instance_key
,
buf
);
}
RegCloseKey
(
instance_key
);
RegCloseKey
(
categories_key
);
StringFromGUID2
(
&
CLSID_WICImagingCategories
,
buf
,
39
);
res
=
RegDeleteTreeW
(
coclass_key
,
buf
);
RegCloseKey
(
coclass_key
);
return
res
!=
ERROR_SUCCESS
?
HRESULT_FROM_WIN32
(
res
)
:
S_OK
;
}
extern
HRESULT
WINAPI
WIC_DllRegisterServer
(
void
)
DECLSPEC_HIDDEN
;
extern
HRESULT
WINAPI
WIC_DllUnregisterServer
(
void
)
DECLSPEC_HIDDEN
;
...
...
@@ -1799,6 +1897,8 @@ HRESULT WINAPI DllRegisterServer(void)
hr
=
WIC_DllRegisterServer
();
if
(
SUCCEEDED
(
hr
))
hr
=
register_categories
(
category_list
);
if
(
SUCCEEDED
(
hr
))
hr
=
register_decoders
(
decoder_list
);
if
(
SUCCEEDED
(
hr
))
hr
=
register_encoders
(
encoder_list
);
...
...
@@ -1819,6 +1919,8 @@ HRESULT WINAPI DllUnregisterServer(void)
hr
=
WIC_DllUnregisterServer
();
if
(
SUCCEEDED
(
hr
))
hr
=
unregister_categories
(
category_list
);
if
(
SUCCEEDED
(
hr
))
hr
=
unregister_decoders
(
decoder_list
);
if
(
SUCCEEDED
(
hr
))
hr
=
unregister_encoders
(
encoder_list
);
...
...
include/wincodec.idl
View file @
40185b6c
...
...
@@ -1001,6 +1001,7 @@ cpp_quote("DEFINE_GUID(GUID_ContainerFormatWmp, 0x57a37caa,0x367a,0x4540,0x91,0x
cpp_quote
(
"DEFINE_GUID(GUID_VendorMicrosoft, 0xf0e749ca,0xedef,0x4589,0xa7,0x3a,0xee,0x0e,0x62,0x6a,0x2a,0x2b);"
)
cpp_quote
(
"DEFINE_GUID(CLSID_WICImagingCategories, 0xfae3d380,0xfea4,0x4623,0x8c,0x75,0xc6,0xb6,0x11,0x10,0xb6,0x81);"
)
cpp_quote
(
"DEFINE_GUID(CATID_WICBitmapDecoders, 0x7ed96837,0x96f0,0x4812,0xb2,0x11,0xf1,0x3c,0x24,0x11,0x7e,0xd3);"
)
cpp_quote
(
"DEFINE_GUID(CATID_WICBitmapEncoders, 0xac757296,0x3522,0x4e11,0x98,0x62,0xc1,0x7b,0xe5,0xa1,0x76,0x7e);"
)
cpp_quote
(
"DEFINE_GUID(CATID_WICFormatConverters, 0x7835eae8,0xbf14,0x49d1,0x93,0xce,0x53,0x3a,0x40,0x7b,0x22,0x48);"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment