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
216e1f25
Commit
216e1f25
authored
May 08, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
May 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdmo: Return a valid enumerator even if the category doesn't exist.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f955f22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
7 deletions
+39
-7
dmoreg.c
dlls/msdmo/dmoreg.c
+3
-5
Makefile.in
dlls/msdmo/tests/Makefile.in
+1
-1
msdmo.c
dlls/msdmo/tests/msdmo.c
+35
-1
No files found.
dlls/msdmo/dmoreg.c
View file @
216e1f25
...
...
@@ -390,7 +390,6 @@ static HRESULT IEnumDMO_Constructor(
{
IEnumDMOImpl
*
lpedmo
;
HRESULT
hr
;
LONG
ret
;
*
obj
=
NULL
;
...
...
@@ -405,6 +404,7 @@ static HRESULT IEnumDMO_Constructor(
lpedmo
->
dwFlags
=
dwFlags
;
lpedmo
->
cInTypes
=
cInTypes
;
lpedmo
->
cOutTypes
=
cOutTypes
;
lpedmo
->
hkey
=
NULL
;
hr
=
dup_partial_mediatype
(
pInTypes
,
cInTypes
,
&
lpedmo
->
pInTypes
);
if
(
FAILED
(
hr
))
...
...
@@ -417,8 +417,7 @@ static HRESULT IEnumDMO_Constructor(
/* If not filtering by category enum from media objects root */
if
(
IsEqualGUID
(
guidCategory
,
&
GUID_NULL
))
{
if
((
ret
=
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
szDMORootKey
,
0
,
KEY_READ
,
&
lpedmo
->
hkey
)))
hr
=
HRESULT_FROM_WIN32
(
ret
);
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
szDMORootKey
,
0
,
KEY_READ
,
&
lpedmo
->
hkey
);
}
else
{
...
...
@@ -426,8 +425,7 @@ static HRESULT IEnumDMO_Constructor(
WCHAR
szKey
[
MAX_PATH
];
wsprintfW
(
szKey
,
szCat3Fmt
,
szDMORootKey
,
szDMOCategories
,
GUIDToString
(
szguid
,
guidCategory
));
if
((
ret
=
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
szKey
,
0
,
KEY_READ
,
&
lpedmo
->
hkey
)))
hr
=
HRESULT_FROM_WIN32
(
ret
);
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
szKey
,
0
,
KEY_READ
,
&
lpedmo
->
hkey
);
}
lerr:
...
...
dlls/msdmo/tests/Makefile.in
View file @
216e1f25
TESTDLL
=
msdmo.dll
IMPORTS
=
msdmo
IMPORTS
=
advapi32 dmoguids msdmo uuid
C_SRCS
=
\
msdmo.c
dlls/msdmo/tests/msdmo.c
View file @
216e1f25
...
...
@@ -18,7 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "initguid.h"
#include <stdio.h>
#define COBJMACROS
#include "dmo.h"
#include "wine/test.h"
...
...
@@ -27,8 +28,19 @@ static const GUID GUID_unknowndmo = {0x14d99047,0x441f,0x4cd3,{0xbc,0xa8,0x3e,0x
static
const
GUID
GUID_unknowncategory
=
{
0x14d99048
,
0x441f
,
0x4cd3
,{
0xbc
,
0xa8
,
0x3e
,
0x67
,
0x99
,
0xaf
,
0x34
,
0x75
}};
static
const
GUID
GUID_wmp1
=
{
0x13a7995e
,
0x7d8f
,
0x45b4
,{
0x9c
,
0x77
,
0x81
,
0x92
,
0x65
,
0x22
,
0x57
,
0x63
}};
static
const
char
*
guid_to_string
(
const
GUID
*
guid
)
{
static
char
buffer
[
50
];
sprintf
(
buffer
,
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]);
return
buffer
;
}
static
void
test_DMOUnregister
(
void
)
{
static
char
buffer
[
200
];
static
const
WCHAR
testdmoW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'd'
,
'm'
,
'o'
,
0
};
HRESULT
hr
;
...
...
@@ -53,6 +65,10 @@ static void test_DMOUnregister(void)
hr
=
DMOUnregister
(
&
GUID_unknowndmo
,
&
GUID_NULL
);
ok
(
hr
==
S_FALSE
,
"got 0x%08x
\n
"
,
hr
);
/* clean up category since Windows doesn't */
sprintf
(
buffer
,
"DirectShow
\\
MediaObjects
\\
Categories
\\
%s"
,
guid_to_string
(
&
GUID_unknowncategory
));
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
buffer
);
}
static
void
test_DMOGetName
(
void
)
...
...
@@ -70,8 +86,26 @@ static void test_DMOGetName(void)
ok
(
name
[
0
]
==
'a'
,
"got %x
\n
"
,
name
[
0
]);
}
static
void
test_DMOEnum
(
void
)
{
IEnumDMO
*
enum_dmo
;
HRESULT
hr
;
CLSID
clsid
;
WCHAR
*
name
;
hr
=
DMOEnum
(
&
GUID_unknowncategory
,
0
,
0
,
NULL
,
0
,
NULL
,
&
enum_dmo
);
ok
(
hr
==
S_OK
,
"DMOEnum() failed with %#x
\n
"
,
hr
);
hr
=
IEnumDMO_Next
(
enum_dmo
,
1
,
&
clsid
,
&
name
,
NULL
);
todo_wine
ok
(
hr
==
S_FALSE
,
"expected S_FALSE, got %#x
\n
"
,
hr
);
IEnumDMO_Release
(
enum_dmo
);
}
START_TEST
(
msdmo
)
{
test_DMOUnregister
();
test_DMOGetName
();
test_DMOEnum
();
}
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