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
d069af18
Commit
d069af18
authored
Dec 12, 2002
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Dec 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup InternalExtractIconEx. The PrivateExtractIcons functions
should also handle the case for 32bit PE and 16bit NE files so no need to do this here in a different way, too.
parent
a1b709d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
47 deletions
+26
-47
shell.c
dlls/shell32/shell.c
+26
-47
No files found.
dlls/shell32/shell.c
View file @
d069af18
...
...
@@ -199,7 +199,7 @@ HINSTANCE16 WINAPI FindExecutable16( LPCSTR lpFile, LPCSTR lpDirectory,
*/
BOOL16
WINAPI
AboutDlgProc16
(
HWND16
hWnd
,
UINT16
msg
,
WPARAM16
wParam
,
LPARAM
lParam
)
{
return
AboutDlgProc
(
HWND_32
(
hWnd
),
msg
,
wParam
,
lParam
);
{
return
(
BOOL16
)
AboutDlgProc
(
HWND_32
(
hWnd
),
msg
,
wParam
,
lParam
);
}
...
...
@@ -222,64 +222,43 @@ HGLOBAL16 WINAPI InternalExtractIcon16(HINSTANCE16 hInstance,
HGLOBAL16
hRet
=
0
;
HICON16
*
RetPtr
=
NULL
;
OFSTRUCT
ofs
;
HFILE
hFile
;
TRACE
(
"(%04x,file %s,start %d,extract %d
\n
"
,
hInstance
,
lpszExeFileName
,
nIconIndex
,
n
);
if
(
!
n
)
if
(
!
n
)
return
0
;
hFile
=
OpenFile
(
lpszExeFileName
,
&
ofs
,
OF_READ
|
OF_EXIST
);
hRet
=
GlobalAlloc16
(
GMEM_FIXED
|
GMEM_ZEROINIT
,
sizeof
(
HICON16
)
*
n
);
hRet
=
GlobalAlloc16
(
GMEM_FIXED
|
GMEM_ZEROINIT
,
sizeof
(
*
RetPtr
)
*
n
);
RetPtr
=
(
HICON16
*
)
GlobalLock16
(
hRet
);
if
(
hFile
==
HFILE_ERROR
)
{
/* not found - load from builtin module if available */
HINSTANCE
hInst
=
HINSTANCE_32
(
LoadLibrary16
(
lpszExeFileName
));
if
((
int
)
hInst
<
32
)
/* hmm, no Win16 module - try Win32 :-) */
hInst
=
LoadLibraryA
(
lpszExeFileName
);
if
(
hInst
)
if
(
nIconIndex
==
(
UINT16
)
-
1
)
/* get number of icons */
{
RetPtr
[
0
]
=
PrivateExtractIconsA
(
ofs
.
szPathName
,
0
,
0
,
0
,
NULL
,
NULL
,
0
,
LR_DEFAULTCOLOR
);
}
else
{
UINT
ret
;
HICON
*
icons
;
icons
=
HeapAlloc
(
GetProcessHeap
(),
0
,
n
*
sizeof
(
*
icons
));
ret
=
PrivateExtractIconsA
(
ofs
.
szPathName
,
nIconIndex
,
GetSystemMetrics
(
SM_CXICON
),
GetSystemMetrics
(
SM_CYICON
),
icons
,
NULL
,
n
,
LR_DEFAULTCOLOR
);
if
((
ret
!=
0xffffffff
)
&&
ret
)
{
int
i
;
for
(
i
=
nIconIndex
;
i
<
nIconIndex
+
n
;
i
++
)
RetPtr
[
i
-
nIconIndex
]
=
HICON_16
(
LoadIconA
(
hInst
,
(
LPCSTR
)(
DWORD
)
i
));
FreeLibrary
(
hInst
);
return
hRet
;
for
(
i
=
0
;
i
<
n
;
i
++
)
RetPtr
[
i
]
=
HICON_16
(
icons
[
i
]);
}
GlobalFree16
(
hRet
);
return
0
;
else
{
GlobalFree16
(
hRet
);
hRet
=
0
;
}
HeapFree
(
GetProcessHeap
(),
0
,
icons
);
}
if
(
nIconIndex
==
(
UINT16
)
-
1
)
/* get number of icons */
{
RetPtr
[
0
]
=
PrivateExtractIconsA
(
ofs
.
szPathName
,
-
1
,
0
,
0
,
NULL
,
0
,
0
,
0
);
}
else
{
HRESULT
res
;
HICON
*
icons
;
icons
=
HeapAlloc
(
GetProcessHeap
(),
0
,
n
*
sizeof
(
*
icons
)
);
res
=
PrivateExtractIconsA
(
ofs
.
szPathName
,
nIconIndex
,
GetSystemMetrics
(
SM_CXICON
),
GetSystemMetrics
(
SM_CYICON
),
icons
,
0
,
n
,
0
);
if
(
!
res
)
{
int
i
;
for
(
i
=
0
;
i
<
n
;
i
++
)
RetPtr
[
i
]
=
HICON_16
(
icons
[
i
]);
}
else
{
GlobalFree16
(
hRet
);
hRet
=
0
;
}
HeapFree
(
GetProcessHeap
(),
0
,
icons
);
}
return
hRet
;
return
hRet
;
}
/*************************************************************************
...
...
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