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
17339f4f
Commit
17339f4f
authored
Apr 07, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Cleanup IShellItem creation calls.
parent
e9d010ef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
26 deletions
+15
-26
shellitem.c
dlls/shell32/shellitem.c
+15
-26
No files found.
dlls/shell32/shellitem.c
View file @
17339f4f
...
...
@@ -548,7 +548,6 @@ HRESULT WINAPI IShellItem_Constructor(IUnknown *pUnkOuter, REFIID riid, void **p
HRESULT
WINAPI
SHCreateShellItem
(
LPCITEMIDLIST
pidlParent
,
IShellFolder
*
psfParent
,
LPCITEMIDLIST
pidl
,
IShellItem
**
ppsi
)
{
ShellItem
*
This
;
LPITEMIDLIST
new_pidl
;
HRESULT
ret
;
...
...
@@ -597,16 +596,9 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,
return
E_OUTOFMEMORY
;
}
ret
=
IShellItem_Constructor
(
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
This
);
if
(
This
)
{
*
ppsi
=
(
IShellItem
*
)
&
This
->
IShellItem2_iface
;
This
->
pidl
=
new_pidl
;
}
else
{
ret
=
SHCreateItemFromIDList
(
new_pidl
,
&
IID_IShellItem
,
(
void
**
)
ppsi
);
ILFree
(
new_pidl
);
}
return
ret
;
}
...
...
@@ -621,37 +613,34 @@ HRESULT WINAPI SHCreateItemFromParsingName(PCWSTR pszPath,
ret
=
SHParseDisplayName
(
pszPath
,
pbc
,
&
pidl
,
0
,
NULL
);
if
(
SUCCEEDED
(
ret
))
{
ShellItem
*
This
;
ret
=
IShellItem_Constructor
(
NULL
,
riid
,
(
void
**
)
&
This
);
if
(
SUCCEEDED
(
ret
))
{
This
->
pidl
=
pidl
;
*
ppv
=
(
void
*
)
This
;
}
else
{
ret
=
SHCreateItemFromIDList
(
pidl
,
riid
,
ppv
);
ILFree
(
pidl
);
}
}
return
ret
;
}
HRESULT
WINAPI
SHCreateItemFromIDList
(
PCIDLIST_ABSOLUTE
pidl
,
REFIID
riid
,
void
**
ppv
)
{
ShellItem
*
psiimpl
;
IPersistIDList
*
persist
;
HRESULT
ret
;
if
(
!
pidl
)
return
E_INVALIDARG
;
ret
=
IShellItem_Constructor
(
NULL
,
riid
,
ppv
);
if
(
SUCCEEDED
(
ret
))
*
ppv
=
NULL
;
ret
=
IShellItem_Constructor
(
NULL
,
&
IID_IPersistIDList
,
(
void
**
)
&
persist
);
if
(
FAILED
(
ret
))
return
ret
;
ret
=
IPersistIDList_SetIDList
(
persist
,
pidl
);
if
(
FAILED
(
ret
))
{
psiimpl
=
(
ShellItem
*
)
*
ppv
;
psiimpl
->
pidl
=
ILClone
(
pidl
)
;
IPersistIDList_Release
(
persist
)
;
return
ret
;
}
ret
=
IPersistIDList_QueryInterface
(
persist
,
riid
,
ppv
);
IPersistIDList_Release
(
persist
);
return
ret
;
}
...
...
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