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
83693d96
Commit
83693d96
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: Avoid an unsafe IExtractIconW to object cast.
parent
b12a950c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
36 deletions
+33
-36
folders.c
dlls/shell32/folders.c
+33
-36
No files found.
dlls/shell32/folders.c
View file @
83693d96
...
...
@@ -70,32 +70,7 @@ static inline IExtractIconWImpl *impl_from_IPersistFile(IPersistFile *iface)
return
CONTAINING_RECORD
(
iface
,
IExtractIconWImpl
,
IPersistFile_iface
);
}
static
const
IExtractIconAVtbl
eiavt
;
static
const
IExtractIconWVtbl
eivt
;
static
const
IPersistFileVtbl
pfvt
;
/**************************************************************************
* IExtractIconW_Constructor
*/
IExtractIconW
*
IExtractIconW_Constructor
(
LPCITEMIDLIST
pidl
)
{
IExtractIconWImpl
*
ei
;
TRACE
(
"%p
\n
"
,
pidl
);
ei
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IExtractIconWImpl
));
ei
->
ref
=
1
;
ei
->
IExtractIconW_iface
.
lpVtbl
=
&
eivt
;
ei
->
IExtractIconA_iface
.
lpVtbl
=
&
eiavt
;
ei
->
IPersistFile_iface
.
lpVtbl
=
&
pfvt
;
ei
->
pidl
=
ILClone
(
pidl
);
pdump
(
pidl
);
TRACE
(
"(%p)
\n
"
,
ei
);
return
&
ei
->
IExtractIconW_iface
;
}
/**************************************************************************
* IExtractIconW::QueryInterface
*/
...
...
@@ -404,17 +379,6 @@ static const IExtractIconWVtbl eivt =
};
/**************************************************************************
* IExtractIconA_Constructor
*/
IExtractIconA
*
IExtractIconA_Constructor
(
LPCITEMIDLIST
pidl
)
{
IExtractIconWImpl
*
This
=
(
IExtractIconWImpl
*
)
IExtractIconW_Constructor
(
pidl
);
IExtractIconA
*
eia
=
&
This
->
IExtractIconA_iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
eia
);
return
eia
;
}
/**************************************************************************
* IExtractIconA::QueryInterface
*/
static
HRESULT
WINAPI
IExtractIconA_fnQueryInterface
(
IExtractIconA
*
iface
,
REFIID
riid
,
...
...
@@ -564,3 +528,36 @@ static const IPersistFileVtbl pfvt =
(
void
*
)
0xdeadbeef
/* IEIPersistFile_fnSaveCompleted */
,
(
void
*
)
0xdeadbeef
/* IEIPersistFile_fnGetCurFile */
};
IExtractIconWImpl
*
extracticon_create
(
LPCITEMIDLIST
pidl
)
{
IExtractIconWImpl
*
ei
;
TRACE
(
"%p
\n
"
,
pidl
);
ei
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
ei
));
ei
->
ref
=
1
;
ei
->
IExtractIconW_iface
.
lpVtbl
=
&
eivt
;
ei
->
IExtractIconA_iface
.
lpVtbl
=
&
eiavt
;
ei
->
IPersistFile_iface
.
lpVtbl
=
&
pfvt
;
ei
->
pidl
=
ILClone
(
pidl
);
pdump
(
pidl
);
TRACE
(
"(%p)
\n
"
,
ei
);
return
ei
;
}
IExtractIconW
*
IExtractIconW_Constructor
(
LPCITEMIDLIST
pidl
)
{
IExtractIconWImpl
*
ei
=
extracticon_create
(
pidl
);
return
&
ei
->
IExtractIconW_iface
;
}
IExtractIconA
*
IExtractIconA_Constructor
(
LPCITEMIDLIST
pidl
)
{
IExtractIconWImpl
*
ei
=
extracticon_create
(
pidl
);
return
&
ei
->
IExtractIconA_iface
;
}
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