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
b0886942
Commit
b0886942
authored
Sep 24, 2013
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Sep 24, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windowscodecs: Avoid using CONST.
parent
787bc871
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
45 deletions
+45
-45
regsvr.c
dlls/windowscodecs/regsvr.c
+45
-45
No files found.
dlls/windowscodecs/regsvr.c
View file @
b0886942
...
...
@@ -241,21 +241,21 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
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
);
(
const
BYTE
*
)
buf
,
78
);
RegCloseKey
(
instance_clsid_key
);
}
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
if
(
list
->
author
)
{
res
=
RegSetValueExA
(
clsid_key
,
author_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
author
)
,
(
const
BYTE
*
)
list
->
author
,
strlen
(
list
->
author
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
friendlyname
)
{
res
=
RegSetValueExA
(
clsid_key
,
friendlyname_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
friendlyname
)
,
(
const
BYTE
*
)
list
->
friendlyname
,
strlen
(
list
->
friendlyname
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
...
...
@@ -263,34 +263,34 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
if
(
list
->
vendor
)
{
StringFromGUID2
(
list
->
vendor
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
vendor_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
)
,
78
);
(
const
BYTE
*
)
buf
,
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
container_format
)
{
StringFromGUID2
(
list
->
container_format
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
containerformat_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
)
,
78
);
(
const
BYTE
*
)
buf
,
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
version
)
{
res
=
RegSetValueExA
(
clsid_key
,
version_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
version
)
,
(
const
BYTE
*
)
list
->
version
,
strlen
(
list
->
version
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
mimetypes
)
{
res
=
RegSetValueExA
(
clsid_key
,
mimetypes_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
mimetypes
)
,
(
const
BYTE
*
)
list
->
mimetypes
,
strlen
(
list
->
mimetypes
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
extensions
)
{
res
=
RegSetValueExA
(
clsid_key
,
extensions_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
extensions
)
,
(
const
BYTE
*
)
list
->
extensions
,
strlen
(
list
->
extensions
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
...
...
@@ -331,10 +331,10 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
KEY_READ
|
KEY_WRITE
,
NULL
,
&
pattern_key
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
break
;
res
=
RegSetValueExA
(
pattern_key
,
length_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
list
->
patterns
[
i
].
length
)
,
4
);
(
const
BYTE
*
)
&
list
->
patterns
[
i
].
length
,
4
);
if
(
res
==
ERROR_SUCCESS
)
res
=
RegSetValueExA
(
pattern_key
,
position_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
list
->
patterns
[
i
].
position
)
,
4
);
(
const
BYTE
*
)
&
list
->
patterns
[
i
].
position
,
4
);
if
(
res
==
ERROR_SUCCESS
)
res
=
RegSetValueExA
(
pattern_key
,
pattern_valuename
,
0
,
REG_BINARY
,
list
->
patterns
[
i
].
pattern
,
...
...
@@ -345,7 +345,7 @@ static HRESULT register_decoders(struct regsvr_decoder const *list)
list
->
patterns
[
i
].
length
);
if
(
res
==
ERROR_SUCCESS
)
res
=
RegSetValueExA
(
pattern_key
,
endofstream_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)
&
(
list
->
patterns
[
i
].
endofstream
)
,
4
);
(
const
BYTE
*
)
&
list
->
patterns
[
i
].
endofstream
,
4
);
RegCloseKey
(
pattern_key
);
}
RegCloseKey
(
patterns_key
);
...
...
@@ -456,21 +456,21 @@ static HRESULT register_encoders(struct regsvr_encoder const *list)
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
);
(
const
BYTE
*
)
buf
,
78
);
RegCloseKey
(
instance_clsid_key
);
}
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
if
(
list
->
author
)
{
res
=
RegSetValueExA
(
clsid_key
,
author_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
author
)
,
(
const
BYTE
*
)
list
->
author
,
strlen
(
list
->
author
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
friendlyname
)
{
res
=
RegSetValueExA
(
clsid_key
,
friendlyname_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
friendlyname
)
,
(
const
BYTE
*
)
list
->
friendlyname
,
strlen
(
list
->
friendlyname
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
...
...
@@ -478,34 +478,34 @@ static HRESULT register_encoders(struct regsvr_encoder const *list)
if
(
list
->
vendor
)
{
StringFromGUID2
(
list
->
vendor
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
vendor_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
)
,
78
);
(
const
BYTE
*
)
buf
,
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
container_format
)
{
StringFromGUID2
(
list
->
container_format
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
containerformat_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
)
,
78
);
(
const
BYTE
*
)
buf
,
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
version
)
{
res
=
RegSetValueExA
(
clsid_key
,
version_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
version
)
,
(
const
BYTE
*
)
list
->
version
,
strlen
(
list
->
version
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
mimetypes
)
{
res
=
RegSetValueExA
(
clsid_key
,
mimetypes_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
mimetypes
)
,
(
const
BYTE
*
)
list
->
mimetypes
,
strlen
(
list
->
mimetypes
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
extensions
)
{
res
=
RegSetValueExA
(
clsid_key
,
extensions_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
extensions
)
,
(
const
BYTE
*
)
list
->
extensions
,
strlen
(
list
->
extensions
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
...
...
@@ -634,21 +634,21 @@ static HRESULT register_converters(struct regsvr_converter const *list)
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
);
(
const
BYTE
*
)
buf
,
78
);
RegCloseKey
(
instance_clsid_key
);
}
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
if
(
list
->
author
)
{
res
=
RegSetValueExA
(
clsid_key
,
author_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
author
)
,
(
const
BYTE
*
)
list
->
author
,
strlen
(
list
->
author
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
friendlyname
)
{
res
=
RegSetValueExA
(
clsid_key
,
friendlyname_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
friendlyname
)
,
(
const
BYTE
*
)
list
->
friendlyname
,
strlen
(
list
->
friendlyname
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
...
...
@@ -656,13 +656,13 @@ static HRESULT register_converters(struct regsvr_converter const *list)
if
(
list
->
vendor
)
{
StringFromGUID2
(
list
->
vendor
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
vendor_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
)
,
78
);
(
const
BYTE
*
)
buf
,
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
version
)
{
res
=
RegSetValueExA
(
clsid_key
,
version_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
version
)
,
(
const
BYTE
*
)
list
->
version
,
strlen
(
list
->
version
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
...
...
@@ -791,21 +791,21 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
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
);
(
const
BYTE
*
)
buf
,
78
);
RegCloseKey
(
instance_clsid_key
);
}
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
if
(
list
->
author
)
{
res
=
RegSetValueExA
(
clsid_key
,
author_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
author
)
,
(
const
BYTE
*
)
list
->
author
,
strlen
(
list
->
author
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
friendlyname
)
{
res
=
RegSetValueExA
(
clsid_key
,
friendlyname_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
friendlyname
)
,
(
const
BYTE
*
)
list
->
friendlyname
,
strlen
(
list
->
friendlyname
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
...
...
@@ -813,42 +813,42 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
if
(
list
->
vendor
)
{
StringFromGUID2
(
list
->
vendor
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
vendor_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
)
,
78
);
(
const
BYTE
*
)
buf
,
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
metadata_format
)
{
StringFromGUID2
(
list
->
metadata_format
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
metadataformat_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
)
,
78
);
(
const
BYTE
*
)
buf
,
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
version
)
{
res
=
RegSetValueExA
(
clsid_key
,
version_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
version
)
,
(
const
BYTE
*
)
list
->
version
,
strlen
(
list
->
version
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
specversion
)
{
res
=
RegSetValueExA
(
clsid_key
,
specversion_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
version
)
,
(
const
BYTE
*
)
list
->
version
,
strlen
(
list
->
version
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
res
=
RegSetValueExA
(
clsid_key
,
requiresfullstream_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
list
->
requires_fullstream
)
,
4
);
(
const
BYTE
*
)
&
list
->
requires_fullstream
,
4
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
res
=
RegSetValueExA
(
clsid_key
,
supportspadding_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
list
->
supports_padding
)
,
4
);
(
const
BYTE
*
)
&
list
->
supports_padding
,
4
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
if
(
list
->
requires_fixedsize
)
{
res
=
RegSetValueExA
(
clsid_key
,
requiresfixedsize_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
list
->
requires_fixedsize
)
,
4
);
(
const
BYTE
*
)
&
list
->
requires_fixedsize
,
4
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
...
...
@@ -877,7 +877,7 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
KEY_READ
|
KEY_WRITE
,
NULL
,
&
pattern_key
,
NULL
);
if
(
res
!=
ERROR_SUCCESS
)
break
;
res
=
RegSetValueExA
(
pattern_key
,
position_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
container
->
patterns
[
i
].
position
)
,
4
);
(
const
BYTE
*
)
&
container
->
patterns
[
i
].
position
,
4
);
if
(
res
==
ERROR_SUCCESS
)
res
=
RegSetValueExA
(
pattern_key
,
pattern_valuename
,
0
,
REG_BINARY
,
container
->
patterns
[
i
].
pattern
,
...
...
@@ -888,7 +888,7 @@ static HRESULT register_metadatareaders(struct regsvr_metadatareader const *list
container
->
patterns
[
i
].
length
);
if
(
res
==
ERROR_SUCCESS
&&
container
->
patterns
[
i
].
data_offset
)
res
=
RegSetValueExA
(
pattern_key
,
dataoffset_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)
&
(
container
->
patterns
[
i
].
data_offset
)
,
4
);
(
const
BYTE
*
)
&
container
->
patterns
[
i
].
data_offset
,
4
);
RegCloseKey
(
pattern_key
);
}
...
...
@@ -1001,21 +1001,21 @@ static HRESULT register_pixelformats(struct regsvr_pixelformat const *list)
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
);
(
const
BYTE
*
)
buf
,
78
);
RegCloseKey
(
instance_clsid_key
);
}
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
if
(
list
->
author
)
{
res
=
RegSetValueExA
(
clsid_key
,
author_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
author
)
,
(
const
BYTE
*
)
list
->
author
,
strlen
(
list
->
author
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
friendlyname
)
{
res
=
RegSetValueExA
(
clsid_key
,
friendlyname_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
friendlyname
)
,
(
const
BYTE
*
)
list
->
friendlyname
,
strlen
(
list
->
friendlyname
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
...
...
@@ -1023,31 +1023,31 @@ static HRESULT register_pixelformats(struct regsvr_pixelformat const *list)
if
(
list
->
vendor
)
{
StringFromGUID2
(
list
->
vendor
,
buf
,
39
);
res
=
RegSetValueExW
(
clsid_key
,
vendor_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
buf
)
,
78
);
(
const
BYTE
*
)
buf
,
78
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
if
(
list
->
version
)
{
res
=
RegSetValueExA
(
clsid_key
,
version_valuename
,
0
,
REG_SZ
,
(
CONST
BYTE
*
)(
list
->
version
)
,
(
const
BYTE
*
)
list
->
version
,
strlen
(
list
->
version
)
+
1
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
}
res
=
RegSetValueExA
(
clsid_key
,
bitsperpixel_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
list
->
bitsperpixel
)
,
4
);
(
const
BYTE
*
)
&
list
->
bitsperpixel
,
4
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
res
=
RegSetValueExA
(
clsid_key
,
channelcount_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
list
->
channelcount
)
,
4
);
(
const
BYTE
*
)
&
list
->
channelcount
,
4
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
res
=
RegSetValueExA
(
clsid_key
,
numericrepresentation_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
list
->
numericrepresentation
)
,
4
);
(
const
BYTE
*
)
&
list
->
numericrepresentation
,
4
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
res
=
RegSetValueExA
(
clsid_key
,
supportstransparency_valuename
,
0
,
REG_DWORD
,
(
CONST
BYTE
*
)(
&
list
->
supportsalpha
)
,
4
);
(
const
BYTE
*
)
&
list
->
supportsalpha
,
4
);
if
(
res
!=
ERROR_SUCCESS
)
goto
error_close_clsid_key
;
if
(
list
->
channelmasks
)
{
...
...
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