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
fb644206
Commit
fb644206
authored
Jul 10, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdmo: Remove dead code associated with an older registry format.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4d57e8f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
107 deletions
+6
-107
dmoreg.c
dlls/msdmo/dmoreg.c
+6
-107
No files found.
dlls/msdmo/dmoreg.c
View file @
fb644206
...
...
@@ -32,8 +32,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msdmo
);
#define MSDMO_MAJOR_VERSION 6
static
const
WCHAR
szDMORootKey
[]
=
{
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'S'
,
'h'
,
'o'
,
'w'
,
'\\'
,
...
...
@@ -139,40 +137,8 @@ static BOOL IsMediaTypeEqual(const DMO_PARTIAL_MEDIATYPE* mt1, const DMO_PARTIAL
static
HRESULT
write_types
(
HKEY
hkey
,
LPCWSTR
name
,
const
DMO_PARTIAL_MEDIATYPE
*
types
,
DWORD
count
)
{
LONG
ret
;
if
(
MSDMO_MAJOR_VERSION
>
5
)
{
ret
=
RegSetValueExW
(
hkey
,
name
,
0
,
REG_BINARY
,
(
const
BYTE
*
)
types
,
count
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
));
}
else
{
HKEY
skey1
,
skey2
,
skey3
;
DWORD
index
=
0
;
WCHAR
szGuidKey
[
64
];
ret
=
RegCreateKeyExW
(
hkey
,
name
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_WRITE
,
NULL
,
&
skey1
,
NULL
);
if
(
ret
)
return
HRESULT_FROM_WIN32
(
ret
);
while
(
index
<
count
)
{
GUIDToString
(
szGuidKey
,
&
types
[
index
].
type
);
ret
=
RegCreateKeyExW
(
skey1
,
szGuidKey
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_WRITE
,
NULL
,
&
skey2
,
NULL
);
GUIDToString
(
szGuidKey
,
&
types
[
index
].
subtype
);
ret
=
RegCreateKeyExW
(
skey2
,
szGuidKey
,
0
,
NULL
,
REG_OPTION_NON_VOLATILE
,
KEY_WRITE
,
NULL
,
&
skey3
,
NULL
);
RegCloseKey
(
skey3
);
RegCloseKey
(
skey2
);
index
++
;
}
RegCloseKey
(
skey1
);
}
return
HRESULT_FROM_WIN32
(
ret
);
return
HRESULT_FROM_WIN32
(
RegSetValueExW
(
hkey
,
name
,
0
,
REG_BINARY
,
(
const
BYTE
*
)
types
,
count
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
)));
}
/***************************************************************
...
...
@@ -766,78 +732,11 @@ static const IEnumDMOVtbl edmovt =
HRESULT
read_types
(
HKEY
root
,
LPCWSTR
key
,
ULONG
*
supplied
,
ULONG
requested
,
DMO_PARTIAL_MEDIATYPE
*
types
)
{
HRESULT
ret
=
S_OK
;
DWORD
len
=
requested
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
LONG
ret
=
RegQueryValueExW
(
root
,
key
,
NULL
,
NULL
,
(
BYTE
*
)
types
,
&
len
);
if
(
MSDMO_MAJOR_VERSION
>
5
)
{
DWORD
len
;
LONG
rc
;
len
=
requested
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
rc
=
RegQueryValueExW
(
root
,
key
,
NULL
,
NULL
,
(
LPBYTE
)
types
,
&
len
);
ret
=
HRESULT_FROM_WIN32
(
rc
);
*
supplied
=
len
/
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
}
else
{
HKEY
hkey
;
WCHAR
szGuidKey
[
64
];
*
supplied
=
0
;
if
(
ERROR_SUCCESS
==
RegOpenKeyExW
(
root
,
key
,
0
,
KEY_READ
,
&
hkey
))
{
int
index
=
0
;
WCHAR
szNextKey
[
MAX_PATH
];
DWORD
len
;
LONG
rc
=
ERROR_SUCCESS
;
while
(
rc
==
ERROR_SUCCESS
)
{
len
=
MAX_PATH
;
rc
=
RegEnumKeyExW
(
hkey
,
index
,
szNextKey
,
&
len
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
rc
==
ERROR_SUCCESS
)
{
HKEY
subk
;
int
sub_index
=
0
;
LONG
rcs
=
ERROR_SUCCESS
;
WCHAR
szSubKey
[
MAX_PATH
];
RegOpenKeyExW
(
hkey
,
szNextKey
,
0
,
KEY_READ
,
&
subk
);
while
(
rcs
==
ERROR_SUCCESS
)
{
len
=
MAX_PATH
;
rcs
=
RegEnumKeyExW
(
subk
,
sub_index
,
szSubKey
,
&
len
,
NULL
,
NULL
,
NULL
,
NULL
);
if
(
rcs
==
ERROR_SUCCESS
)
{
if
(
*
supplied
>=
requested
)
{
/* Bailing */
ret
=
S_FALSE
;
rc
=
ERROR_MORE_DATA
;
rcs
=
ERROR_MORE_DATA
;
break
;
}
wsprintfW
(
szGuidKey
,
szToGuidFmt
,
szNextKey
);
CLSIDFromString
(
szGuidKey
,
&
types
[
*
supplied
].
type
);
wsprintfW
(
szGuidKey
,
szToGuidFmt
,
szSubKey
);
CLSIDFromString
(
szGuidKey
,
&
types
[
*
supplied
].
subtype
);
TRACE
(
"Adding type %s subtype %s at index %i
\n
"
,
debugstr_guid
(
&
types
[
*
supplied
].
type
),
debugstr_guid
(
&
types
[
*
supplied
].
subtype
),
*
supplied
);
(
*
supplied
)
++
;
}
sub_index
++
;
}
index
++
;
}
}
RegCloseKey
(
hkey
);
}
}
return
ret
;
*
supplied
=
len
/
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
return
HRESULT_FROM_WIN32
(
ret
);
}
/***************************************************************
...
...
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