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
f4f9be6e
Commit
f4f9be6e
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 IExtractIconA.
parent
725db4d1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
33 deletions
+32
-33
folders.c
dlls/shell32/folders.c
+32
-33
No files found.
dlls/shell32/folders.c
View file @
f4f9be6e
...
...
@@ -49,9 +49,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
typedef
struct
{
IExtractIconW
IExtractIconW_iface
;
IExtractIconA
IExtractIconA_iface
;
LONG
ref
;
const
IPersistFileVtbl
*
lpvtblPersistFile
;
const
IExtractIconAVtbl
*
lpvtblExtractIconA
;
LPITEMIDLIST
pidl
;
}
IExtractIconWImpl
;
...
...
@@ -60,6 +60,11 @@ static inline IExtractIconWImpl *impl_from_IExtractIconW(IExtractIconW *iface)
return
CONTAINING_RECORD
(
iface
,
IExtractIconWImpl
,
IExtractIconW_iface
);
}
static
inline
IExtractIconWImpl
*
impl_from_IExtractIconA
(
IExtractIconA
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IExtractIconWImpl
,
IExtractIconA_iface
);
}
static
const
IExtractIconAVtbl
eiavt
;
static
const
IExtractIconWVtbl
eivt
;
static
const
IPersistFileVtbl
pfvt
;
...
...
@@ -69,11 +74,6 @@ static inline IExtractIconW *impl_from_IPersistFile( IPersistFile *iface )
return
(
IExtractIconW
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IExtractIconWImpl
,
lpvtblPersistFile
));
}
static
inline
IExtractIconW
*
impl_from_IExtractIconA
(
IExtractIconA
*
iface
)
{
return
(
IExtractIconW
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
IExtractIconWImpl
,
lpvtblExtractIconA
));
}
/**************************************************************************
* IExtractIconW_Constructor
...
...
@@ -88,7 +88,7 @@ IExtractIconW* IExtractIconW_Constructor(LPCITEMIDLIST pidl)
ei
->
ref
=
1
;
ei
->
IExtractIconW_iface
.
lpVtbl
=
&
eivt
;
ei
->
lpvtblPersistFile
=
&
pfvt
;
ei
->
lpvtblExtractIconA
=
&
eiavt
;
ei
->
IExtractIconA_iface
.
lpVtbl
=
&
eiavt
;
ei
->
pidl
=
ILClone
(
pidl
);
pdump
(
pidl
);
...
...
@@ -112,7 +112,7 @@ static HRESULT WINAPI IExtractIconW_fnQueryInterface(IExtractIconW *iface, REFII
else
if
(
IsEqualIID
(
riid
,
&
IID_IPersistFile
))
*
ppv
=
&
This
->
lpvtblPersistFile
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IExtractIconA
))
*
ppv
=
&
This
->
lpvtblExtractIconA
;
*
ppv
=
&
This
->
IExtractIconA_iface
;
if
(
*
ppv
)
{
...
...
@@ -409,59 +409,56 @@ static const IExtractIconWVtbl eivt =
IExtractIconA
*
IExtractIconA_Constructor
(
LPCITEMIDLIST
pidl
)
{
IExtractIconWImpl
*
This
=
(
IExtractIconWImpl
*
)
IExtractIconW_Constructor
(
pidl
);
IExtractIconA
*
eia
=
(
IExtractIconA
*
)
&
This
->
lpvtblExtractIconA
;
IExtractIconA
*
eia
=
&
This
->
IExtractIconA_iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
eia
);
return
eia
;
}
/**************************************************************************
* IExtractIconA
_
QueryInterface
* IExtractIconA
::
QueryInterface
*/
static
HRESULT
WINAPI
IExtractIconA_fnQueryInterface
(
IExtractIconA
*
iface
,
REFIID
riid
,
LPVOID
*
ppvObj
)
static
HRESULT
WINAPI
IExtractIconA_fnQueryInterface
(
IExtractIconA
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
IExtractIconW
*
This
=
impl_from_IExtractIconA
(
iface
);
IExtractIconWImpl
*
This
=
impl_from_IExtractIconA
(
iface
);
return
IExtractIconW_QueryInterface
(
This
,
riid
,
ppvObj
);
return
IExtractIconW_QueryInterface
(
&
This
->
IExtractIconW_iface
,
riid
,
ppv
);
}
/**************************************************************************
* IExtractIconA
_
AddRef
* IExtractIconA
::
AddRef
*/
static
ULONG
WINAPI
IExtractIconA_fnAddRef
(
IExtractIconA
*
iface
)
{
IExtractIconW
*
This
=
impl_from_IExtractIconA
(
iface
);
IExtractIconWImpl
*
This
=
impl_from_IExtractIconA
(
iface
);
return
IExtractIconW_AddRef
(
This
);
return
IExtractIconW_AddRef
(
&
This
->
IExtractIconW_iface
);
}
/**************************************************************************
* IExtractIconA
_
Release
* IExtractIconA
::
Release
*/
static
ULONG
WINAPI
IExtractIconA_fnRelease
(
IExtractIconA
*
iface
)
{
IExtractIconW
*
This
=
impl_from_IExtractIconA
(
iface
);
IExtractIconWImpl
*
This
=
impl_from_IExtractIconA
(
iface
);
return
IExtractIconW_Release
(
This
);
return
IExtractIconW_Release
(
&
This
->
IExtractIconW_iface
);
}
/**************************************************************************
* IExtractIconA
_
GetIconLocation
* IExtractIconA
::
GetIconLocation
*
* mapping filetype to icon
*/
static
HRESULT
WINAPI
IExtractIconA_fnGetIconLocation
(
IExtractIconA
*
iface
,
UINT
uFlags
,
LPSTR
szIconFile
,
UINT
cchMax
,
int
*
piIndex
,
UINT
*
pwFlags
)
static
HRESULT
WINAPI
IExtractIconA_fnGetIconLocation
(
IExtractIconA
*
iface
,
UINT
uFlags
,
LPSTR
szIconFile
,
UINT
cchMax
,
int
*
piIndex
,
UINT
*
pwFlags
)
{
IExtractIconWImpl
*
This
=
impl_from_IExtractIconA
(
iface
);
HRESULT
ret
;
LPWSTR
lpwstrFile
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cchMax
*
sizeof
(
WCHAR
));
IExtractIconW
*
This
=
impl_from_IExtractIconA
(
iface
);
TRACE
(
"(%p) (flags=%u %p %u %p %p)
\n
"
,
This
,
uFlags
,
szIconFile
,
cchMax
,
piIndex
,
pwFlags
);
ret
=
IExtractIconW_GetIconLocation
(
This
,
uFlags
,
lpwstrFile
,
cchMax
,
piIndex
,
pwFlags
);
ret
=
IExtractIconW_GetIconLocation
(
&
This
->
IExtractIconW_iface
,
uFlags
,
lpwstrFile
,
cchMax
,
piIndex
,
pwFlags
);
WideCharToMultiByte
(
CP_ACP
,
0
,
lpwstrFile
,
-
1
,
szIconFile
,
cchMax
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwstrFile
);
...
...
@@ -469,19 +466,21 @@ static HRESULT WINAPI IExtractIconA_fnGetIconLocation(
return
ret
;
}
/**************************************************************************
* IExtractIconA
_
Extract
* IExtractIconA
::
Extract
*/
static
HRESULT
WINAPI
IExtractIconA_fnExtract
(
IExtractIconA
*
iface
,
LPCSTR
pszFile
,
UINT
nIconIndex
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
)
static
HRESULT
WINAPI
IExtractIconA_fnExtract
(
IExtractIconA
*
iface
,
LPCSTR
pszFile
,
UINT
nIconIndex
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
)
{
IExtractIconWImpl
*
This
=
impl_from_IExtractIconA
(
iface
);
HRESULT
ret
;
INT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pszFile
,
-
1
,
NULL
,
0
);
LPWSTR
lpwstrFile
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
IExtractIconW
*
This
=
impl_from_IExtractIconA
(
iface
);
TRACE
(
"(%p) (file=%p index=%u %p %p size=%u)
\n
"
,
This
,
pszFile
,
nIconIndex
,
phiconLarge
,
phiconSmall
,
nIconSize
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pszFile
,
-
1
,
lpwstrFile
,
len
);
ret
=
IExtractIconW_Extract
(
This
,
lpwstrFile
,
nIconIndex
,
phiconLarge
,
phiconSmall
,
nIconSize
);
ret
=
IExtractIconW_Extract
(
&
This
->
IExtractIconW_iface
,
lpwstrFile
,
nIconIndex
,
phiconLarge
,
phiconSmall
,
nIconSize
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwstrFile
);
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