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
c8431d97
Commit
c8431d97
authored
Feb 24, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorerframe/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4bd7b55d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
331 additions
and
332 deletions
+331
-332
Makefile.in
dlls/explorerframe/tests/Makefile.in
+0
-1
nstc.c
dlls/explorerframe/tests/nstc.c
+298
-298
taskbarlist.c
dlls/explorerframe/tests/taskbarlist.c
+33
-33
No files found.
dlls/explorerframe/tests/Makefile.in
View file @
c8431d97
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
explorerframe.dll
TESTDLL
=
explorerframe.dll
IMPORTS
=
uuid shell32 ole32 user32
IMPORTS
=
uuid shell32 ole32 user32
...
...
dlls/explorerframe/tests/nstc.c
View file @
c8431d97
...
@@ -174,8 +174,8 @@ static HRESULT WINAPI NSTCEvents_fnOnSelectionChanged(
...
@@ -174,8 +174,8 @@ static HRESULT WINAPI NSTCEvents_fnOnSelectionChanged(
HRESULT
hr
;
HRESULT
hr
;
DWORD
count
=
0xdeadbeef
;
DWORD
count
=
0xdeadbeef
;
hr
=
IShellItemArray_GetCount
(
psiaSelection
,
&
count
);
hr
=
IShellItemArray_GetCount
(
psiaSelection
,
&
count
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
count
==
1
,
"Got count 0x%x
\n
"
,
count
);
ok
(
count
==
1
,
"Got count 0x%
l
x
\n
"
,
count
);
}
}
This
->
count
[
OnSelectionChanged
]
++
;
This
->
count
[
OnSelectionChanged
]
++
;
return
E_NOTIMPL
;
return
E_NOTIMPL
;
...
@@ -190,8 +190,8 @@ static HRESULT WINAPI NSTCEvents_fnOnKeyboardInput(
...
@@ -190,8 +190,8 @@ static HRESULT WINAPI NSTCEvents_fnOnKeyboardInput(
INameSpaceTreeControlEventsImpl
*
This
=
impl_from_INameSpaceTreeControlEvents
(
iface
);
INameSpaceTreeControlEventsImpl
*
This
=
impl_from_INameSpaceTreeControlEvents
(
iface
);
This
->
count
[
OnKeyboardInput
]
++
;
This
->
count
[
OnKeyboardInput
]
++
;
ok
(
wParam
==
0x1234
,
"Got unexpected wParam %
l
x
\n
"
,
wParam
);
ok
(
wParam
==
0x1234
,
"Got unexpected wParam %
I
x
\n
"
,
wParam
);
ok
(
lParam
==
0x1234
,
"Got unexpected lParam %
l
x
\n
"
,
lParam
);
ok
(
lParam
==
0x1234
,
"Got unexpected lParam %
I
x
\n
"
,
lParam
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
...
@@ -501,12 +501,12 @@ static HWND get_treeview_hwnd(INameSpaceTreeControl *pnstc)
...
@@ -501,12 +501,12 @@ static HWND get_treeview_hwnd(INameSpaceTreeControl *pnstc)
HWND
treeview
=
NULL
;
HWND
treeview
=
NULL
;
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
HWND
host
;
HWND
host
;
hr
=
IOleWindow_GetWindow
(
pow
,
&
host
);
hr
=
IOleWindow_GetWindow
(
pow
,
&
host
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
treeview
=
FindWindowExW
(
host
,
NULL
,
WC_TREEVIEWW
,
NULL
);
treeview
=
FindWindowExW
(
host
,
NULL
,
WC_TREEVIEWW
,
NULL
);
IOleWindow_Release
(
pow
);
IOleWindow_Release
(
pow
);
...
@@ -584,44 +584,44 @@ static BOOL test_initialization(void)
...
@@ -584,44 +584,44 @@ static BOOL test_initialization(void)
hr
=
CoCreateInstance
(
&
CLSID_NamespaceTreeControl
,
NULL
,
CLSCTX_INPROC_SERVER
,
hr
=
CoCreateInstance
(
&
CLSID_NamespaceTreeControl
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_INameSpaceTreeControl
,
(
void
**
)
&
pnstc
);
&
IID_INameSpaceTreeControl
,
(
void
**
)
&
pnstc
);
ok
(
hr
==
S_OK
||
hr
==
REGDB_E_CLASSNOTREG
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
hr
==
REGDB_E_CLASSNOTREG
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
return
FALSE
;
return
FALSE
;
}
}
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
NULL
,
NULL
,
0
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
NULL
,
NULL
,
0
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_TLW_WITH_WSCHILD
),
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_TLW_WITH_WSCHILD
),
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
(
HWND
)
0xDEADBEEF
,
NULL
,
0
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
(
HWND
)
0xDEADBEEF
,
NULL
,
0
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_WINDOW_HANDLE
),
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_WINDOW_HANDLE
),
"Got (0x%08
l
x)
\n
"
,
hr
);
ZeroMemory
(
&
rc
,
sizeof
(
RECT
));
ZeroMemory
(
&
rc
,
sizeof
(
RECT
));
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
NULL
,
&
rc
,
0
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
NULL
,
&
rc
,
0
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_TLW_WITH_WSCHILD
),
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_TLW_WITH_WSCHILD
),
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
(
HWND
)
0xDEADBEEF
,
&
rc
,
0
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
(
HWND
)
0xDEADBEEF
,
&
rc
,
0
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_WINDOW_HANDLE
),
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_WINDOW_HANDLE
),
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_host1
);
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_host1
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
hwnd_host1
==
NULL
,
"hwnd is not null.
\n
"
);
ok
(
hwnd_host1
==
NULL
,
"hwnd is not null.
\n
"
);
hr
=
IOleWindow_ContextSensitiveHelp
(
pow
,
TRUE
);
hr
=
IOleWindow_ContextSensitiveHelp
(
pow
,
TRUE
);
ok
(
hr
==
E_NOTIMPL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOTIMPL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
IOleWindow_ContextSensitiveHelp
(
pow
,
FALSE
);
hr
=
IOleWindow_ContextSensitiveHelp
(
pow
,
FALSE
);
ok
(
hr
==
E_NOTIMPL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOTIMPL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
IOleWindow_Release
(
pow
);
IOleWindow_Release
(
pow
);
}
}
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
hwnd
,
NULL
,
0
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
hwnd
,
NULL
,
0
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
static
const
CHAR
namespacetree
[]
=
"NamespaceTreeControl"
;
static
const
CHAR
namespacetree
[]
=
"NamespaceTreeControl"
;
...
@@ -629,7 +629,7 @@ static BOOL test_initialization(void)
...
@@ -629,7 +629,7 @@ static BOOL test_initialization(void)
LONG
style
,
expected_style
;
LONG
style
,
expected_style
;
HWND
hwnd_tv
;
HWND
hwnd_tv
;
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_host1
);
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_host1
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
hwnd_host1
!=
NULL
,
"hwnd_host1 is null.
\n
"
);
ok
(
hwnd_host1
!=
NULL
,
"hwnd_host1 is null.
\n
"
);
buf
[
0
]
=
'\0'
;
buf
[
0
]
=
'\0'
;
GetClassNameA
(
hwnd_host1
,
buf
,
1024
);
GetClassNameA
(
hwnd_host1
,
buf
,
1024
);
...
@@ -637,15 +637,15 @@ static BOOL test_initialization(void)
...
@@ -637,15 +637,15 @@ static BOOL test_initialization(void)
expected_style
=
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
;
expected_style
=
WS_CHILD
|
WS_VISIBLE
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
;
style
=
GetWindowLongPtrW
(
hwnd_host1
,
GWL_STYLE
);
style
=
GetWindowLongPtrW
(
hwnd_host1
,
GWL_STYLE
);
ok
(
style
==
expected_style
,
"Got style %08x
\n
"
,
style
);
ok
(
style
==
expected_style
,
"Got style %08
l
x
\n
"
,
style
);
expected_style
=
0
;
expected_style
=
0
;
style
=
GetWindowLongPtrW
(
hwnd_host1
,
GWL_EXSTYLE
);
style
=
GetWindowLongPtrW
(
hwnd_host1
,
GWL_EXSTYLE
);
ok
(
style
==
expected_style
,
"Got style %08x
\n
"
,
style
);
ok
(
style
==
expected_style
,
"Got style %08
l
x
\n
"
,
style
);
expected_style
=
0
;
expected_style
=
0
;
style
=
SendMessageW
(
hwnd_host1
,
TVM_GETEXTENDEDSTYLE
,
0
,
0
);
style
=
SendMessageW
(
hwnd_host1
,
TVM_GETEXTENDEDSTYLE
,
0
,
0
);
ok
(
style
==
expected_style
,
"Got 0x%08x
\n
"
,
style
);
ok
(
style
==
expected_style
,
"Got 0x%08
l
x
\n
"
,
style
);
hwnd_tv
=
FindWindowExW
(
hwnd_host1
,
NULL
,
WC_TREEVIEWW
,
NULL
);
hwnd_tv
=
FindWindowExW
(
hwnd_host1
,
NULL
,
WC_TREEVIEWW
,
NULL
);
ok
(
hwnd_tv
!=
NULL
,
"Failed to get treeview hwnd.
\n
"
);
ok
(
hwnd_tv
!=
NULL
,
"Failed to get treeview hwnd.
\n
"
);
...
@@ -655,16 +655,16 @@ static BOOL test_initialization(void)
...
@@ -655,16 +655,16 @@ static BOOL test_initialization(void)
WS_CLIPCHILDREN
|
WS_TABSTOP
|
TVS_NOHSCROLL
|
WS_CLIPCHILDREN
|
WS_TABSTOP
|
TVS_NOHSCROLL
|
TVS_NONEVENHEIGHT
|
TVS_INFOTIP
|
TVS_TRACKSELECT
|
TVS_EDITLABELS
;
TVS_NONEVENHEIGHT
|
TVS_INFOTIP
|
TVS_TRACKSELECT
|
TVS_EDITLABELS
;
style
=
GetWindowLongPtrW
(
hwnd_tv
,
GWL_STYLE
);
style
=
GetWindowLongPtrW
(
hwnd_tv
,
GWL_STYLE
);
ok
(
style
==
expected_style
,
"Got style %08x
\n
"
,
style
);
ok
(
style
==
expected_style
,
"Got style %08
l
x
\n
"
,
style
);
expected_style
=
0
;
expected_style
=
0
;
style
=
GetWindowLongPtrW
(
hwnd_tv
,
GWL_EXSTYLE
);
style
=
GetWindowLongPtrW
(
hwnd_tv
,
GWL_EXSTYLE
);
ok
(
style
==
expected_style
,
"Got style %08x
\n
"
,
style
);
ok
(
style
==
expected_style
,
"Got style %08
l
x
\n
"
,
style
);
expected_style
=
TVS_EX_NOSINGLECOLLAPSE
|
TVS_EX_DOUBLEBUFFER
|
expected_style
=
TVS_EX_NOSINGLECOLLAPSE
|
TVS_EX_DOUBLEBUFFER
|
TVS_EX_RICHTOOLTIP
|
TVS_EX_DRAWIMAGEASYNC
;
TVS_EX_RICHTOOLTIP
|
TVS_EX_DRAWIMAGEASYNC
;
style
=
SendMessageW
(
hwnd_tv
,
TVM_GETEXTENDEDSTYLE
,
0
,
0
);
style
=
SendMessageW
(
hwnd_tv
,
TVM_GETEXTENDEDSTYLE
,
0
,
0
);
todo_wine
ok
(
style
==
expected_style
,
"Got 0x%08x
\n
"
,
style
);
todo_wine
ok
(
style
==
expected_style
,
"Got 0x%08
l
x
\n
"
,
style
);
}
}
IOleWindow_Release
(
pow
);
IOleWindow_Release
(
pow
);
...
@@ -675,13 +675,13 @@ static BOOL test_initialization(void)
...
@@ -675,13 +675,13 @@ static BOOL test_initialization(void)
/* The control can be initialized again without crashing, but
/* The control can be initialized again without crashing, but
* the reference counting will break. */
* the reference counting will break. */
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
hwnd
,
&
rc
,
0
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
hwnd
,
&
rc
,
0
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
HWND
hwnd_host2
;
HWND
hwnd_host2
;
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_host2
);
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_host2
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
hwnd_host1
!=
hwnd_host2
,
"Same hwnd.
\n
"
);
ok
(
hwnd_host1
!=
hwnd_host2
,
"Same hwnd.
\n
"
);
IOleWindow_Release
(
pow
);
IOleWindow_Release
(
pow
);
}
}
...
@@ -691,35 +691,35 @@ static BOOL test_initialization(void)
...
@@ -691,35 +691,35 @@ static BOOL test_initialization(void)
/* Next three are supported on Vista/2k8, but not on newer versions */
/* Next three are supported on Vista/2k8, but not on newer versions */
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceObject
,
(
void
**
)
&
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceObject
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
||
broken
(
hr
==
S_OK
)
/* vista, w2k8 */
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
||
broken
(
hr
==
S_OK
)
/* vista, w2k8 */
,
"Got (0x%08
l
x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceActiveObject
,
(
void
**
)
&
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceActiveObject
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
||
broken
(
hr
==
S_OK
)
/* vista, w2k8 */
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
||
broken
(
hr
==
S_OK
)
/* vista, w2k8 */
,
"Got (0x%08
l
x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceObjectWindowless
,
(
void
**
)
&
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceObjectWindowless
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
||
broken
(
hr
==
S_OK
)
/* vista, w2k8 */
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
||
broken
(
hr
==
S_OK
)
/* vista, w2k8 */
,
"Got (0x%08
l
x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceUIWindow
,
(
void
**
)
&
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceUIWindow
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceFrame
,
(
void
**
)
&
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceFrame
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceSite
,
(
void
**
)
&
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceSite
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceSiteEx
,
(
void
**
)
&
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceSiteEx
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceSiteWindowless
,
(
void
**
)
&
punk
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleInPlaceSiteWindowless
,
(
void
**
)
&
punk
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08
l
x)
\n
"
,
hr
);
/* On windows, the reference count won't go to zero until the
/* On windows, the reference count won't go to zero until the
* window is destroyed. */
* window is destroyed. */
INameSpaceTreeControl_AddRef
(
pnstc
);
INameSpaceTreeControl_AddRef
(
pnstc
);
lres
=
INameSpaceTreeControl_Release
(
pnstc
);
lres
=
INameSpaceTreeControl_Release
(
pnstc
);
ok
(
lres
>
1
,
"Reference count was (%d).
\n
"
,
lres
);
ok
(
lres
>
1
,
"Reference count was (%
l
d).
\n
"
,
lres
);
DestroyWindow
(
hwnd_host1
);
DestroyWindow
(
hwnd_host1
);
lres
=
INameSpaceTreeControl_Release
(
pnstc
);
lres
=
INameSpaceTreeControl_Release
(
pnstc
);
ok
(
!
lres
,
"lres was %d
\n
"
,
lres
);
ok
(
!
lres
,
"lres was %
l
d
\n
"
,
lres
);
return
TRUE
;
return
TRUE
;
}
}
...
@@ -731,26 +731,26 @@ static void verify_root_order_(INameSpaceTreeControl *pnstc, IShellItem **roots,
...
@@ -731,26 +731,26 @@ static void verify_root_order_(INameSpaceTreeControl *pnstc, IShellItem **roots,
IShellItemArray
*
psia
;
IShellItemArray
*
psia
;
hr
=
INameSpaceTreeControl_GetRootItems
(
pnstc
,
&
psia
);
hr
=
INameSpaceTreeControl_GetRootItems
(
pnstc
,
&
psia
);
ok_
(
file
,
line
)
(
hr
==
S_OK
,
"GetRootItems: got (0x%08x)
\n
"
,
hr
);
ok_
(
file
,
line
)
(
hr
==
S_OK
,
"GetRootItems: got (0x%08
l
x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
DWORD
i
,
expected
,
count
=
-
1
;
DWORD
i
,
expected
,
count
=
-
1
;
hr
=
IShellItemArray_GetCount
(
psia
,
&
count
);
hr
=
IShellItemArray_GetCount
(
psia
,
&
count
);
ok_
(
file
,
line
)
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok_
(
file
,
line
)
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
for
(
expected
=
0
;
roots
[
expected
]
!=
NULL
;
expected
++
);
for
(
expected
=
0
;
roots
[
expected
]
!=
NULL
;
expected
++
);
ok_
(
file
,
line
)
(
count
==
expected
,
"Got %
d roots, expected %
d
\n
"
,
count
,
expected
);
ok_
(
file
,
line
)
(
count
==
expected
,
"Got %
ld roots, expected %l
d
\n
"
,
count
,
expected
);
for
(
i
=
0
;
i
<
count
&&
roots
[
i
]
!=
NULL
;
i
++
)
for
(
i
=
0
;
i
<
count
&&
roots
[
i
]
!=
NULL
;
i
++
)
{
{
IShellItem
*
psi
;
IShellItem
*
psi
;
hr
=
IShellItemArray_GetItemAt
(
psia
,
i
,
&
psi
);
hr
=
IShellItemArray_GetItemAt
(
psia
,
i
,
&
psi
);
ok_
(
file
,
line
)
(
hr
==
S_OK
,
"GetItemAt %
i: got 0x%08
x
\n
"
,
i
,
hr
);
ok_
(
file
,
line
)
(
hr
==
S_OK
,
"GetItemAt %
li: got 0x%08l
x
\n
"
,
i
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
int
cmp
;
int
cmp
;
hr
=
IShellItem_Compare
(
psi
,
roots
[
i
],
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
roots
[
i
],
SICHINT_DISPLAY
,
&
cmp
);
ok_
(
file
,
line
)
(
hr
==
S_OK
,
"Compare %
i: got 0x%08
x
\n
"
,
i
,
hr
);
ok_
(
file
,
line
)
(
hr
==
S_OK
,
"Compare %
li: got 0x%08l
x
\n
"
,
i
,
hr
);
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
}
}
...
@@ -791,15 +791,15 @@ static void test_basics(void)
...
@@ -791,15 +791,15 @@ static void test_basics(void)
/* Create ShellItems for testing. */
/* Create ShellItems for testing. */
SHGetDesktopFolder
(
&
psfdesktop
);
SHGetDesktopFolder
(
&
psfdesktop
);
hr
=
pSHGetIDListFromObject
((
IUnknown
*
)
psfdesktop
,
&
pidl_desktop
);
hr
=
pSHGetIDListFromObject
((
IUnknown
*
)
psfdesktop
,
&
pidl_desktop
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
hr
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_desktop
,
&
psidesktop
);
hr
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_desktop
,
&
psidesktop
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
hr
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_desktop
,
&
psidesktop2
);
hr
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_desktop
,
&
psidesktop2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
IShellItem_Release
(
psidesktop
);
if
(
FAILED
(
hr
))
IShellItem_Release
(
psidesktop
);
}
}
ILFree
(
pidl_desktop
);
ILFree
(
pidl_desktop
);
...
@@ -822,45 +822,45 @@ static void test_basics(void)
...
@@ -822,45 +822,45 @@ static void test_basics(void)
myPathAddBackslashW
(
buf
);
myPathAddBackslashW
(
buf
);
lstrcatW
(
buf
,
L"testdir"
);
lstrcatW
(
buf
,
L"testdir"
);
hr
=
pSHCreateItemFromParsingName
(
buf
,
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
psitestdir
);
hr
=
pSHCreateItemFromParsingName
(
buf
,
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
psitestdir
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
FAILED
(
hr
))
goto
cleanup
;
lstrcpyW
(
buf
,
curdirW
);
lstrcpyW
(
buf
,
curdirW
);
myPathAddBackslashW
(
buf
);
myPathAddBackslashW
(
buf
);
lstrcatW
(
buf
,
L"testdir
\\
testdir2"
);
lstrcatW
(
buf
,
L"testdir
\\
testdir2"
);
hr
=
pSHCreateItemFromParsingName
(
buf
,
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
psitestdir2
);
hr
=
pSHCreateItemFromParsingName
(
buf
,
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
psitestdir2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
FAILED
(
hr
))
goto
cleanup
;
lstrcpyW
(
buf
,
curdirW
);
lstrcpyW
(
buf
,
curdirW
);
myPathAddBackslashW
(
buf
);
myPathAddBackslashW
(
buf
);
lstrcatW
(
buf
,
L"testdir
\\
test1.txt"
);
lstrcatW
(
buf
,
L"testdir
\\
test1.txt"
);
hr
=
pSHCreateItemFromParsingName
(
buf
,
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
psitest1
);
hr
=
pSHCreateItemFromParsingName
(
buf
,
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
psitest1
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
FAILED
(
hr
))
goto
cleanup
;
hr
=
CoCreateInstance
(
&
CLSID_NamespaceTreeControl
,
NULL
,
CLSCTX_INPROC_SERVER
,
hr
=
CoCreateInstance
(
&
CLSID_NamespaceTreeControl
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_INameSpaceTreeControl
,
(
void
**
)
&
pnstc
);
&
IID_INameSpaceTreeControl
,
(
void
**
)
&
pnstc
);
ok
(
hr
==
S_OK
,
"Failed to initialize control (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to initialize control (0x%08
l
x)
\n
"
,
hr
);
/* Some tests on an uninitialized control */
/* Some tests on an uninitialized control */
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
NULL
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
NULL
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_NONFOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_NONFOLDERS
,
0
,
NULL
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
/* Initialize the control */
/* Initialize the control */
SetRect
(
&
rc
,
0
,
0
,
200
,
200
);
SetRect
(
&
rc
,
0
,
0
,
200
,
200
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
hwnd
,
&
rc
,
0
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
hwnd
,
&
rc
,
0
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
/* Set/GetControlStyle(2) */
/* Set/GetControlStyle(2) */
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_INameSpaceTreeControl2
,
(
void
**
)
&
pnstc2
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_INameSpaceTreeControl2
,
(
void
**
)
&
pnstc2
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
),
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
),
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
DWORD
tmp
;
DWORD
tmp
;
...
@@ -875,7 +875,7 @@ static void test_basics(void)
...
@@ -875,7 +875,7 @@ static void test_basics(void)
/* We can use this to differentiate between two versions of
/* We can use this to differentiate between two versions of
* this interface. Windows 7 returns hr == S_OK. */
* this interface. Windows 7 returns hr == S_OK. */
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
0
,
0
);
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
0
,
0
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_FAIL
),
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_FAIL
),
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
if
(
hr
==
S_OK
)
{
{
static
const
NSTCSTYLE
styles
[]
=
static
const
NSTCSTYLE
styles
[]
=
...
@@ -891,86 +891,86 @@ static void test_basics(void)
...
@@ -891,86 +891,86 @@ static void test_basics(void)
/* Set/GetControlStyle */
/* Set/GetControlStyle */
style
=
style2
=
0xdeadbeef
;
style
=
style2
=
0xdeadbeef
;
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
0xFFFFFFFF
,
&
style
);
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
0xFFFFFFFF
,
&
style
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style
==
0
,
"Got style %x
\n
"
,
style
);
ok
(
style
==
0
,
"Got style %
l
x
\n
"
,
style
);
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
0
,
0xFFFFFFF
);
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
0
,
0xFFFFFFF
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
tmp
=
0
;
tmp
=
0
;
for
(
i
=
0
;
styles
[
i
]
!=
0
;
i
++
)
for
(
i
=
0
;
styles
[
i
]
!=
0
;
i
++
)
{
{
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
styles
[
i
],
styles
[
i
]);
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
styles
[
i
],
styles
[
i
]);
ok
(
hr
==
S_OK
,
"Got 0x%08
x (%
x)
\n
"
,
hr
,
styles
[
i
]);
ok
(
hr
==
S_OK
,
"Got 0x%08
lx (%l
x)
\n
"
,
hr
,
styles
[
i
]);
if
(
SUCCEEDED
(
hr
))
tmp
|=
styles
[
i
];
if
(
SUCCEEDED
(
hr
))
tmp
|=
styles
[
i
];
}
}
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
0xFFFFFFFF
,
&
style
);
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
0xFFFFFFFF
,
&
style
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style
==
tmp
,
"Got style %
x (expected %
x)
\n
"
,
style
,
tmp
);
ok
(
style
==
tmp
,
"Got style %
lx (expected %l
x)
\n
"
,
style
,
tmp
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
NSTCSTYLE
tmp2
;
NSTCSTYLE
tmp2
;
for
(
i
=
0
;
styles
[
i
]
!=
0
;
i
++
)
for
(
i
=
0
;
styles
[
i
]
!=
0
;
i
++
)
{
{
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
styles
[
i
],
&
tmp2
);
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
styles
[
i
],
&
tmp2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
tmp2
==
(
style
&
styles
[
i
]),
"Got %x
\n
"
,
tmp2
);
ok
(
tmp2
==
(
style
&
styles
[
i
]),
"Got %
l
x
\n
"
,
tmp2
);
}
}
}
}
for
(
i
=
0
;
styles
[
i
]
!=
0
;
i
++
)
for
(
i
=
0
;
styles
[
i
]
!=
0
;
i
++
)
{
{
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
styles
[
i
],
0
);
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
styles
[
i
],
0
);
ok
(
hr
==
S_OK
,
"Got 0x%08
x (%
x)
\n
"
,
hr
,
styles
[
i
]);
ok
(
hr
==
S_OK
,
"Got 0x%08
lx (%l
x)
\n
"
,
hr
,
styles
[
i
]);
}
}
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
0xFFFFFFFF
,
&
style
);
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
0xFFFFFFFF
,
&
style
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style
==
0
,
"Got style %x
\n
"
,
style
);
ok
(
style
==
0
,
"Got style %
l
x
\n
"
,
style
);
/* Set/GetControlStyle2 */
/* Set/GetControlStyle2 */
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
&
style2
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
&
style2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style2
==
0
,
"Got style %x
\n
"
,
style2
);
ok
(
style2
==
0
,
"Got style %x
\n
"
,
style2
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0
,
0
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0
,
0
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0
,
0xFFFFFFFF
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0
,
0xFFFFFFFF
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
0
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
0
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
0xFFFFFFFF
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
0xFFFFFFFF
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
0
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
0
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
&
style2
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
&
style2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style2
==
0x00000000
,
"Got style %x
\n
"
,
style2
);
ok
(
style2
==
0x00000000
,
"Got style %x
\n
"
,
style2
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFF
,
&
style2
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFF
,
&
style2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style2
==
0
,
"Got style %x
\n
"
,
style2
);
ok
(
style2
==
0
,
"Got style %x
\n
"
,
style2
);
tmp
=
0
;
tmp
=
0
;
for
(
i
=
0
;
styles2
[
i
]
!=
0
;
i
++
)
for
(
i
=
0
;
styles2
[
i
]
!=
0
;
i
++
)
{
{
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
styles2
[
i
],
styles2
[
i
]);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
styles2
[
i
],
styles2
[
i
]);
ok
(
hr
==
S_OK
,
"Got 0x%08x (%x)
\n
"
,
hr
,
styles2
[
i
]);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x (%x)
\n
"
,
hr
,
styles2
[
i
]);
if
(
SUCCEEDED
(
hr
))
tmp
|=
styles2
[
i
];
if
(
SUCCEEDED
(
hr
))
tmp
|=
styles2
[
i
];
}
}
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFF
,
&
style2
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFF
,
&
style2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style2
==
tmp
,
"Got style %x (expected %x)
\n
"
,
style2
,
tmp
);
ok
(
style2
==
tmp
,
"Got style %x (expected %
l
x)
\n
"
,
style2
,
tmp
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
NSTCSTYLE2
tmp2
;
NSTCSTYLE2
tmp2
;
for
(
i
=
0
;
styles2
[
i
]
!=
0
;
i
++
)
for
(
i
=
0
;
styles2
[
i
]
!=
0
;
i
++
)
{
{
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
styles2
[
i
],
&
tmp2
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
styles2
[
i
],
&
tmp2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
tmp2
==
(
style2
&
styles2
[
i
]),
"Got %x
\n
"
,
tmp2
);
ok
(
tmp2
==
(
style2
&
styles2
[
i
]),
"Got %x
\n
"
,
tmp2
);
}
}
}
}
...
@@ -978,10 +978,10 @@ static void test_basics(void)
...
@@ -978,10 +978,10 @@ static void test_basics(void)
for
(
i
=
0
;
styles2
[
i
]
!=
0
;
i
++
)
for
(
i
=
0
;
styles2
[
i
]
!=
0
;
i
++
)
{
{
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
styles2
[
i
],
0
);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
styles2
[
i
],
0
);
ok
(
hr
==
S_OK
,
"Got 0x%08x (%x)
\n
"
,
hr
,
styles2
[
i
]);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x (%x)
\n
"
,
hr
,
styles2
[
i
]);
}
}
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFF
,
&
style2
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFF
,
&
style2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style2
==
0
,
"Got style %x (expected 0)
\n
"
,
style2
);
ok
(
style2
==
0
,
"Got style %x (expected 0)
\n
"
,
style2
);
}
}
else
else
...
@@ -1007,11 +1007,11 @@ static void test_basics(void)
...
@@ -1007,11 +1007,11 @@ static void test_basics(void)
style
=
0xdeadbeef
;
style
=
0xdeadbeef
;
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
0xFFFFFFFF
,
&
style
);
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
0xFFFFFFFF
,
&
style
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style
==
0xdeadbeef
,
"Got style %x
\n
"
,
style
);
ok
(
style
==
0xdeadbeef
,
"Got style %
l
x
\n
"
,
style
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
&
style2
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
&
style2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style2
==
0
,
"Got style %x
\n
"
,
style2
);
ok
(
style2
==
0
,
"Got style %x
\n
"
,
style2
);
tmp
=
0
;
tmp
=
0
;
...
@@ -1019,26 +1019,26 @@ static void test_basics(void)
...
@@ -1019,26 +1019,26 @@ static void test_basics(void)
{
{
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
styles
[
i
],
styles
[
i
]);
hr
=
INameSpaceTreeControl2_SetControlStyle
(
pnstc2
,
styles
[
i
],
styles
[
i
]);
ok
(
hr
==
E_FAIL
||
((
styles
[
i
]
&
NSTCS_SPRINGEXPAND
)
&&
hr
==
S_OK
),
ok
(
hr
==
E_FAIL
||
((
styles
[
i
]
&
NSTCS_SPRINGEXPAND
)
&&
hr
==
S_OK
),
"Got 0x%08
x (%
x)
\n
"
,
hr
,
styles
[
i
]);
"Got 0x%08
lx (%l
x)
\n
"
,
hr
,
styles
[
i
]);
if
(
SUCCEEDED
(
hr
))
tmp
|=
styles
[
i
];
if
(
SUCCEEDED
(
hr
))
tmp
|=
styles
[
i
];
}
}
style
=
0xdeadbeef
;
style
=
0xdeadbeef
;
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
tmp
,
&
style
);
hr
=
INameSpaceTreeControl2_GetControlStyle
(
pnstc2
,
tmp
,
&
style
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style
==
0xdeadbeef
,
"Got style %x
\n
"
,
style
);
ok
(
style
==
0xdeadbeef
,
"Got style %
l
x
\n
"
,
style
);
tmp
=
0
;
tmp
=
0
;
for
(
i
=
0
;
styles2
[
i
]
!=
0
;
i
++
)
for
(
i
=
0
;
styles2
[
i
]
!=
0
;
i
++
)
{
{
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
styles2
[
i
],
styles2
[
i
]);
hr
=
INameSpaceTreeControl2_SetControlStyle2
(
pnstc2
,
styles2
[
i
],
styles2
[
i
]);
ok
(
hr
==
S_OK
,
"Got 0x%08x (%x)
\n
"
,
hr
,
styles2
[
i
]);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x (%x)
\n
"
,
hr
,
styles2
[
i
]);
if
(
SUCCEEDED
(
hr
))
tmp
|=
styles2
[
i
];
if
(
SUCCEEDED
(
hr
))
tmp
|=
styles2
[
i
];
}
}
style2
=
0xdeadbeef
;
style2
=
0xdeadbeef
;
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
&
style2
);
hr
=
INameSpaceTreeControl2_GetControlStyle2
(
pnstc2
,
0xFFFFFFFF
,
&
style2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
style2
==
tmp
,
"Got style %x
\n
"
,
style2
);
ok
(
style2
==
tmp
,
"Got style %x
\n
"
,
style2
);
}
}
...
@@ -1051,7 +1051,7 @@ static void test_basics(void)
...
@@ -1051,7 +1051,7 @@ static void test_basics(void)
}
}
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
NULL
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
NULL
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_NOINTERFACE
,
"Got (0x%08
l
x)
\n
"
,
hr
);
/* Append / Insert root */
/* Append / Insert root */
if
(
0
)
if
(
0
)
...
@@ -1063,43 +1063,43 @@ static void test_basics(void)
...
@@ -1063,43 +1063,43 @@ static void test_basics(void)
/* Note the usage of psidesktop and psidesktop2 */
/* Note the usage of psidesktop and psidesktop2 */
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop2
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop2
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
hr
=
INameSpaceTreeControl_RemoveRoot
(
pnstc
,
psidesktop
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
0
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
0
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
-
1
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
-
1
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
-
1
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
-
1
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
50
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
50
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
1
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
1
,
psidesktop
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
/* GetRootItems */
/* GetRootItems */
if
(
0
)
if
(
0
)
...
@@ -1109,16 +1109,16 @@ static void test_basics(void)
...
@@ -1109,16 +1109,16 @@ static void test_basics(void)
}
}
hr
=
INameSpaceTreeControl_GetRootItems
(
pnstc
,
&
psia
);
hr
=
INameSpaceTreeControl_GetRootItems
(
pnstc
,
&
psia
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
0
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop2
,
0
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop2
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
0
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir2
,
0
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir2
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
roots
[
0
]
=
psidesktop
;
roots
[
0
]
=
psidesktop
;
roots
[
1
]
=
psidesktop2
;
roots
[
1
]
=
psidesktop2
;
...
@@ -1128,7 +1128,7 @@ static void test_basics(void)
...
@@ -1128,7 +1128,7 @@ static void test_basics(void)
verify_root_order
(
pnstc
,
roots
);
verify_root_order
(
pnstc
,
roots
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
0
,
psitestdir2
,
0
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
0
,
psitestdir2
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
roots
[
0
]
=
psitestdir2
;
roots
[
0
]
=
psitestdir2
;
roots
[
1
]
=
psidesktop
;
roots
[
1
]
=
psidesktop
;
...
@@ -1139,7 +1139,7 @@ static void test_basics(void)
...
@@ -1139,7 +1139,7 @@ static void test_basics(void)
verify_root_order
(
pnstc
,
roots
);
verify_root_order
(
pnstc
,
roots
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
5
,
psidesktop
,
0
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
5
,
psidesktop
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
roots
[
0
]
=
psitestdir2
;
roots
[
0
]
=
psitestdir2
;
roots
[
1
]
=
psidesktop
;
roots
[
1
]
=
psidesktop
;
...
@@ -1151,7 +1151,7 @@ static void test_basics(void)
...
@@ -1151,7 +1151,7 @@ static void test_basics(void)
verify_root_order
(
pnstc
,
roots
);
verify_root_order
(
pnstc
,
roots
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
3
,
psitestdir2
,
0
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
3
,
psitestdir2
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
roots
[
0
]
=
psitestdir2
;
roots
[
0
]
=
psitestdir2
;
roots
[
1
]
=
psidesktop
;
roots
[
1
]
=
psidesktop
;
...
@@ -1164,7 +1164,7 @@ static void test_basics(void)
...
@@ -1164,7 +1164,7 @@ static void test_basics(void)
verify_root_order
(
pnstc
,
roots
);
verify_root_order
(
pnstc
,
roots
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir2
,
0
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir2
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
roots
[
0
]
=
psitestdir2
;
roots
[
0
]
=
psitestdir2
;
roots
[
1
]
=
psidesktop
;
roots
[
1
]
=
psidesktop
;
...
@@ -1178,7 +1178,7 @@ static void test_basics(void)
...
@@ -1178,7 +1178,7 @@ static void test_basics(void)
verify_root_order
(
pnstc
,
roots
);
verify_root_order
(
pnstc
,
roots
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
-
1
,
psidesktop
,
0
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_InsertRoot
(
pnstc
,
-
1
,
psidesktop
,
0
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
roots
[
0
]
=
psidesktop
;
roots
[
0
]
=
psidesktop
;
roots
[
1
]
=
psitestdir2
;
roots
[
1
]
=
psitestdir2
;
...
@@ -1194,13 +1194,13 @@ static void test_basics(void)
...
@@ -1194,13 +1194,13 @@ static void test_basics(void)
/* CollapseAll */
/* CollapseAll */
hr
=
INameSpaceTreeControl_CollapseAll
(
pnstc
);
hr
=
INameSpaceTreeControl_CollapseAll
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_CollapseAll
(
pnstc
);
hr
=
INameSpaceTreeControl_CollapseAll
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
/* SetItemState message checks */
/* SetItemState message checks */
res
=
subclass_treeview
(
pnstc
);
res
=
subclass_treeview
(
pnstc
);
...
@@ -1211,7 +1211,7 @@ static void test_basics(void)
...
@@ -1211,7 +1211,7 @@ static void test_basics(void)
hr
=
INameSpaceTreeControl_AppendRoot
(
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_NONFOLDERS
|
SHCONTF_FOLDERS
,
0
,
NULL
);
pnstc
,
psidesktop
,
SHCONTF_NONFOLDERS
|
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
/* A special case -
/* A special case -
...
@@ -1221,7 +1221,7 @@ static void test_basics(void)
...
@@ -1221,7 +1221,7 @@ static void test_basics(void)
tvi_count
=
0
;
tvi_count
=
0
;
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_EXPANDED
,
NSTCIS_EXPANDED
);
NSTCIS_EXPANDED
,
NSTCIS_EXPANDED
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
todo_wine
todo_wine
{
{
ok
(
tvi_count
==
1
,
"Got %d
\n
"
,
tvi_count
);
ok
(
tvi_count
==
1
,
"Got %d
\n
"
,
tvi_count
);
...
@@ -1231,7 +1231,7 @@ static void test_basics(void)
...
@@ -1231,7 +1231,7 @@ static void test_basics(void)
tvi_count
=
0
;
tvi_count
=
0
;
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_EXPANDED
,
NSTCIS_EXPANDED
);
NSTCIS_EXPANDED
,
NSTCIS_EXPANDED
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
tvi_count
==
0
,
"Got %d
\n
"
,
tvi_count
);
ok
(
tvi_count
==
0
,
"Got %d
\n
"
,
tvi_count
);
/* Test all the combinations of NSTCIS_SELECTED to NSTCIS_SELECTEDNOEXPAND */
/* Test all the combinations of NSTCIS_SELECTED to NSTCIS_SELECTEDNOEXPAND */
...
@@ -1248,7 +1248,7 @@ static void test_basics(void)
...
@@ -1248,7 +1248,7 @@ static void test_basics(void)
tvi_count
=
0
;
tvi_count
=
0
;
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
isMask
,
isFlags
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
isMask
,
isFlags
);
ok
(
hr
==
S_OK
,
"(%x|%x)Got 0x%08x
\n
"
,
isMask
,
isFlags
,
hr
);
ok
(
hr
==
S_OK
,
"(%x|%x)Got 0x%08
l
x
\n
"
,
isMask
,
isFlags
,
hr
);
/*****************************/
/*****************************/
/* Calculate expected values */
/* Calculate expected values */
...
@@ -1341,7 +1341,7 @@ static void test_basics(void)
...
@@ -1341,7 +1341,7 @@ static void test_basics(void)
}
}
}
}
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
}
}
/* GetSelectedItems */
/* GetSelectedItems */
...
@@ -1353,38 +1353,38 @@ static void test_basics(void)
...
@@ -1353,38 +1353,38 @@ static void test_basics(void)
psia
=
(
void
*
)
0xdeadbeef
;
psia
=
(
void
*
)
0xdeadbeef
;
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
ok
(
hr
==
E_FAIL
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
!
psia
||
broken
(
psia
==
(
void
*
)
0xdeadbeef
/* before Win8 */
),
"Got %p
\n
"
,
psia
);
ok
(
!
psia
||
broken
(
psia
==
(
void
*
)
0xdeadbeef
/* before Win8 */
),
"Got %p
\n
"
,
psia
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir2
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir2
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
SHCONTF_FOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
SHCONTF_FOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psitestdir
,
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psitestdir
,
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
DWORD
count
;
DWORD
count
;
hr
=
IShellItemArray_GetCount
(
psia
,
&
count
);
hr
=
IShellItemArray_GetCount
(
psia
,
&
count
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
count
==
1
,
"Got %d selected items.
\n
"
,
count
);
ok
(
count
==
1
,
"Got %
l
d selected items.
\n
"
,
count
);
if
(
count
)
if
(
count
)
{
{
hr
=
IShellItemArray_GetItemAt
(
psia
,
0
,
&
psi
);
hr
=
IShellItemArray_GetItemAt
(
psia
,
0
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
int
cmp
;
int
cmp
;
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
}
}
...
@@ -1393,26 +1393,26 @@ static void test_basics(void)
...
@@ -1393,26 +1393,26 @@ static void test_basics(void)
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psitestdir2
,
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psitestdir2
,
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
process_msgs
();
process_msgs
();
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
DWORD
count
;
DWORD
count
;
hr
=
IShellItemArray_GetCount
(
psia
,
&
count
);
hr
=
IShellItemArray_GetCount
(
psia
,
&
count
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
count
==
1
,
"Got %d selected items.
\n
"
,
count
);
ok
(
count
==
1
,
"Got %
l
d selected items.
\n
"
,
count
);
if
(
count
)
if
(
count
)
{
{
hr
=
IShellItemArray_GetItemAt
(
psia
,
0
,
&
psi
);
hr
=
IShellItemArray_GetItemAt
(
psia
,
0
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
int
cmp
;
int
cmp
;
hr
=
IShellItem_Compare
(
psi
,
psitestdir2
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir2
,
SICHINT_DISPLAY
,
&
cmp
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
}
}
...
@@ -1421,24 +1421,24 @@ static void test_basics(void)
...
@@ -1421,24 +1421,24 @@ static void test_basics(void)
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psitest1
,
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psitest1
,
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
todo_wine
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
DWORD
count
;
DWORD
count
;
hr
=
IShellItemArray_GetCount
(
psia
,
&
count
);
hr
=
IShellItemArray_GetCount
(
psia
,
&
count
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
count
==
1
,
"Got %d selected items.
\n
"
,
count
);
ok
(
count
==
1
,
"Got %
l
d selected items.
\n
"
,
count
);
if
(
count
)
if
(
count
)
{
{
hr
=
IShellItemArray_GetItemAt
(
psia
,
0
,
&
psi
);
hr
=
IShellItemArray_GetItemAt
(
psia
,
0
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
int
cmp
;
int
cmp
;
hr
=
IShellItem_Compare
(
psi
,
psitest1
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitest1
,
SICHINT_DISPLAY
,
&
cmp
);
todo_wine
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
}
}
...
@@ -1446,44 +1446,44 @@ static void test_basics(void)
...
@@ -1446,44 +1446,44 @@ static void test_basics(void)
}
}
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_FAIL
),
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_FAIL
),
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
hr
==
E_FAIL
)
if
(
hr
==
E_FAIL
)
{
{
/* For some reason, Vista fails to properly remove both the
/* For some reason, Vista fails to properly remove both the
* roots here on the first try. */
* roots here on the first try. */
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
}
}
/* Adding without NSTCRS_EXPANDED does not set the selection */
/* Adding without NSTCRS_EXPANDED does not set the selection */
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
process_msgs
();
process_msgs
();
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psitestdir
,
0xFF
,
&
istate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psitestdir
,
0xFF
,
&
istate
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
!
(
istate
&
NSTCIS_SELECTED
),
"Got 0x%08x
\n
"
,
istate
);
ok
(
!
(
istate
&
NSTCIS_SELECTED
),
"Got 0x%08
l
x
\n
"
,
istate
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
ok
(
hr
==
E_FAIL
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IShellItemArray_Release
(
psia
);
if
(
SUCCEEDED
(
hr
))
IShellItemArray_Release
(
psia
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
/* Adding with NSTCRS_EXPANDED sets the selection */
/* Adding with NSTCRS_EXPANDED sets the selection */
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
NSTCRS_EXPANDED
,
NULL
);
NSTCRS_EXPANDED
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
process_msgs
();
process_msgs
();
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psitestdir
,
0xFF
,
&
istate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psitestdir
,
0xFF
,
&
istate
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
todo_wine
ok
(
istate
&
NSTCIS_SELECTED
,
"Got 0x%08x
\n
"
,
istate
);
todo_wine
ok
(
istate
&
NSTCIS_SELECTED
,
"Got 0x%08
l
x
\n
"
,
istate
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
todo_wine
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
IShellItem
*
psi
;
IShellItem
*
psi
;
...
@@ -1493,7 +1493,7 @@ static void test_basics(void)
...
@@ -1493,7 +1493,7 @@ static void test_basics(void)
{
{
INT
cmp
;
INT
cmp
;
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
...
@@ -1505,14 +1505,14 @@ static void test_basics(void)
...
@@ -1505,14 +1505,14 @@ static void test_basics(void)
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir2
,
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir2
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
NSTCRS_EXPANDED
,
NULL
);
NSTCRS_EXPANDED
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
process_msgs
();
process_msgs
();
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psitestdir2
,
0xFF
,
&
istate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psitestdir2
,
0xFF
,
&
istate
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
!
(
istate
&
NSTCIS_SELECTED
),
"Got 0x%08x
\n
"
,
istate
);
ok
(
!
(
istate
&
NSTCIS_SELECTED
),
"Got 0x%08
l
x
\n
"
,
istate
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
hr
=
INameSpaceTreeControl_GetSelectedItems
(
pnstc
,
&
psia
);
todo_wine
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
IShellItem
*
psi
;
IShellItem
*
psi
;
...
@@ -1522,7 +1522,7 @@ static void test_basics(void)
...
@@ -1522,7 +1522,7 @@ static void test_basics(void)
{
{
INT
cmp
;
INT
cmp
;
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
...
@@ -1531,7 +1531,7 @@ static void test_basics(void)
...
@@ -1531,7 +1531,7 @@ static void test_basics(void)
}
}
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
/* GetItemRect */
/* GetItemRect */
SetRectEmpty
(
&
rc
);
SetRectEmpty
(
&
rc
);
...
@@ -1544,16 +1544,16 @@ static void test_basics(void)
...
@@ -1544,16 +1544,16 @@ static void test_basics(void)
}
}
hr
=
INameSpaceTreeControl_GetItemRect
(
pnstc
,
psitestdir
,
&
rc
);
hr
=
INameSpaceTreeControl_GetItemRect
(
pnstc
,
psitestdir
,
&
rc
);
ok
(
hr
==
E_INVALIDARG
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
NSTCRS_EXPANDED
,
NULL
);
NSTCRS_EXPANDED
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
process_msgs
();
process_msgs
();
hr
=
INameSpaceTreeControl_GetItemRect
(
pnstc
,
psitestdir
,
&
rc
);
hr
=
INameSpaceTreeControl_GetItemRect
(
pnstc
,
psitestdir
,
&
rc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
rc
.
top
!=
rc
.
bottom
,
"Got 0 height.
\n
"
);
ok
(
rc
.
top
!=
rc
.
bottom
,
"Got 0 height.
\n
"
);
ok
(
rc
.
left
!=
rc
.
right
,
"Got 0 width.
\n
"
);
ok
(
rc
.
left
!=
rc
.
right
,
"Got 0 width.
\n
"
);
...
@@ -1587,90 +1587,90 @@ static void test_basics(void)
...
@@ -1587,90 +1587,90 @@ static void test_basics(void)
win_skip
(
"Skipping some GetItemRect tests.
\n
"
);
win_skip
(
"Skipping some GetItemRect tests.
\n
"
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
/* HitTest */
/* HitTest */
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
NULL
,
NULL
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
NULL
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
NULL
,
&
psi
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
NULL
,
&
psi
);
ok
(
hr
==
E_POINTER
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Got 0x%08
l
x
\n
"
,
hr
);
psi
=
(
void
*
)
0xdeadbeef
;
psi
=
(
void
*
)
0xdeadbeef
;
pt
.
x
=
pt
.
y
=
0
;
pt
.
x
=
pt
.
y
=
0
;
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
ok
(
hr
==
S_FALSE
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
psi
==
NULL
,
"Got psi %p
\n
"
,
psi
);
ok
(
psi
==
NULL
,
"Got psi %p
\n
"
,
psi
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psitestdir
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
NSTCRS_EXPANDED
,
NULL
);
NSTCRS_EXPANDED
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
process_msgs
();
process_msgs
();
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
int
cmp
;
int
cmp
;
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
!
cmp
,
"Got cmp %d
\n
"
,
cmp
);
ok
(
!
cmp
,
"Got cmp %d
\n
"
,
cmp
);
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
pt
.
y
+=
height
-
1
;
pt
.
y
+=
height
-
1
;
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
int
cmp
;
int
cmp
;
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
!
cmp
,
"Got cmp %d
\n
"
,
cmp
);
ok
(
!
cmp
,
"Got cmp %d
\n
"
,
cmp
);
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
pt
.
y
+=
1
;
pt
.
y
+=
1
;
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
int
cmp
;
int
cmp
;
todo_wine
todo_wine
{
{
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir
,
SICHINT_DISPLAY
,
&
cmp
);
ok
(
hr
==
S_FALSE
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_FALSE
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
cmp
,
"no cmp value.
\n
"
);
ok
(
cmp
,
"no cmp value.
\n
"
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir2
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir2
,
SICHINT_DISPLAY
,
&
cmp
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
!
cmp
,
"Got cmp %d
\n
"
,
cmp
);
ok
(
!
cmp
,
"Got cmp %d
\n
"
,
cmp
);
}
}
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
hr
=
INameSpaceTreeControl_GetItemRect
(
pnstc
,
psitestdir2
,
&
rc
);
hr
=
INameSpaceTreeControl_GetItemRect
(
pnstc
,
psitestdir2
,
&
rc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
MapWindowPoints
(
NULL
,
hwnd
,
(
POINT
*
)
&
rc
,
2
);
MapWindowPoints
(
NULL
,
hwnd
,
(
POINT
*
)
&
rc
,
2
);
pt
.
x
=
rc
.
left
;
pt
.
y
=
rc
.
top
;
pt
.
x
=
rc
.
left
;
pt
.
y
=
rc
.
top
;
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
hr
=
INameSpaceTreeControl_HitTest
(
pnstc
,
&
pt
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
int
cmp
;
int
cmp
;
hr
=
IShellItem_Compare
(
psi
,
psitestdir2
,
SICHINT_DISPLAY
,
&
cmp
);
hr
=
IShellItem_Compare
(
psi
,
psitestdir2
,
SICHINT_DISPLAY
,
&
cmp
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
!
cmp
,
"Got cmp %d
\n
"
,
cmp
);
ok
(
!
cmp
,
"Got cmp %d
\n
"
,
cmp
);
IShellItem_Release
(
psi
);
IShellItem_Release
(
psi
);
}
}
}
}
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
/* GetItemCustomState / SetItemCustomState */
/* GetItemCustomState / SetItemCustomState */
if
(
0
)
if
(
0
)
...
@@ -1686,30 +1686,30 @@ static void test_basics(void)
...
@@ -1686,30 +1686,30 @@ static void test_basics(void)
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
0
,
NULL
);
process_msgs
();
process_msgs
();
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
todo_wine
todo_wine
{
{
cbstate
=
-
1
;
cbstate
=
-
1
;
hr
=
INameSpaceTreeControl_GetItemCustomState
(
pnstc
,
psitestdir
,
&
cbstate
);
hr
=
INameSpaceTreeControl_GetItemCustomState
(
pnstc
,
psitestdir
,
&
cbstate
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
cbstate
==
BST_UNCHECKED
||
broken
(
cbstate
==
BST_CHECKED
/* Vista x64 */
),
ok
(
cbstate
==
BST_UNCHECKED
||
broken
(
cbstate
==
BST_CHECKED
/* Vista x64 */
),
"Got %d
\n
"
,
cbstate
);
"Got %d
\n
"
,
cbstate
);
hr
=
INameSpaceTreeControl_SetItemCustomState
(
pnstc
,
psitestdir
,
BST_CHECKED
);
hr
=
INameSpaceTreeControl_SetItemCustomState
(
pnstc
,
psitestdir
,
BST_CHECKED
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
cbstate
=
-
1
;
cbstate
=
-
1
;
hr
=
INameSpaceTreeControl_GetItemCustomState
(
pnstc
,
psitestdir
,
&
cbstate
);
hr
=
INameSpaceTreeControl_GetItemCustomState
(
pnstc
,
psitestdir
,
&
cbstate
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
cbstate
==
BST_CHECKED
,
"Got %d
\n
"
,
cbstate
);
ok
(
cbstate
==
BST_CHECKED
,
"Got %d
\n
"
,
cbstate
);
hr
=
INameSpaceTreeControl_SetItemCustomState
(
pnstc
,
psitestdir
,
0xFFF
);
hr
=
INameSpaceTreeControl_SetItemCustomState
(
pnstc
,
psitestdir
,
0xFFF
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
cbstate
=
-
1
;
cbstate
=
-
1
;
hr
=
INameSpaceTreeControl_GetItemCustomState
(
pnstc
,
psitestdir
,
&
cbstate
);
hr
=
INameSpaceTreeControl_GetItemCustomState
(
pnstc
,
psitestdir
,
&
cbstate
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok
(
cbstate
==
0xF
,
"Got %d
\n
"
,
cbstate
);
ok
(
cbstate
==
0xF
,
"Got %d
\n
"
,
cbstate
);
}
}
...
@@ -1717,15 +1717,15 @@ static void test_basics(void)
...
@@ -1717,15 +1717,15 @@ static void test_basics(void)
todo_wine
todo_wine
{
{
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
NULL
);
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
NULL
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
L"Explorer"
);
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
L"Explorer"
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
L"__hello"
);
hr
=
INameSpaceTreeControl_SetTheme
(
pnstc
,
L"__hello"
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
}
}
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
IShellItem_Release
(
psidesktop
);
IShellItem_Release
(
psidesktop
);
IShellItem_Release
(
psidesktop2
);
IShellItem_Release
(
psidesktop2
);
...
@@ -1734,12 +1734,12 @@ static void test_basics(void)
...
@@ -1734,12 +1734,12 @@ static void test_basics(void)
IShellItem_Release
(
psitest1
);
IShellItem_Release
(
psitest1
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
HWND
hwnd_nstc
;
HWND
hwnd_nstc
;
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_nstc
);
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_nstc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
DestroyWindow
(
hwnd_nstc
);
DestroyWindow
(
hwnd_nstc
);
IOleWindow_Release
(
pow
);
IOleWindow_Release
(
pow
);
}
}
...
@@ -1770,7 +1770,7 @@ static void test_events(void)
...
@@ -1770,7 +1770,7 @@ static void test_events(void)
hr
=
CoCreateInstance
(
&
CLSID_NamespaceTreeControl
,
NULL
,
CLSCTX_INPROC_SERVER
,
hr
=
CoCreateInstance
(
&
CLSID_NamespaceTreeControl
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_INameSpaceTreeControl
,
(
void
**
)
&
pnstc
);
&
IID_INameSpaceTreeControl
,
(
void
**
)
&
pnstc
);
ok
(
hr
==
S_OK
,
"Failed to initialize control (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to initialize control (0x%08
l
x)
\n
"
,
hr
);
ok
(
pSHCreateShellItem
!=
NULL
,
"No SHCreateShellItem.
\n
"
);
ok
(
pSHCreateShellItem
!=
NULL
,
"No SHCreateShellItem.
\n
"
);
ok
(
pSHGetIDListFromObject
!=
NULL
,
"No SHCreateShellItem.
\n
"
);
ok
(
pSHGetIDListFromObject
!=
NULL
,
"No SHCreateShellItem.
\n
"
);
...
@@ -1778,9 +1778,9 @@ static void test_events(void)
...
@@ -1778,9 +1778,9 @@ static void test_events(void)
SHGetDesktopFolder
(
&
psfdesktop
);
SHGetDesktopFolder
(
&
psfdesktop
);
hr
=
pSHGetIDListFromObject
((
IUnknown
*
)
psfdesktop
,
&
pidl_desktop
);
hr
=
pSHGetIDListFromObject
((
IUnknown
*
)
psfdesktop
,
&
pidl_desktop
);
IShellFolder_Release
(
psfdesktop
);
IShellFolder_Release
(
psfdesktop
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_desktop
,
&
psidesktop
);
hr
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_desktop
,
&
psidesktop
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ILFree
(
pidl_desktop
);
ILFree
(
pidl_desktop
);
/* Create two instances of INameSpaceTreeControlEvents */
/* Create two instances of INameSpaceTreeControlEvents */
...
@@ -1807,80 +1807,80 @@ static void test_events(void)
...
@@ -1807,80 +1807,80 @@ static void test_events(void)
pnstceimpl
->
qi_called_count
=
0
;
pnstceimpl
->
qi_called_count
=
0
;
cookie1
=
1
;
cookie1
=
1
;
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce
,
&
cookie1
);
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce
,
&
cookie1
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
cookie1
==
0
,
"cookie now (0x%08x)
\n
"
,
cookie1
);
ok
(
cookie1
==
0
,
"cookie now (0x%08
l
x)
\n
"
,
cookie1
);
ok
(
pnstceimpl
->
qi_called_count
>
1
,
"got %d
\n
"
,
pnstceimpl
->
qi_called_count
);
ok
(
pnstceimpl
->
qi_called_count
>
1
,
"got %d
\n
"
,
pnstceimpl
->
qi_called_count
);
ok
(
pnstceimpl
->
ref
==
1
,
"refcount was %d
\n
"
,
pnstceimpl
->
ref
);
ok
(
pnstceimpl
->
ref
==
1
,
"refcount was %
l
d
\n
"
,
pnstceimpl
->
ref
);
/* Accept query for IID_INameSpaceTreeControlEvents */
/* Accept query for IID_INameSpaceTreeControlEvents */
pnstceimpl
->
qi_enable_events
=
TRUE
;
pnstceimpl
->
qi_enable_events
=
TRUE
;
pnstceimpl
->
qi_called_count
=
0
;
pnstceimpl
->
qi_called_count
=
0
;
cookie1
=
0
;
cookie1
=
0
;
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce
,
&
cookie1
);
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce
,
&
cookie1
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
cookie1
==
1
,
"cookie now (0x%08x)
\n
"
,
cookie1
);
ok
(
cookie1
==
1
,
"cookie now (0x%08
l
x)
\n
"
,
cookie1
);
ok
(
pnstceimpl
->
qi_called_count
>
1
,
"got %d
\n
"
,
pnstceimpl
->
qi_called_count
);
ok
(
pnstceimpl
->
qi_called_count
>
1
,
"got %d
\n
"
,
pnstceimpl
->
qi_called_count
);
ok
(
pnstceimpl
->
ref
==
2
,
"refcount was %d
\n
"
,
pnstceimpl
->
ref
);
ok
(
pnstceimpl
->
ref
==
2
,
"refcount was %
l
d
\n
"
,
pnstceimpl
->
ref
);
/* A second time, query interface will not be called at all. */
/* A second time, query interface will not be called at all. */
pnstceimpl
->
qi_enable_events
=
TRUE
;
pnstceimpl
->
qi_enable_events
=
TRUE
;
pnstceimpl
->
qi_called_count
=
0
;
pnstceimpl
->
qi_called_count
=
0
;
cookie2
=
1
;
cookie2
=
1
;
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce
,
&
cookie2
);
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce
,
&
cookie2
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
cookie2
==
0
,
"cookie now (0x%08x)
\n
"
,
cookie2
);
ok
(
cookie2
==
0
,
"cookie now (0x%08
l
x)
\n
"
,
cookie2
);
ok
(
!
pnstceimpl
->
qi_called_count
,
"QueryInterface called %d times.
\n
"
,
ok
(
!
pnstceimpl
->
qi_called_count
,
"QueryInterface called %d times.
\n
"
,
pnstceimpl
->
qi_called_count
);
pnstceimpl
->
qi_called_count
);
ok
(
pnstceimpl
->
ref
==
2
,
"refcount was %d
\n
"
,
pnstceimpl
->
ref
);
ok
(
pnstceimpl
->
ref
==
2
,
"refcount was %
l
d
\n
"
,
pnstceimpl
->
ref
);
/* Using another "instance" does not help. */
/* Using another "instance" does not help. */
pnstceimpl2
->
qi_enable_events
=
TRUE
;
pnstceimpl2
->
qi_enable_events
=
TRUE
;
pnstceimpl2
->
qi_called_count
=
0
;
pnstceimpl2
->
qi_called_count
=
0
;
cookie2
=
1
;
cookie2
=
1
;
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce2
,
&
cookie2
);
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce2
,
&
cookie2
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
cookie2
==
0
,
"cookie now (0x%08x)
\n
"
,
cookie2
);
ok
(
cookie2
==
0
,
"cookie now (0x%08
l
x)
\n
"
,
cookie2
);
ok
(
!
pnstceimpl2
->
qi_called_count
,
"QueryInterface called %d times.
\n
"
,
ok
(
!
pnstceimpl2
->
qi_called_count
,
"QueryInterface called %d times.
\n
"
,
pnstceimpl2
->
qi_called_count
);
pnstceimpl2
->
qi_called_count
);
ok
(
pnstceimpl2
->
ref
==
1
,
"refcount was %d
\n
"
,
pnstceimpl
->
ref
);
ok
(
pnstceimpl2
->
ref
==
1
,
"refcount was %
l
d
\n
"
,
pnstceimpl
->
ref
);
/* Unadvise with bogus cookie (will actually unadvise properly) */
/* Unadvise with bogus cookie (will actually unadvise properly) */
pnstceimpl
->
qi_enable_events
=
TRUE
;
pnstceimpl
->
qi_enable_events
=
TRUE
;
pnstceimpl
->
qi_called_count
=
0
;
pnstceimpl
->
qi_called_count
=
0
;
hr
=
INameSpaceTreeControl_TreeUnadvise
(
pnstc
,
1234
);
hr
=
INameSpaceTreeControl_TreeUnadvise
(
pnstc
,
1234
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
!
pnstceimpl
->
qi_called_count
,
"QueryInterface called %d times.
\n
"
,
ok
(
!
pnstceimpl
->
qi_called_count
,
"QueryInterface called %d times.
\n
"
,
pnstceimpl
->
qi_called_count
);
pnstceimpl
->
qi_called_count
);
ok
(
pnstceimpl
->
ref
==
1
,
"refcount was %d
\n
"
,
pnstceimpl
->
ref
);
ok
(
pnstceimpl
->
ref
==
1
,
"refcount was %
l
d
\n
"
,
pnstceimpl
->
ref
);
/* Unadvise "properly" (will have no additional effect) */
/* Unadvise "properly" (will have no additional effect) */
pnstceimpl
->
qi_enable_events
=
TRUE
;
pnstceimpl
->
qi_enable_events
=
TRUE
;
pnstceimpl
->
qi_called_count
=
0
;
pnstceimpl
->
qi_called_count
=
0
;
hr
=
INameSpaceTreeControl_TreeUnadvise
(
pnstc
,
cookie1
);
hr
=
INameSpaceTreeControl_TreeUnadvise
(
pnstc
,
cookie1
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
!
pnstceimpl
->
qi_called_count
,
"QueryInterface called %d times.
\n
"
,
ok
(
!
pnstceimpl
->
qi_called_count
,
"QueryInterface called %d times.
\n
"
,
pnstceimpl
->
qi_called_count
);
pnstceimpl
->
qi_called_count
);
ok
(
pnstceimpl
->
ref
==
1
,
"refcount was %d
\n
"
,
pnstceimpl
->
ref
);
ok
(
pnstceimpl
->
ref
==
1
,
"refcount was %
l
d
\n
"
,
pnstceimpl
->
ref
);
/* Advise again.. */
/* Advise again.. */
pnstceimpl
->
qi_enable_events
=
1
;
pnstceimpl
->
qi_enable_events
=
1
;
pnstceimpl
->
qi_called_count
=
0
;
pnstceimpl
->
qi_called_count
=
0
;
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce
,
&
cookie2
);
hr
=
INameSpaceTreeControl_TreeAdvise
(
pnstc
,
(
IUnknown
*
)
pnstce
,
&
cookie2
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
cookie2
==
1
,
"Cookie is %d
\n
"
,
cookie2
);
ok
(
cookie2
==
1
,
"Cookie is %
l
d
\n
"
,
cookie2
);
ok
(
cookie1
==
cookie2
,
"Old cookie differs from old cookie.
\n
"
);
ok
(
cookie1
==
cookie2
,
"Old cookie differs from old cookie.
\n
"
);
/* several kinds of callbacks are queried for */
/* several kinds of callbacks are queried for */
ok
(
pnstceimpl
->
qi_called_count
>
1
,
"got %d
\n
"
,
pnstceimpl
->
qi_called_count
);
ok
(
pnstceimpl
->
qi_called_count
>
1
,
"got %d
\n
"
,
pnstceimpl
->
qi_called_count
);
ok
(
pnstceimpl
->
ref
==
2
,
"refcount was %d
\n
"
,
pnstceimpl
->
ref
);
ok
(
pnstceimpl
->
ref
==
2
,
"refcount was %
l
d
\n
"
,
pnstceimpl
->
ref
);
/* Initialize the control */
/* Initialize the control */
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
hwnd
,
NULL
,
0
);
hr
=
INameSpaceTreeControl_Initialize
(
pnstc
,
hwnd
,
NULL
,
0
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_event_count
(
pnstceimpl
,
OnGetDefaultIconIndex
,
0
);
ok_event_count
(
pnstceimpl
,
OnGetDefaultIconIndex
,
0
);
...
@@ -1946,27 +1946,27 @@ static void test_events(void)
...
@@ -1946,27 +1946,27 @@ static void test_events(void)
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
process_msgs
();
process_msgs
();
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
ok_event
(
pnstceimpl
,
OnItemDeleted
);
ok_event
(
pnstceimpl
,
OnItemDeleted
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
/* Expand the root */
/* Expand the root */
itemstate
|=
NSTCIS_EXPANDED
;
itemstate
|=
NSTCIS_EXPANDED
;
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
itemstate
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_event_count
(
pnstceimpl
,
OnBeforeExpand
,
1
);
ok_event_count
(
pnstceimpl
,
OnBeforeExpand
,
1
);
ok_event_broken
(
pnstceimpl
,
OnItemAdded
);
/* Does not fire on Vista */
ok_event_broken
(
pnstceimpl
,
OnItemAdded
);
/* Does not fire on Vista */
...
@@ -1978,13 +1978,13 @@ static void test_events(void)
...
@@ -1978,13 +1978,13 @@ static void test_events(void)
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
&
NSTCIS_EXPANDED
,
"Item not expanded.
\n
"
);
ok
(
itemstate
&
NSTCIS_EXPANDED
,
"Item not expanded.
\n
"
);
todo_wine
todo_wine
{
{
ok
(
itemstate
==
(
NSTCIS_SELECTED
|
NSTCIS_EXPANDED
)
||
ok
(
itemstate
==
(
NSTCIS_SELECTED
|
NSTCIS_EXPANDED
)
||
broken
(
itemstate
==
NSTCIS_EXPANDED
)
/* Vista */
,
broken
(
itemstate
==
NSTCIS_EXPANDED
)
/* Vista */
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
process_msgs
();
process_msgs
();
ok_event_count_broken
(
pnstceimpl
,
OnSelectionChanged
,
1
,
0
/* Vista*/
);
ok_event_count_broken
(
pnstceimpl
,
OnSelectionChanged
,
1
,
0
/* Vista*/
);
}
}
...
@@ -1993,22 +1993,22 @@ static void test_events(void)
...
@@ -1993,22 +1993,22 @@ static void test_events(void)
/* Deselect the root */
/* Deselect the root */
itemstate
&=
~
NSTCIS_SELECTED
;
itemstate
&=
~
NSTCIS_SELECTED
;
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
itemstate
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
(
NSTCIS_EXPANDED
),
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
(
NSTCIS_EXPANDED
),
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_CollapseAll
(
pnstc
);
hr
=
INameSpaceTreeControl_CollapseAll
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
/* Delete all roots */
/* Delete all roots */
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
1
);
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
1
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
...
@@ -2026,26 +2026,26 @@ static void test_events(void)
...
@@ -2026,26 +2026,26 @@ static void test_events(void)
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08
l
x)
\n
"
,
hr
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0
,
0xffff
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0
,
0xffff
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
todo_wine
todo_wine
{
{
...
@@ -2057,69 +2057,69 @@ static void test_events(void)
...
@@ -2057,69 +2057,69 @@ static void test_events(void)
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
todo_wine
todo_wine
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
NSTCIS_SELECTED
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
NSTCIS_SELECTED
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_event_count
(
pnstceimpl
,
OnSelectionChanged
,
1
);
ok_event_count
(
pnstceimpl
,
OnSelectionChanged
,
1
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_SELECTED
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_SELECTED
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_EXPANDED
,
NSTCIS_SELECTED
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_EXPANDED
,
NSTCIS_SELECTED
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_SELECTED
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_SELECTED
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_SELECTED
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_SELECTED
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
NSTCIS_SELECTEDNOEXPAND
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
NSTCIS_SELECTEDNOEXPAND
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_SELECTED
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_SELECTED
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
NSTCIS_EXPANDED
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
NSTCIS_EXPANDED
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
todo_wine
todo_wine
{
{
...
@@ -2131,111 +2131,111 @@ static void test_events(void)
...
@@ -2131,111 +2131,111 @@ static void test_events(void)
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_EXPANDED
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_EXPANDED
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_NONE
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0xffff
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
,
0xffff
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
todo_wine
todo_wine
{
{
ok
(
itemstate
==
(
NSTCIS_EXPANDED
|
NSTCIS_BOLD
|
NSTCIS_DISABLED
),
ok
(
itemstate
==
(
NSTCIS_EXPANDED
|
NSTCIS_BOLD
|
NSTCIS_DISABLED
),
"itemstate is 0x%08x
\n
"
,
itemstate
);
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
}
}
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
todo_wine
todo_wine
{
{
ok
(
itemstate
==
(
NSTCIS_EXPANDED
|
NSTCIS_BOLD
|
NSTCIS_DISABLED
),
ok
(
itemstate
==
(
NSTCIS_EXPANDED
|
NSTCIS_BOLD
|
NSTCIS_DISABLED
),
"itemstate is 0x%08x
\n
"
,
itemstate
);
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
}
}
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_SELECTED
|
NSTCIS_DISABLED
,
NSTCIS_SELECTED
);
NSTCIS_SELECTED
|
NSTCIS_DISABLED
,
NSTCIS_SELECTED
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
(
NSTCIS_BOLD
|
NSTCIS_EXPANDED
),
ok
(
itemstate
==
(
NSTCIS_BOLD
|
NSTCIS_EXPANDED
),
"itemstate is 0x%08x
\n
"
,
itemstate
);
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_SELECTED
,
NSTCIS_SELECTED
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
(
NSTCIS_BOLD
|
NSTCIS_EXPANDED
),
ok
(
itemstate
==
(
NSTCIS_BOLD
|
NSTCIS_EXPANDED
),
"itemstate is 0x%08x
\n
"
,
itemstate
);
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
&
~
NSTCIS_DISABLED
,
0
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
0xffff
&
~
NSTCIS_DISABLED
,
0
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
itemstate
=
0xDEADBEEF
;
itemstate
=
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
hr
=
INameSpaceTreeControl_GetItemState
(
pnstc
,
psidesktop
,
0xffff
,
&
itemstate
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
itemstate
==
NSTCIS_BOLD
,
"itemstate is 0x%08x
\n
"
,
itemstate
);
ok
(
itemstate
==
NSTCIS_BOLD
,
"itemstate is 0x%08
l
x
\n
"
,
itemstate
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
1
);
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
1
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
/* GetNextItem */
/* GetNextItem */
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
NULL
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
NULL
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
NULL
,
0
,
&
psi
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
NULL
,
0
,
&
psi
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
0
,
&
psi
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
0
,
&
psi
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
...
@@ -2243,14 +2243,14 @@ static void test_events(void)
...
@@ -2243,14 +2243,14 @@ static void test_events(void)
/* Get child from unexpanded and unfilled parent */
/* Get child from unexpanded and unfilled parent */
psi
=
(
void
*
)
0xDEADBEEF
;
psi
=
(
void
*
)
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
NSTCGNI_CHILD
,
&
psi
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
NSTCGNI_CHILD
,
&
psi
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_FAIL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
(
psi
==
NULL
,
"psi is %p
\n
"
,
psi
);
ok
(
psi
==
NULL
,
"psi is %p
\n
"
,
psi
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
/* Expand and try again */
/* Expand and try again */
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_EXPANDED
,
0xffff
);
hr
=
INameSpaceTreeControl_SetItemState
(
pnstc
,
psidesktop
,
NSTCIS_EXPANDED
,
0xffff
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_event_count
(
pnstceimpl
,
OnBeforeExpand
,
1
);
ok_event_count
(
pnstceimpl
,
OnBeforeExpand
,
1
);
ok_event_broken
(
pnstceimpl
,
OnItemAdded
);
/* Does not fire on Vista */
ok_event_broken
(
pnstceimpl
,
OnItemAdded
);
/* Does not fire on Vista */
...
@@ -2259,14 +2259,14 @@ static void test_events(void)
...
@@ -2259,14 +2259,14 @@ static void test_events(void)
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
psi
=
(
void
*
)
0xDEADBEEF
;
psi
=
(
void
*
)
0xDEADBEEF
;
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
NSTCGNI_CHILD
,
&
psi
);
hr
=
INameSpaceTreeControl_GetNextItem
(
pnstc
,
psidesktop
,
NSTCGNI_CHILD
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok
((
psi
!=
NULL
)
&&
(
psi
!=
(
void
*
)
0xDEADBEEF
),
"psi is %p
\n
"
,
psi
);
ok
((
psi
!=
NULL
)
&&
(
psi
!=
(
void
*
)
0xDEADBEEF
),
"psi is %p
\n
"
,
psi
);
process_msgs
();
process_msgs
();
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
if
(
SUCCEEDED
(
hr
))
IShellItem_Release
(
psi
);
if
(
SUCCEEDED
(
hr
))
IShellItem_Release
(
psi
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
1
);
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
1
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
...
@@ -2278,43 +2278,43 @@ static void test_events(void)
...
@@ -2278,43 +2278,43 @@ static void test_events(void)
}
}
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psidesktop
);
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psidesktop
);
ok
(
hr
==
E_INVALIDARG
||
hr
==
E_FAIL
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
||
hr
==
E_FAIL
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
pSHGetSpecialFolderLocation
(
NULL
,
CSIDL_DRIVES
,
&
pidl_drives
);
hr
=
pSHGetSpecialFolderLocation
(
NULL
,
CSIDL_DRIVES
,
&
pidl_drives
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
hr
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_drives
,
&
psi
);
hr
=
pSHCreateShellItem
(
NULL
,
NULL
,
pidl_drives
,
&
psi
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psi
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psi
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psidesktop
);
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psidesktop
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psi
);
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psi
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
hr
=
INameSpaceTreeControl_AppendRoot
(
pnstc
,
psidesktop
,
SHCONTF_FOLDERS
|
SHCONTF_NONFOLDERS
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
process_msgs
();
process_msgs
();
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_event_count_broken
(
pnstceimpl
,
OnItemAdded
,
1
,
0
/* Vista */
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psidesktop
);
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psidesktop
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psi
);
hr
=
INameSpaceTreeControl_EnsureItemVisible
(
pnstc
,
psi
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
}
}
...
@@ -2327,23 +2327,23 @@ static void test_events(void)
...
@@ -2327,23 +2327,23 @@ static void test_events(void)
skip
(
"Failed to get pidl for CSIDL_DRIVES.
\n
"
);
skip
(
"Failed to get pidl for CSIDL_DRIVES.
\n
"
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
hr
=
INameSpaceTreeControl_RemoveAllRoots
(
pnstc
);
ok
(
hr
==
S_OK
,
"Got (0x%08x)
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got (0x%08
l
x)
\n
"
,
hr
);
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
2
);
ok_event_count
(
pnstceimpl
,
OnItemDeleted
,
2
);
ok_no_events
(
pnstceimpl
);
ok_no_events
(
pnstceimpl
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
hr
=
INameSpaceTreeControl_QueryInterface
(
pnstc
,
&
IID_IOleWindow
,
(
void
**
)
&
pow
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
HWND
hwnd_nstc
;
HWND
hwnd_nstc
;
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_nstc
);
hr
=
IOleWindow_GetWindow
(
pow
,
&
hwnd_nstc
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
DestroyWindow
(
hwnd_nstc
);
DestroyWindow
(
hwnd_nstc
);
IOleWindow_Release
(
pow
);
IOleWindow_Release
(
pow
);
}
}
hr
=
INameSpaceTreeControl_TreeUnadvise
(
pnstc
,
cookie2
);
hr
=
INameSpaceTreeControl_TreeUnadvise
(
pnstc
,
cookie2
);
ok
(
hr
==
S_OK
,
"Got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got 0x%08
l
x
\n
"
,
hr
);
res
=
INameSpaceTreeControl_Release
(
pnstc
);
res
=
INameSpaceTreeControl_Release
(
pnstc
);
ok
(
!
res
,
"res was %d!
\n
"
,
res
);
ok
(
!
res
,
"res was %d!
\n
"
,
res
);
...
@@ -2370,7 +2370,7 @@ static void setup_window(void)
...
@@ -2370,7 +2370,7 @@ static void setup_window(void)
RegisterClassA
(
&
wc
);
RegisterClassA
(
&
wc
);
hwnd
=
CreateWindowA
(
nstctest_wnd_name
,
NULL
,
WS_TABSTOP
,
hwnd
=
CreateWindowA
(
nstctest_wnd_name
,
NULL
,
WS_TABSTOP
,
0
,
0
,
200
,
200
,
NULL
,
0
,
0
,
NULL
);
0
,
0
,
200
,
200
,
NULL
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
NULL
,
"Failed to create window for test (lasterror: %d).
\n
"
,
ok
(
hwnd
!=
NULL
,
"Failed to create window for test (lasterror: %
l
d).
\n
"
,
GetLastError
());
GetLastError
());
}
}
...
...
dlls/explorerframe/tests/taskbarlist.c
View file @
c8431d97
...
@@ -30,132 +30,132 @@ static void test_ITaskbarList(void)
...
@@ -30,132 +30,132 @@ static void test_ITaskbarList(void)
HWND
hwnd
;
HWND
hwnd
;
hwnd
=
CreateWindowA
(
WC_STATICA
,
"test"
,
WS_POPUP
|
WS_VISIBLE
,
0
,
0
,
50
,
50
,
0
,
0
,
0
,
NULL
);
hwnd
=
CreateWindowA
(
WC_STATICA
,
"test"
,
WS_POPUP
|
WS_VISIBLE
,
0
,
0
,
50
,
50
,
0
,
0
,
0
,
NULL
);
ok
(
hwnd
!=
NULL
,
"Failed to create a test window, error %u.
\n
"
,
GetLastError
());
ok
(
hwnd
!=
NULL
,
"Failed to create a test window, error %
l
u.
\n
"
,
GetLastError
());
hr
=
CoCreateInstance
((
const
CLSID
*
)
&
CLSID_TaskbarList
,
NULL
,
CLSCTX_INPROC_SERVER
,
hr
=
CoCreateInstance
((
const
CLSID
*
)
&
CLSID_TaskbarList
,
NULL
,
CLSCTX_INPROC_SERVER
,
(
const
IID
*
)
&
IID_ITaskbarList
,
(
void
**
)
&
taskbarlist
);
(
const
IID
*
)
&
IID_ITaskbarList
,
(
void
**
)
&
taskbarlist
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
ref_count
=
ITaskbarList_AddRef
(
taskbarlist
);
ref_count
=
ITaskbarList_AddRef
(
taskbarlist
);
ok
(
ref_count
==
2
,
"Got unexpected reference count %u.
\n
"
,
ref_count
);
ok
(
ref_count
==
2
,
"Got unexpected reference count %
l
u.
\n
"
,
ref_count
);
ref_count
=
ITaskbarList_Release
(
taskbarlist
);
ref_count
=
ITaskbarList_Release
(
taskbarlist
);
ok
(
ref_count
==
1
,
"Got unexpected reference count %u.
\n
"
,
ref_count
);
ok
(
ref_count
==
1
,
"Got unexpected reference count %
l
u.
\n
"
,
ref_count
);
/* Test calling methods before calling ITaskbarList::HrInit() */
/* Test calling methods before calling ITaskbarList::HrInit() */
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
hwnd
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
hwnd
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Call ITaskbarList::HrInit() */
/* Call ITaskbarList::HrInit() */
hr
=
ITaskbarList_HrInit
(
taskbarlist
);
hr
=
ITaskbarList_HrInit
(
taskbarlist
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Test ITaskbarList::HrInit() */
/* Test ITaskbarList::HrInit() */
/* Call ITaskbarList::HrInit() again */
/* Call ITaskbarList::HrInit() again */
hr
=
ITaskbarList_HrInit
(
taskbarlist
);
hr
=
ITaskbarList_HrInit
(
taskbarlist
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Test ITaskbarList::AddTab() */
/* Test ITaskbarList::AddTab() */
/* Check invalid parameters */
/* Check invalid parameters */
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
NULL
);
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
(
HWND
)
0xdeadbeef
);
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
(
HWND
)
0xdeadbeef
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Normal ITaskbarList::AddTab() */
/* Normal ITaskbarList::AddTab() */
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Repeat ITaskbarList::AddTab() with the same hwnd */
/* Repeat ITaskbarList::AddTab() with the same hwnd */
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Test ITaskbarList::SetActiveAlt() */
/* Test ITaskbarList::SetActiveAlt() */
/* Check invalid parameters */
/* Check invalid parameters */
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
NULL
);
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
NULL
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
(
HWND
)
0xdeadbeef
);
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
(
HWND
)
0xdeadbeef
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Normal ITaskbarList::SetActiveAlt() */
/* Normal ITaskbarList::SetActiveAlt() */
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
hwnd
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Repeat ITaskbarList::SetActiveAlt() with the same hwnd */
/* Repeat ITaskbarList::SetActiveAlt() with the same hwnd */
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_SetActiveAlt
(
taskbarlist
,
hwnd
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Test ITaskbarList::ActivateTab() */
/* Test ITaskbarList::ActivateTab() */
/* Check invalid parameters */
/* Check invalid parameters */
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
NULL
);
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
NULL
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
(
HWND
)
0xdeadbeef
);
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
(
HWND
)
0xdeadbeef
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Normal ITaskbarList::ActivateTab() */
/* Normal ITaskbarList::ActivateTab() */
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
hwnd
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Repeat ITaskbarList::ActivateTab() with the same hwnd */
/* Repeat ITaskbarList::ActivateTab() with the same hwnd */
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_ActivateTab
(
taskbarlist
,
hwnd
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Test ITaskbarList::DeleteTab() */
/* Test ITaskbarList::DeleteTab() */
/* Check invalid parameters */
/* Check invalid parameters */
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
NULL
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
(
HWND
)
0xdeadbeef
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
(
HWND
)
0xdeadbeef
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
/* Normal ITaskbarList::DeleteTab() */
/* Normal ITaskbarList::DeleteTab() */
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_AddTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
hr
=
ITaskbarList_DeleteTab
(
taskbarlist
,
hwnd
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got hr %#
l
x.
\n
"
,
hr
);
ref_count
=
ITaskbarList_Release
(
taskbarlist
);
ref_count
=
ITaskbarList_Release
(
taskbarlist
);
ok
(
ref_count
==
0
,
"Got unexpected reference count %u.
\n
"
,
ref_count
);
ok
(
ref_count
==
0
,
"Got unexpected reference count %
l
u.
\n
"
,
ref_count
);
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
}
}
...
...
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