Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
61e0ffcd
Commit
61e0ffcd
authored
Feb 24, 2019
by
Sven Baars
Committed by
Alexandre Julliard
Feb 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdmo: Allow for names to be NULL in IEnumDMO_Next.
Signed-off-by:
Sven Baars
<
sven.wine@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e41502b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
dmoreg.c
dlls/msdmo/dmoreg.c
+9
-6
msdmo.c
dlls/msdmo/tests/msdmo.c
+7
-0
No files found.
dlls/msdmo/dmoreg.c
View file @
61e0ffcd
...
...
@@ -530,7 +530,7 @@ static HRESULT WINAPI IEnumDMO_fnNext(
TRACE
(
"(%p)->(%d %p %p %p)
\n
"
,
This
,
cItemsToFetch
,
pCLSID
,
Names
,
pcItemsFetched
);
if
(
!
pCLSID
||
!
Names
)
if
(
!
pCLSID
)
return
E_POINTER
;
if
(
!
pcItemsFetched
&&
cItemsToFetch
>
1
)
...
...
@@ -656,14 +656,17 @@ static HRESULT WINAPI IEnumDMO_fnNext(
}
/* Media object wasn't filtered so add it to return list */
Names
[
count
]
=
NULL
;
len
=
MAX_PATH
*
sizeof
(
WCHAR
);
ret
=
RegQueryValueExW
(
hkey
,
NULL
,
NULL
,
NULL
,
(
LPBYTE
)
szValue
,
&
len
);
if
(
ERROR_SUCCESS
==
ret
)
if
(
Names
)
{
Names
[
count
]
=
CoTaskMemAlloc
((
strlenW
(
szValue
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
Names
[
count
])
strcpyW
(
Names
[
count
],
szValue
);
Names
[
count
]
=
NULL
;
if
(
ret
==
ERROR_SUCCESS
)
{
Names
[
count
]
=
CoTaskMemAlloc
((
strlenW
(
szValue
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
Names
[
count
])
strcpyW
(
Names
[
count
],
szValue
);
}
}
wsprintfW
(
szGuidKey
,
szToGuidFmt
,
szNextKey
);
CLSIDFromString
(
szGuidKey
,
&
pCLSID
[
count
]);
...
...
dlls/msdmo/tests/msdmo.c
View file @
61e0ffcd
...
...
@@ -107,6 +107,13 @@ static void test_DMOEnum(void)
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
0
,
"expected 0, got %d
\n
"
,
count
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
2
,
NULL
,
&
name
,
&
count
);
ok
(
hr
==
E_POINTER
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
2
,
&
clsid
,
NULL
,
&
count
);
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
ok
(
count
==
0
,
"expected 0, got %d
\n
"
,
count
);
IEnumDMO_Release
(
enum_dmo
);
}
...
...
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