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
308b24d9
Commit
308b24d9
authored
Feb 22, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
browseui/tests: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f1a3586f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
51 deletions
+50
-51
Makefile.in
dlls/browseui/tests/Makefile.in
+0
-1
autocomplete.c
dlls/browseui/tests/autocomplete.c
+42
-43
progressdlg.c
dlls/browseui/tests/progressdlg.c
+8
-7
No files found.
dlls/browseui/tests/Makefile.in
View file @
308b24d9
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
browseui.dll
TESTDLL
=
browseui.dll
IMPORTS
=
ole32
IMPORTS
=
ole32
...
...
dlls/browseui/tests/autocomplete.c
View file @
308b24d9
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
{ \
{ \
HRESULT res = (exp); \
HRESULT res = (exp); \
if (res != S_OK) \
if (res != S_OK) \
ok(FALSE, #exp " failed: %x\n", res); \
ok(FALSE, #exp " failed: %
#l
x\n", res); \
}
}
static
LPWSTR
strdup_AtoW
(
LPCSTR
str
)
static
LPWSTR
strdup_AtoW
(
LPCSTR
str
)
...
@@ -86,7 +86,7 @@ static TestACL *TestACL_Constructor(int limit, const char **strings)
...
@@ -86,7 +86,7 @@ static TestACL *TestACL_Constructor(int limit, const char **strings)
static
ULONG
STDMETHODCALLTYPE
TestACL_AddRef
(
IEnumString
*
iface
)
static
ULONG
STDMETHODCALLTYPE
TestACL_AddRef
(
IEnumString
*
iface
)
{
{
TestACL
*
This
=
impl_from_IEnumString
(
iface
);
TestACL
*
This
=
impl_from_IEnumString
(
iface
);
trace
(
"ACL(%p): addref (%d)
\n
"
,
This
,
This
->
ref
+
1
);
trace
(
"ACL(%p): addref (%
l
d)
\n
"
,
This
,
This
->
ref
+
1
);
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
}
...
@@ -96,7 +96,7 @@ static ULONG STDMETHODCALLTYPE TestACL_Release(IEnumString *iface)
...
@@ -96,7 +96,7 @@ static ULONG STDMETHODCALLTYPE TestACL_Release(IEnumString *iface)
ULONG
res
;
ULONG
res
;
res
=
InterlockedDecrement
(
&
This
->
ref
);
res
=
InterlockedDecrement
(
&
This
->
ref
);
trace
(
"ACL(%p): release (%d)
\n
"
,
This
,
res
);
trace
(
"ACL(%p): release (%
l
d)
\n
"
,
This
,
res
);
return
res
;
return
res
;
}
}
...
@@ -129,7 +129,7 @@ static HRESULT STDMETHODCALLTYPE TestACL_Next(IEnumString *iface, ULONG celt, LP
...
@@ -129,7 +129,7 @@ static HRESULT STDMETHODCALLTYPE TestACL_Next(IEnumString *iface, ULONG celt, LP
TestACL
*
This
=
impl_from_IEnumString
(
iface
);
TestACL
*
This
=
impl_from_IEnumString
(
iface
);
ULONG
i
;
ULONG
i
;
trace
(
"ACL(%p): read %d item(s)
\n
"
,
This
,
celt
);
trace
(
"ACL(%p): read %
l
d item(s)
\n
"
,
This
,
celt
);
for
(
i
=
0
;
i
<
celt
;
i
++
)
for
(
i
=
0
;
i
<
celt
;
i
++
)
{
{
if
(
This
->
pos
>=
This
->
limit
)
if
(
This
->
pos
>=
This
->
limit
)
...
@@ -215,14 +215,11 @@ IACListVtbl TestACL_ACListVtbl =
...
@@ -215,14 +215,11 @@ IACListVtbl TestACL_ACListVtbl =
#define expect_str(obj, str) \
#define expect_str(obj, str) \
{ \
{ \
ole_ok(IEnumString_Next(obj, 1, &wstr, &i)); \
ole_ok(IEnumString_Next(obj, 1, &wstr, &i)); \
ok(i == 1, "Expected i == 1, got %d\n", i); \
ok(i == 1, "Expected i == 1, got %
l
d\n", i); \
ok(str[0] == wstr[0], "String mismatch\n"); \
ok(str[0] == wstr[0], "String mismatch\n"); \
CoTaskMemFree(wstr); \
CoTaskMemFree(wstr); \
}
}
#define expect_end(obj) \
ok(IEnumString_Next(obj, 1, &wstr, &i) == S_FALSE, "Unexpected return from Next\n");
static
void
test_ACLMulti
(
void
)
static
void
test_ACLMulti
(
void
)
{
{
const
char
*
strings1
[]
=
{
"a"
,
"c"
,
"e"
};
const
char
*
strings1
[]
=
{
"a"
,
"c"
,
"e"
};
...
@@ -236,122 +233,124 @@ static void test_ACLMulti(void)
...
@@ -236,122 +233,124 @@ static void test_ACLMulti(void)
IObjMgr
*
mgr
;
IObjMgr
*
mgr
;
LPWSTR
wstr
;
LPWSTR
wstr
;
LPWSTR
wstrtab
[
15
];
LPWSTR
wstrtab
[
15
];
ULONG
ref
,
i
;
LPVOID
tmp
;
LPVOID
tmp
;
ULONG
ref
;
UINT
i
;
hr
=
CoCreateInstance
(
&
CLSID_ACLMulti
,
NULL
,
CLSCTX_INPROC
,
&
IID_IEnumString
,
(
void
**
)
&
obj
);
hr
=
CoCreateInstance
(
&
CLSID_ACLMulti
,
NULL
,
CLSCTX_INPROC
,
&
IID_IEnumString
,
(
void
**
)
&
obj
);
ok
(
hr
==
S_OK
,
"
failed to create ACLMulti instance, 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
return
;
if
(
hr
!=
S_OK
)
return
;
hr
=
IEnumString_QueryInterface
(
obj
,
&
IID_IACList
,
(
void
**
)
&
acl
);
hr
=
IEnumString_QueryInterface
(
obj
,
&
IID_IACList
,
(
void
**
)
&
acl
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IEnumString_QueryInterface
(
obj
,
&
IID_IACList2
,
&
tmp
);
hr
=
IEnumString_QueryInterface
(
obj
,
&
IID_IACList2
,
&
tmp
);
ok
(
hr
==
E_NOINTERFACE
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IEnumString_QueryInterface
(
obj
,
&
IID_IObjMgr
,
(
void
**
)
&
mgr
);
hr
=
IEnumString_QueryInterface
(
obj
,
&
IID_IObjMgr
,
(
void
**
)
&
mgr
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IEnumString_QueryInterface
(
obj
,
&
IID_IEnumACString
,
(
LPVOID
*
)
&
unk
);
hr
=
IEnumString_QueryInterface
(
obj
,
&
IID_IEnumACString
,
(
LPVOID
*
)
&
unk
);
if
(
hr
==
E_NOINTERFACE
)
if
(
hr
==
E_NOINTERFACE
)
todo_wine
win_skip
(
"IEnumACString is not supported, skipping tests
\n
"
);
todo_wine
win_skip
(
"IEnumACString is not supported, skipping tests
\n
"
);
else
else
{
{
ok
(
hr
==
S_OK
,
"
QueryInterface(IID_IEnumACString) failed: %x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
if
(
unk
!=
NULL
)
if
(
unk
!=
NULL
)
IEnumACString_Release
(
unk
);
IEnumACString_Release
(
unk
);
}
}
i
=
-
1
;
i
=
-
1
;
hr
=
IEnumString_Next
(
obj
,
1
,
(
LPOLESTR
*
)
&
tmp
,
&
i
);
hr
=
IEnumString_Next
(
obj
,
1
,
(
LPOLESTR
*
)
&
tmp
,
&
i
);
ok
(
hr
==
S_FALSE
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
i
==
0
,
"Unexpected fetched value %d
\n
"
,
i
);
ok
(
i
==
0
,
"Unexpected fetched value %
l
d
\n
"
,
i
);
hr
=
IEnumString_Next
(
obj
,
44
,
(
LPOLESTR
*
)
&
tmp
,
&
i
);
hr
=
IEnumString_Next
(
obj
,
44
,
(
LPOLESTR
*
)
&
tmp
,
&
i
);
ok
(
hr
==
S_FALSE
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IEnumString_Skip
(
obj
,
1
);
hr
=
IEnumString_Skip
(
obj
,
1
);
ok
(
hr
==
E_NOTIMPL
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_NOTIMPL
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IEnumString_Clone
(
obj
,
(
IEnumString
**
)
&
tmp
);
hr
=
IEnumString_Clone
(
obj
,
(
IEnumString
**
)
&
tmp
);
ok
(
hr
==
E_OUTOFMEMORY
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_OUTOFMEMORY
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IACList_Expand
(
acl
,
exp
);
hr
=
IACList_Expand
(
acl
,
exp
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
acl1
=
TestACL_Constructor
(
3
,
strings1
);
acl1
=
TestACL_Constructor
(
3
,
strings1
);
acl2
=
TestACL_Constructor
(
3
,
strings2
);
acl2
=
TestACL_Constructor
(
3
,
strings2
);
hr
=
IObjMgr_Append
(
mgr
,
(
IUnknown
*
)
&
acl1
->
IACList_iface
);
hr
=
IObjMgr_Append
(
mgr
,
(
IUnknown
*
)
&
acl1
->
IACList_iface
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IObjMgr_Append
(
mgr
,
(
IUnknown
*
)
&
acl2
->
IACList_iface
);
hr
=
IObjMgr_Append
(
mgr
,
(
IUnknown
*
)
&
acl2
->
IACList_iface
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IObjMgr_Append
(
mgr
,
NULL
);
hr
=
IObjMgr_Append
(
mgr
,
NULL
);
ok
(
hr
==
E_FAIL
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
expect_str
(
obj
,
"a"
);
expect_str
(
obj
,
"a"
);
expect_str
(
obj
,
"c"
);
expect_str
(
obj
,
"c"
);
expect_str
(
obj
,
"e"
);
expect_str
(
obj
,
"e"
);
expect_str
(
obj
,
"a"
);
expect_str
(
obj
,
"a"
);
expect_str
(
obj
,
"b"
);
expect_str
(
obj
,
"b"
);
expect_str
(
obj
,
"d"
);
expect_str
(
obj
,
"d"
);
expect_end
(
obj
);
hr
=
IEnumString_Next
(
obj
,
1
,
&
wstr
,
&
i
);
ok
(
hr
==
S_FALSE
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IEnumString_Reset
(
obj
);
hr
=
IEnumString_Reset
(
obj
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
acl1
->
pos
==
0
,
"acl1 not reset
\n
"
);
ok
(
acl1
->
pos
==
0
,
"acl1 not reset
\n
"
);
ok
(
acl2
->
pos
==
0
,
"acl2 not reset
\n
"
);
ok
(
acl2
->
pos
==
0
,
"acl2 not reset
\n
"
);
hr
=
IACList_Expand
(
acl
,
exp
);
hr
=
IACList_Expand
(
acl
,
exp
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
acl1
->
expcount
==
1
,
"expcount - expected 1, got %d
\n
"
,
acl1
->
expcount
);
ok
(
acl1
->
expcount
==
1
,
"expcount - expected 1, got %d
\n
"
,
acl1
->
expcount
);
ok
(
acl2
->
expcount
==
0
/* XP */
||
acl2
->
expcount
==
1
/* Vista */
,
ok
(
acl2
->
expcount
==
0
/* XP */
||
acl2
->
expcount
==
1
/* Vista */
,
"expcount - expected 0 or 1, got %d
\n
"
,
acl2
->
expcount
);
"expcount - expected 0 or 1, got %d
\n
"
,
acl2
->
expcount
);
hr
=
IEnumString_Next
(
obj
,
15
,
wstrtab
,
&
i
);
hr
=
IEnumString_Next
(
obj
,
15
,
wstrtab
,
&
i
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
i
==
1
,
"Expected i == 1, got %d
\n
"
,
i
);
ok
(
i
==
1
,
"Expected i == 1, got %
l
d
\n
"
,
i
);
CoTaskMemFree
(
wstrtab
[
0
]);
CoTaskMemFree
(
wstrtab
[
0
]);
hr
=
IEnumString_Next
(
obj
,
15
,
wstrtab
,
&
i
);
hr
=
IEnumString_Next
(
obj
,
15
,
wstrtab
,
&
i
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
CoTaskMemFree
(
wstrtab
[
0
]);
CoTaskMemFree
(
wstrtab
[
0
]);
hr
=
IEnumString_Next
(
obj
,
15
,
wstrtab
,
&
i
);
hr
=
IEnumString_Next
(
obj
,
15
,
wstrtab
,
&
i
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
CoTaskMemFree
(
wstrtab
[
0
]);
CoTaskMemFree
(
wstrtab
[
0
]);
hr
=
IEnumString_Next
(
obj
,
15
,
wstrtab
,
&
i
);
hr
=
IEnumString_Next
(
obj
,
15
,
wstrtab
,
&
i
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
CoTaskMemFree
(
wstrtab
[
0
]);
CoTaskMemFree
(
wstrtab
[
0
]);
hr
=
IACList_Expand
(
acl
,
exp
);
hr
=
IACList_Expand
(
acl
,
exp
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
acl1
->
expcount
==
2
,
"expcount - expected 1, got %d
\n
"
,
acl1
->
expcount
);
ok
(
acl1
->
expcount
==
2
,
"expcount - expected 1, got %d
\n
"
,
acl1
->
expcount
);
ok
(
acl2
->
expcount
==
0
/* XP */
||
acl2
->
expcount
==
2
/* Vista */
,
ok
(
acl2
->
expcount
==
0
/* XP */
||
acl2
->
expcount
==
2
/* Vista */
,
"expcount - expected 0 or 2, got %d
\n
"
,
acl2
->
expcount
);
"expcount - expected 0 or 2, got %d
\n
"
,
acl2
->
expcount
);
acl1
->
expret
=
S_FALSE
;
acl1
->
expret
=
S_FALSE
;
hr
=
IACList_Expand
(
acl
,
exp
);
hr
=
IACList_Expand
(
acl
,
exp
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
acl1
->
expcount
==
3
,
"expcount - expected 1, got %d
\n
"
,
acl1
->
expcount
);
ok
(
acl1
->
expcount
==
3
,
"expcount - expected 1, got %d
\n
"
,
acl1
->
expcount
);
ok
(
acl2
->
expcount
==
1
/* XP */
||
acl2
->
expcount
==
3
/* Vista */
,
ok
(
acl2
->
expcount
==
1
/* XP */
||
acl2
->
expcount
==
3
/* Vista */
,
"expcount - expected 0 or 3, got %d
\n
"
,
acl2
->
expcount
);
"expcount - expected 0 or 3, got %d
\n
"
,
acl2
->
expcount
);
acl1
->
expret
=
E_NOTIMPL
;
acl1
->
expret
=
E_NOTIMPL
;
hr
=
IACList_Expand
(
acl
,
exp
);
hr
=
IACList_Expand
(
acl
,
exp
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
acl1
->
expcount
==
4
,
"expcount - expected 1, got %d
\n
"
,
acl1
->
expcount
);
ok
(
acl1
->
expcount
==
4
,
"expcount - expected 1, got %d
\n
"
,
acl1
->
expcount
);
ok
(
acl2
->
expcount
==
2
/* XP */
||
acl2
->
expcount
==
4
/* Vista */
,
ok
(
acl2
->
expcount
==
2
/* XP */
||
acl2
->
expcount
==
4
/* Vista */
,
"expcount - expected 0 or 4, got %d
\n
"
,
acl2
->
expcount
);
"expcount - expected 0 or 4, got %d
\n
"
,
acl2
->
expcount
);
acl2
->
expret
=
E_OUTOFMEMORY
;
acl2
->
expret
=
E_OUTOFMEMORY
;
hr
=
IACList_Expand
(
acl
,
exp
);
hr
=
IACList_Expand
(
acl
,
exp
);
ok
(
hr
==
E_OUTOFMEMORY
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_OUTOFMEMORY
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
acl2
->
expret
=
E_FAIL
;
acl2
->
expret
=
E_FAIL
;
hr
=
IACList_Expand
(
acl
,
exp
);
hr
=
IACList_Expand
(
acl
,
exp
);
ok
(
hr
==
E_FAIL
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IObjMgr_Remove
(
mgr
,
(
IUnknown
*
)
&
acl1
->
IACList_iface
);
hr
=
IObjMgr_Remove
(
mgr
,
(
IUnknown
*
)
&
acl1
->
IACList_iface
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
acl1
->
ref
==
1
,
"acl1 not released
\n
"
);
ok
(
acl1
->
ref
==
1
,
"acl1 not released
\n
"
);
expect_end
(
obj
);
hr
=
IEnumString_Next
(
obj
,
1
,
&
wstr
,
&
i
);
ok
(
hr
==
S_FALSE
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IEnumString_Reset
(
obj
);
IEnumString_Reset
(
obj
);
expect_str
(
obj
,
"a"
);
expect_str
(
obj
,
"a"
);
expect_str
(
obj
,
"b"
);
expect_str
(
obj
,
"b"
);
expect_str
(
obj
,
"d"
);
expect_str
(
obj
,
"d"
);
expect_end
(
obj
);
hr
=
IEnumString_Next
(
obj
,
1
,
&
wstr
,
&
i
);
ok
(
hr
==
S_FALSE
,
"Unexpected hr %#lx.
\n
"
,
hr
);
IEnumString_Release
(
obj
);
IEnumString_Release
(
obj
);
IACList_Release
(
acl
);
IACList_Release
(
acl
);
...
@@ -371,13 +370,13 @@ static void test_ACListISF(void)
...
@@ -371,13 +370,13 @@ static void test_ACListISF(void)
HRESULT
hr
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_ACListISF
,
NULL
,
CLSCTX_INPROC
,
&
IID_IACList
,
(
void
**
)
&
list
);
hr
=
CoCreateInstance
(
&
CLSID_ACListISF
,
NULL
,
CLSCTX_INPROC
,
&
IID_IACList
,
(
void
**
)
&
list
);
ok
(
hr
==
S_OK
,
"
failed to create ACListISF instance, 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IACList_QueryInterface
(
list
,
&
IID_IEnumString
,
(
void
**
)
&
enumstring
);
hr
=
IACList_QueryInterface
(
list
,
&
IID_IEnumString
,
(
void
**
)
&
enumstring
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IEnumString_QueryInterface
(
enumstring
,
&
IID_IACList
,
(
void
**
)
&
list2
);
hr
=
IEnumString_QueryInterface
(
enumstring
,
&
IID_IACList
,
(
void
**
)
&
list2
);
ok
(
hr
==
S_OK
,
"
got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
list
==
list2
,
"got %p, %p
\n
"
,
list
,
list2
);
ok
(
list
==
list2
,
"got %p, %p
\n
"
,
list
,
list2
);
IACList_Release
(
list2
);
IACList_Release
(
list2
);
...
...
dlls/browseui/tests/progressdlg.c
View file @
308b24d9
...
@@ -33,26 +33,27 @@ static void test_IProgressDialog_QueryInterface(void)
...
@@ -33,26 +33,27 @@ static void test_IProgressDialog_QueryInterface(void)
IUnknown
*
unk
;
IUnknown
*
unk
;
HRESULT
hr
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_ProgressDialog
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IProgressDialog
,
(
void
*
)
&
dlg
);
hr
=
CoCreateInstance
(
&
CLSID_ProgressDialog
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IProgressDialog
,
(
void
**
)
&
dlg
);
if
(
FAILED
(
hr
))
{
if
(
FAILED
(
hr
))
win_skip
(
"CoCreateInstance for IProgressDialog returned 0x%x
\n
"
,
hr
);
{
win_skip
(
"ProgressDialog is not supported, hr %#lx.
\n
"
,
hr
);
return
;
return
;
}
}
hr
=
IProgressDialog_QueryInterface
(
dlg
,
&
IID_IUnknown
,
NULL
);
hr
=
IProgressDialog_QueryInterface
(
dlg
,
&
IID_IUnknown
,
NULL
);
ok
(
hr
==
E_POINTER
,
"
got 0x%x (expected E_POINTER)
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IProgressDialog_QueryInterface
(
dlg
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
hr
=
IProgressDialog_QueryInterface
(
dlg
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"
QueryInterface (IUnknown) returned 0x%x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
if
(
SUCCEEDED
(
hr
))
{
IUnknown_Release
(
unk
);
IUnknown_Release
(
unk
);
}
}
hr
=
IProgressDialog_QueryInterface
(
dlg
,
&
IID_IOleWindow
,
(
void
**
)
&
olewindow
);
hr
=
IProgressDialog_QueryInterface
(
dlg
,
&
IID_IOleWindow
,
(
void
**
)
&
olewindow
);
ok
(
hr
==
S_OK
,
"
QueryInterface (IOleWindow) returned 0x%x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
if
(
SUCCEEDED
(
hr
))
{
hr
=
IOleWindow_QueryInterface
(
olewindow
,
&
IID_IProgressDialog
,
(
void
**
)
&
dlg2
);
hr
=
IOleWindow_QueryInterface
(
olewindow
,
&
IID_IProgressDialog
,
(
void
**
)
&
dlg2
);
ok
(
hr
==
S_OK
,
"
QueryInterface (IProgressDialog) returned 0x%x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"
Unexpected hr %#lx.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
if
(
SUCCEEDED
(
hr
))
{
IProgressDialog_Release
(
dlg2
);
IProgressDialog_Release
(
dlg2
);
}
}
...
...
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