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
18d31c27
Commit
18d31c27
authored
Nov 08, 2010
by
David Hedberg
Committed by
Alexandre Julliard
Nov 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Don't crash on NULL cmdgroup in DefView OleCommandTarget.
parent
208aeedc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
1 deletion
+47
-1
shlview.c
dlls/shell32/shlview.c
+3
-1
shlview.c
dlls/shell32/tests/shlview.c
+44
-0
No files found.
dlls/shell32/shlview.c
View file @
18d31c27
...
...
@@ -2258,7 +2258,7 @@ static HRESULT WINAPI ISVOleCmdTarget_QueryStatus(
This
,
debugstr_guid
(
pguidCmdGroup
),
cCmds
,
prgCmds
,
pCmdText
);
if
(
!
prgCmds
)
return
E_
POINTER
;
return
E_
INVALIDARG
;
for
(
i
=
0
;
i
<
cCmds
;
i
++
)
{
FIXME
(
"
\t
prgCmds[%d].cmdID = %d
\n
"
,
i
,
prgCmds
[
i
].
cmdID
);
...
...
@@ -2285,6 +2285,8 @@ static HRESULT WINAPI ISVOleCmdTarget_Exec(
FIXME
(
"(%p)->(
\n\t
Target GUID:%s Command:0x%08x Opt:0x%08x %p %p)
\n
"
,
This
,
debugstr_guid
(
pguidCmdGroup
),
nCmdID
,
nCmdexecopt
,
pvaIn
,
pvaOut
);
if
(
!
pguidCmdGroup
)
return
OLECMDERR_E_UNKNOWNGROUP
;
if
(
IsEqualIID
(
pguidCmdGroup
,
&
CGID_Explorer
)
&&
(
nCmdID
==
0x29
)
&&
(
nCmdexecopt
==
4
)
&&
pvaOut
)
...
...
dlls/shell32/tests/shlview.c
View file @
18d31c27
...
...
@@ -1100,6 +1100,49 @@ static void test_GetSetCurrentViewMode(void)
IShellFolder_Release
(
desktop
);
}
static
void
test_IOleCommandTarget
(
void
)
{
IShellFolder
*
psf_desktop
;
IShellView
*
psv
;
IOleCommandTarget
*
poct
;
HRESULT
hr
;
hr
=
SHGetDesktopFolder
(
&
psf_desktop
);
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
hr
=
IShellFolder_CreateViewObject
(
psf_desktop
,
NULL
,
&
IID_IShellView
,
(
void
**
)
&
psv
);
ok
(
hr
==
S_OK
,
"got (0x%08x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IShellView_QueryInterface
(
psv
,
&
IID_IOleCommandTarget
,
(
void
**
)
&
poct
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
)
/* Win95/NT4 */
,
"Got 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
{
OLECMD
oc
;
hr
=
IOleCommandTarget_QueryStatus
(
poct
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Got 0x%08x
\n
"
,
hr
);
oc
.
cmdID
=
1
;
hr
=
IOleCommandTarget_QueryStatus
(
poct
,
NULL
,
0
,
&
oc
,
NULL
);
ok
(
hr
==
OLECMDERR_E_UNKNOWNGROUP
,
"Got 0x%08x
\n
"
,
hr
);
oc
.
cmdID
=
1
;
hr
=
IOleCommandTarget_QueryStatus
(
poct
,
NULL
,
1
,
&
oc
,
NULL
);
ok
(
hr
==
OLECMDERR_E_UNKNOWNGROUP
,
"Got 0x%08x
\n
"
,
hr
);
hr
=
IOleCommandTarget_Exec
(
poct
,
NULL
,
0
,
0
,
NULL
,
NULL
);
ok
(
hr
==
OLECMDERR_E_UNKNOWNGROUP
,
"Got 0x%08x
\n
"
,
hr
);
IOleCommandTarget_Release
(
poct
);
}
IShellView_Release
(
psv
);
}
IShellFolder_Release
(
psf_desktop
);
}
START_TEST
(
shlview
)
{
OleInitialize
(
NULL
);
...
...
@@ -1112,6 +1155,7 @@ START_TEST(shlview)
test_IShellFolderView
();
test_IOleWindow
();
test_GetSetCurrentViewMode
();
test_IOleCommandTarget
();
OleUninitialize
();
}
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