Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5b95a43d
Commit
5b95a43d
authored
May 21, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
May 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Handle parent folders in SHCreateShellItem.
parent
1d57a31d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
7 deletions
+32
-7
shellitem.c
dlls/shell32/shellitem.c
+29
-4
shlfolder.c
dlls/shell32/tests/shlfolder.c
+3
-3
No files found.
dlls/shell32/shellitem.c
View file @
5b95a43d
...
...
@@ -280,16 +280,41 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,
{
return
E_INVALIDARG
;
}
else
if
(
!
pidlParent
&&
!
psfParent
)
else
if
(
pidlParent
||
psfParent
)
{
new_pidl
=
ILClone
(
pidl
);
LPITEMIDLIST
temp_parent
=
NULL
;
if
(
!
pidlParent
)
{
IPersistFolder2
*
ppf2Parent
;
if
(
!
SUCCEEDED
(
IPersistFolder2_QueryInterface
(
psfParent
,
&
IID_IPersistFolder2
,
(
void
**
)
&
ppf2Parent
)))
{
FIXME
(
"couldn't get IPersistFolder2 interface of parent
\n
"
);
return
E_NOINTERFACE
;
}
if
(
!
SUCCEEDED
(
IPersistFolder2_GetCurFolder
(
ppf2Parent
,
&
temp_parent
)))
{
FIXME
(
"couldn't get parent PIDL
\n
"
);
IPersistFolder2_Release
(
ppf2Parent
);
return
E_NOINTERFACE
;
}
pidlParent
=
temp_parent
;
IPersistFolder2_Release
(
ppf2Parent
);
}
new_pidl
=
ILCombine
(
pidlParent
,
pidl
);
ILFree
(
temp_parent
);
if
(
!
new_pidl
)
return
E_OUTOFMEMORY
;
}
else
{
FIXME
(
"(%p,%p,%p) not implemented
\n
"
,
pidlParent
,
psfParent
,
pidl
);
return
E_NOINTERFACE
;
new_pidl
=
ILClone
(
pidl
);
if
(
!
new_pidl
)
return
E_OUTOFMEMORY
;
}
ret
=
IShellItem_Constructor
(
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
This
);
...
...
dlls/shell32/tests/shlfolder.c
View file @
5b95a43d
...
...
@@ -1814,7 +1814,7 @@ static void test_SHCreateShellItem(void)
}
ret
=
pSHCreateShellItem
(
pidl_cwd
,
NULL
,
pidl_testfile
,
&
shellitem
);
todo_wine
ok
(
SUCCEEDED
(
ret
),
"SHCreateShellItem returned %x
\n
"
,
ret
);
ok
(
SUCCEEDED
(
ret
),
"SHCreateShellItem returned %x
\n
"
,
ret
);
if
(
SUCCEEDED
(
ret
))
{
ret
=
IShellItem_QueryInterface
(
shellitem
,
&
IID_IPersistIDList
,
(
void
**
)
&
persistidl
);
...
...
@@ -1834,7 +1834,7 @@ static void test_SHCreateShellItem(void)
}
ret
=
pSHCreateShellItem
(
NULL
,
currentfolder
,
pidl_testfile
,
&
shellitem
);
todo_wine
ok
(
SUCCEEDED
(
ret
),
"SHCreateShellItem returned %x
\n
"
,
ret
);
ok
(
SUCCEEDED
(
ret
),
"SHCreateShellItem returned %x
\n
"
,
ret
);
if
(
SUCCEEDED
(
ret
))
{
ret
=
IShellItem_QueryInterface
(
shellitem
,
&
IID_IPersistIDList
,
(
void
**
)
&
persistidl
);
...
...
@@ -1855,7 +1855,7 @@ static void test_SHCreateShellItem(void)
/* if a parent pidl and shellfolder are specified, the shellfolder is ignored */
ret
=
pSHCreateShellItem
(
pidl_cwd
,
desktopfolder
,
pidl_testfile
,
&
shellitem
);
todo_wine
ok
(
SUCCEEDED
(
ret
),
"SHCreateShellItem returned %x
\n
"
,
ret
);
ok
(
SUCCEEDED
(
ret
),
"SHCreateShellItem returned %x
\n
"
,
ret
);
if
(
SUCCEEDED
(
ret
))
{
ret
=
IShellItem_QueryInterface
(
shellitem
,
&
IID_IPersistIDList
,
(
void
**
)
&
persistidl
);
...
...
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