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
...
@@ -548,7 +548,6 @@ HRESULT WINAPI IShellItem_Constructor(IUnknown *pUnkOuter, REFIID riid, void **p
HRESULT
WINAPI
SHCreateShellItem
(
LPCITEMIDLIST
pidlParent
,
HRESULT
WINAPI
SHCreateShellItem
(
LPCITEMIDLIST
pidlParent
,
IShellFolder
*
psfParent
,
LPCITEMIDLIST
pidl
,
IShellItem
**
ppsi
)
IShellFolder
*
psfParent
,
LPCITEMIDLIST
pidl
,
IShellItem
**
ppsi
)
{
{
ShellItem
*
This
;
LPITEMIDLIST
new_pidl
;
LPITEMIDLIST
new_pidl
;
HRESULT
ret
;
HRESULT
ret
;
...
@@ -597,16 +596,9 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,
...
@@ -597,16 +596,9 @@ HRESULT WINAPI SHCreateShellItem(LPCITEMIDLIST pidlParent,
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
ret
=
IShellItem_Constructor
(
NULL
,
&
IID_IShellItem
,
(
void
**
)
&
This
);
ret
=
SHCreateItemFromIDList
(
new_pidl
,
&
IID_IShellItem
,
(
void
**
)
ppsi
);
if
(
This
)
{
*
ppsi
=
(
IShellItem
*
)
&
This
->
IShellItem2_iface
;
This
->
pidl
=
new_pidl
;
}
else
{
ILFree
(
new_pidl
);
ILFree
(
new_pidl
);
}
return
ret
;
return
ret
;
}
}
...
@@ -621,37 +613,34 @@ HRESULT WINAPI SHCreateItemFromParsingName(PCWSTR pszPath,
...
@@ -621,37 +613,34 @@ HRESULT WINAPI SHCreateItemFromParsingName(PCWSTR pszPath,
ret
=
SHParseDisplayName
(
pszPath
,
pbc
,
&
pidl
,
0
,
NULL
);
ret
=
SHParseDisplayName
(
pszPath
,
pbc
,
&
pidl
,
0
,
NULL
);
if
(
SUCCEEDED
(
ret
))
if
(
SUCCEEDED
(
ret
))
{
{
ShellItem
*
This
;
ret
=
SHCreateItemFromIDList
(
pidl
,
riid
,
ppv
);
ret
=
IShellItem_Constructor
(
NULL
,
riid
,
(
void
**
)
&
This
);
if
(
SUCCEEDED
(
ret
))
{
This
->
pidl
=
pidl
;
*
ppv
=
(
void
*
)
This
;
}
else
{
ILFree
(
pidl
);
ILFree
(
pidl
);
}
}
}
return
ret
;
return
ret
;
}
}
HRESULT
WINAPI
SHCreateItemFromIDList
(
PCIDLIST_ABSOLUTE
pidl
,
REFIID
riid
,
void
**
ppv
)
HRESULT
WINAPI
SHCreateItemFromIDList
(
PCIDLIST_ABSOLUTE
pidl
,
REFIID
riid
,
void
**
ppv
)
{
{
ShellItem
*
psiimpl
;
IPersistIDList
*
persist
;
HRESULT
ret
;
HRESULT
ret
;
if
(
!
pidl
)
if
(
!
pidl
)
return
E_INVALIDARG
;
return
E_INVALIDARG
;
ret
=
IShellItem_Constructor
(
NULL
,
riid
,
ppv
);
*
ppv
=
NULL
;
if
(
SUCCEEDED
(
ret
))
ret
=
IShellItem_Constructor
(
NULL
,
&
IID_IPersistIDList
,
(
void
**
)
&
persist
);
if
(
FAILED
(
ret
))
return
ret
;
ret
=
IPersistIDList_SetIDList
(
persist
,
pidl
);
if
(
FAILED
(
ret
))
{
{
psiimpl
=
(
ShellItem
*
)
*
ppv
;
IPersistIDList_Release
(
persist
)
;
psiimpl
->
pidl
=
ILClone
(
pidl
)
;
return
ret
;
}
}
ret
=
IPersistIDList_QueryInterface
(
persist
,
riid
,
ppv
);
IPersistIDList_Release
(
persist
);
return
ret
;
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