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
a8f43643
Commit
a8f43643
authored
Jun 16, 2012
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jun 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devenum: Do not fail with a IBindCtx (with tests).
parent
8c5cf7e2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
13 deletions
+31
-13
mediacatenum.c
dlls/devenum/mediacatenum.c
+11
-1
devenum.c
dlls/devenum/tests/devenum.c
+20
-12
No files found.
dlls/devenum/mediacatenum.c
View file @
a8f43643
...
...
@@ -465,9 +465,19 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToStorage(IMoniker *iface, IB
*
ppvObj
=
NULL
;
if
(
p
bc
||
p
mkToLeft
)
if
(
pmkToLeft
)
return
MK_E_NOSTORAGE
;
if
(
pbc
!=
NULL
)
{
static
DWORD
reported
;
if
(
!
reported
)
{
FIXME
(
"ignoring IBindCtx %p
\n
"
,
pbc
);
reported
++
;
}
}
if
(
IsEqualGUID
(
riid
,
&
IID_IPropertyBag
))
{
HANDLE
hkey
;
...
...
dlls/devenum/tests/devenum.c
View file @
a8f43643
...
...
@@ -47,27 +47,23 @@ static struct category am_categories[] =
{
"Video compressor category"
,
&
CLSID_VideoCompressorCategory
}
};
static
void
test_devenum
(
void
)
static
void
test_devenum
(
IBindCtx
*
bind_ctx
)
{
HRESULT
res
;
ICreateDevEnum
*
create_devenum
;
IEnumMoniker
*
enum_moniker
=
NULL
;
int
i
;
CoInitialize
(
NULL
);
res
=
CoCreateInstance
(
&
CLSID_SystemDeviceEnum
,
NULL
,
CLSCTX_INPROC
,
&
IID_ICreateDevEnum
,
(
LPVOID
*
)
&
create_devenum
);
if
(
res
!=
S_OK
)
{
skip
(
"Cannot create SystemDeviceEnum object (%x)
\n
"
,
res
);
CoUninitialize
();
return
;
}
trace
(
"
\n
"
);
for
(
i
=
0
;
i
<
(
sizeof
(
am_categories
)
/
sizeof
(
struct
category
));
i
++
)
{
if
(
winetest_debug
>
1
)
trace
(
"%s:
\n
"
,
am_categories
[
i
].
name
);
res
=
ICreateDevEnum_CreateClassEnumerator
(
create_devenum
,
am_categories
[
i
].
clsid
,
&
enum_moniker
,
0
);
...
...
@@ -82,7 +78,7 @@ static void test_devenum(void)
HRESULT
hr
;
VariantInit
(
&
var
);
hr
=
IMoniker_BindToStorage
(
moniker
,
NULL
,
NULL
,
&
IID_IPropertyBag
,
(
LPVOID
*
)
&
prop_bag
);
hr
=
IMoniker_BindToStorage
(
moniker
,
bind_ctx
,
NULL
,
&
IID_IPropertyBag
,
(
LPVOID
*
)
&
prop_bag
);
ok
(
hr
==
S_OK
,
"IMoniker_BindToStorage failed with error %x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
...
...
@@ -92,6 +88,7 @@ static void test_devenum(void)
if
(
SUCCEEDED
(
hr
))
{
if
(
winetest_debug
>
1
)
trace
(
" %s
\n
"
,
wine_dbgstr_w
(
V_UNION
(
&
var
,
bstrVal
)));
VariantClear
(
&
var
);
}
...
...
@@ -107,18 +104,29 @@ static void test_devenum(void)
}
IEnumMoniker_Release
(
enum_moniker
);
}
trace
(
"
\n
"
);
}
ICreateDevEnum_Release
(
create_devenum
);
CoUninitialize
();
}
/* CLSID_CDeviceMoniker */
START_TEST
(
devenum
)
{
test_devenum
();
IBindCtx
*
bind_ctx
=
NULL
;
HRESULT
hr
;
CoInitialize
(
NULL
);
test_devenum
(
NULL
);
/* IBindCtx is allowed in IMoniker_BindToStorage (IMediaCatMoniker_BindToStorage) */
hr
=
CreateBindCtx
(
0
,
&
bind_ctx
);
ok
(
hr
==
S_OK
,
"Cannot create BindCtx: (res = 0x%x)
\n
"
,
hr
);
if
(
bind_ctx
)
{
test_devenum
(
bind_ctx
);
IBindCtx_Release
(
bind_ctx
);
}
CoUninitialize
();
}
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