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
5718c0bc
Commit
5718c0bc
authored
Jan 27, 2012
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: COM cleanup for IExtractIconW.
parent
a14b7df8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
50 deletions
+40
-50
folders.c
dlls/shell32/folders.c
+40
-50
No files found.
dlls/shell32/folders.c
View file @
5718c0bc
...
...
@@ -48,13 +48,18 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
*/
typedef
struct
{
const
IExtractIconWVtbl
*
lpVtbl
;
IExtractIconW
IExtractIconW_iface
;
LONG
ref
;
const
IPersistFileVtbl
*
lpvtblPersistFile
;
const
IExtractIconAVtbl
*
lpvtblExtractIconA
;
LPITEMIDLIST
pidl
;
}
IExtractIconWImpl
;
static
inline
IExtractIconWImpl
*
impl_from_IExtractIconW
(
IExtractIconW
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IExtractIconWImpl
,
IExtractIconW_iface
);
}
static
const
IExtractIconAVtbl
eiavt
;
static
const
IExtractIconWVtbl
eivt
;
static
const
IPersistFileVtbl
pfvt
;
...
...
@@ -81,7 +86,7 @@ IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl)
ei
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IExtractIconWImpl
));
ei
->
ref
=
1
;
ei
->
lpVtbl
=
&
eivt
;
ei
->
IExtractIconW_iface
.
lpVtbl
=
&
eivt
;
ei
->
lpvtblPersistFile
=
&
pfvt
;
ei
->
lpvtblExtractIconA
=
&
eiavt
;
ei
->
pidl
=
ILClone
(
pidl
);
...
...
@@ -89,52 +94,42 @@ IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl)
pdump
(
pidl
);
TRACE
(
"(%p)
\n
"
,
ei
);
return
(
IExtractIconW
*
)
ei
;
return
&
ei
->
IExtractIconW_iface
;
}
/**************************************************************************
* IExtractIconW
_
QueryInterface
* IExtractIconW
::
QueryInterface
*/
static
HRESULT
WINAPI
IExtractIconW_fnQueryInterface
(
IExtractIconW
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
static
HRESULT
WINAPI
IExtractIconW_fnQueryInterface
(
IExtractIconW
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
IExtractIconWImpl
*
This
=
(
IExtractIconWImpl
*
)
iface
;
IExtractIconWImpl
*
This
=
impl_from_IExtractIconW
(
iface
)
;
TRACE
(
"(%p)->(
\n\t
IID:
\t
%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObj
);
TRACE
(
"(%p)->(
\n\t
IID:
\t
%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
*
ppvObj
=
NULL
;
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IExtractIconW
))
*
ppv
=
iface
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistFile
))
*
ppv
=
&
This
->
lpvtblPersistFile
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IExtractIconA
))
*
ppv
=
&
This
->
lpvtblExtractIconA
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
))
/*IUnknown*/
{
*
ppvObj
=
This
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistFile
))
/*IExtractIcon*/
{
*
ppvObj
=
&
This
->
lpvtblPersistFile
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IExtractIconA
))
/*IExtractIcon*/
{
*
ppvObj
=
&
This
->
lpvtblExtractIconA
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IExtractIconW
))
/*IExtractIcon*/
{
*
ppvObj
=
This
;
}
if
(
*
ppvObj
)
{
IExtractIconW_AddRef
((
IExtractIconW
*
)
*
ppvObj
);
TRACE
(
"-- Interface: (%p)->(%p)
\n
"
,
ppvObj
,
*
ppvObj
);
return
S_OK
;
}
TRACE
(
"-- Interface: E_NOINTERFACE
\n
"
);
return
E_NOINTERFACE
;
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
TRACE
(
"-- Interface: (%p)->(%p)
\n
"
,
ppv
,
*
ppv
);
return
S_OK
;
}
TRACE
(
"-- Interface: E_NOINTERFACE
\n
"
);
return
E_NOINTERFACE
;
}
/**************************************************************************
* IExtractIconW
_
AddRef
* IExtractIconW
::
AddRef
*/
static
ULONG
WINAPI
IExtractIconW_fnAddRef
(
IExtractIconW
*
iface
)
{
IExtractIconWImpl
*
This
=
(
IExtractIconWImpl
*
)
iface
;
IExtractIconWImpl
*
This
=
impl_from_IExtractIconW
(
iface
)
;
ULONG
refCount
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%u)
\n
"
,
This
,
refCount
-
1
);
...
...
@@ -142,11 +137,11 @@ static ULONG WINAPI IExtractIconW_fnAddRef(IExtractIconW * iface)
return
refCount
;
}
/**************************************************************************
* IExtractIconW
_
Release
* IExtractIconW
::
Release
*/
static
ULONG
WINAPI
IExtractIconW_fnRelease
(
IExtractIconW
*
iface
)
{
IExtractIconWImpl
*
This
=
(
IExtractIconWImpl
*
)
iface
;
IExtractIconWImpl
*
This
=
impl_from_IExtractIconW
(
iface
)
;
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(count=%u)
\n
"
,
This
,
refCount
+
1
);
...
...
@@ -215,20 +210,14 @@ static HRESULT getIconLocationForFolder(IExtractIconWImpl *This, UINT uFlags, LP
WCHAR
swShell32Name
[
MAX_PATH
];
/**************************************************************************
* IExtractIconW
_
GetIconLocation
* IExtractIconW
::
GetIconLocation
*
* mapping filetype to icon
*/
static
HRESULT
WINAPI
IExtractIconW_fnGetIconLocation
(
IExtractIconW
*
iface
,
UINT
uFlags
,
/* GIL_ flags */
LPWSTR
szIconFile
,
UINT
cchMax
,
int
*
piIndex
,
UINT
*
pwFlags
)
/* returned GIL_ flags */
static
HRESULT
WINAPI
IExtractIconW_fnGetIconLocation
(
IExtractIconW
*
iface
,
UINT
uFlags
,
LPWSTR
szIconFile
,
UINT
cchMax
,
int
*
piIndex
,
UINT
*
pwFlags
)
{
IExtractIconWImpl
*
This
=
(
IExtractIconWImpl
*
)
iface
;
IExtractIconWImpl
*
This
=
impl_from_IExtractIconW
(
iface
);
char
sTemp
[
MAX_PATH
];
int
icon_idx
;
GUID
const
*
riid
;
...
...
@@ -383,11 +372,12 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(
}
/**************************************************************************
* IExtractIconW
_
Extract
* IExtractIconW
::
Extract
*/
static
HRESULT
WINAPI
IExtractIconW_fnExtract
(
IExtractIconW
*
iface
,
LPCWSTR
pszFile
,
UINT
nIconIndex
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
)
static
HRESULT
WINAPI
IExtractIconW_fnExtract
(
IExtractIconW
*
iface
,
LPCWSTR
pszFile
,
UINT
nIconIndex
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
)
{
IExtractIconWImpl
*
This
=
(
IExtractIconWImpl
*
)
iface
;
IExtractIconWImpl
*
This
=
impl_from_IExtractIconW
(
iface
)
;
int
index
;
FIXME
(
"(%p) (file=%p index=%d %p %p size=%08x) semi-stub
\n
"
,
This
,
debugstr_w
(
pszFile
),
(
signed
)
nIconIndex
,
...
...
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