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
96ebd310
Commit
96ebd310
authored
Jun 17, 2005
by
Marcus Meissner
Committed by
Alexandre Julliard
Jun 17, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ExtractAssociatedIconA needs to allocate enough space to have EAIW
fill in lpIconPathW.
parent
0d307eb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
iconcache.c
dlls/shell32/iconcache.c
+7
-1
No files found.
dlls/shell32/iconcache.c
View file @
96ebd310
...
@@ -640,7 +640,12 @@ HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lp
...
@@ -640,7 +640,12 @@ HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lp
{
{
HICON
hIcon
=
NULL
;
HICON
hIcon
=
NULL
;
INT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpIconPath
,
-
1
,
NULL
,
0
);
INT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
lpIconPath
,
-
1
,
NULL
,
0
);
LPWSTR
lpIconPathW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
/* Note that we need to allocate MAX_PATH, since we are supposed to fill
* the correct executable if there is no icon in lpIconPath directly.
* lpIconPath itself is supposed to be large enough, so make sure lpIconPathW
* is large enough too. Yes, I am puking too.
*/
LPWSTR
lpIconPathW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_PATH
*
sizeof
(
WCHAR
));
TRACE
(
"%p %s %p
\n
"
,
hInst
,
debugstr_a
(
lpIconPath
),
lpiIcon
);
TRACE
(
"%p %s %p
\n
"
,
hInst
,
debugstr_a
(
lpIconPath
),
lpiIcon
);
...
@@ -648,6 +653,7 @@ HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lp
...
@@ -648,6 +653,7 @@ HICON WINAPI ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lp
{
{
MultiByteToWideChar
(
CP_ACP
,
0
,
lpIconPath
,
-
1
,
lpIconPathW
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lpIconPath
,
-
1
,
lpIconPathW
,
len
);
hIcon
=
ExtractAssociatedIconW
(
hInst
,
lpIconPathW
,
lpiIcon
);
hIcon
=
ExtractAssociatedIconW
(
hInst
,
lpIconPathW
,
lpiIcon
);
WideCharToMultiByte
(
CP_ACP
,
0
,
lpIconPathW
,
-
1
,
lpIconPath
,
MAX_PATH
,
NULL
,
NULL
);
HeapFree
(
GetProcessHeap
(),
0
,
lpIconPathW
);
HeapFree
(
GetProcessHeap
(),
0
,
lpIconPathW
);
}
}
return
hIcon
;
return
hIcon
;
...
...
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