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
a9568dd0
Commit
a9568dd0
authored
Aug 20, 2002
by
Dusan Lacko
Committed by
Alexandre Julliard
Aug 20, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix extraction of icons from ICO files.
parent
2e0d8cfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
shelllink.c
dlls/shell32/shelllink.c
+15
-11
No files found.
dlls/shell32/shelllink.c
View file @
a9568dd0
...
...
@@ -473,6 +473,15 @@ static int ExtractFromEXEDLL(const char *szFileName, int nIndex, const char *szX
return
0
;
}
/* get the Unix file name for a given path, allocating the string */
inline
static
char
*
get_unix_file_name
(
const
char
*
dos
)
{
char
buffer
[
MAX_PATH
];
if
(
!
wine_get_unix_file_name
(
dos
,
buffer
,
sizeof
(
buffer
)
))
return
NULL
;
return
heap_strdup
(
buffer
);
}
static
int
ExtractFromICO
(
const
char
*
szFileName
,
const
char
*
szXPMFileName
)
{
FILE
*
fICOFile
;
...
...
@@ -482,8 +491,10 @@ static int ExtractFromICO(const char *szFileName, const char *szXPMFileName)
int
nIndex
=
0
;
void
*
pIcon
;
int
i
;
char
*
filename
;
if
(
!
(
fICOFile
=
fopen
(
szFileName
,
"r"
)))
filename
=
get_unix_file_name
(
szFileName
);
if
(
!
(
fICOFile
=
fopen
(
filename
,
"r"
)))
goto
error1
;
if
(
fread
(
&
iconDir
,
sizeof
(
ICONDIR
),
1
,
fICOFile
)
!=
1
)
...
...
@@ -525,18 +536,10 @@ static int ExtractFromICO(const char *szFileName, const char *szXPMFileName)
error2:
fclose
(
fICOFile
);
error1:
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
return
0
;
}
/* get the Unix file name for a given path, allocating the string */
inline
static
char
*
get_unix_file_name
(
const
char
*
dos
)
{
char
buffer
[
MAX_PATH
];
if
(
!
wine_get_unix_file_name
(
dos
,
buffer
,
sizeof
(
buffer
)
))
return
NULL
;
return
heap_strdup
(
buffer
);
}
static
BOOL
create_default_icon
(
const
char
*
filename
)
{
FILE
*
fXPM
;
...
...
@@ -997,7 +1000,8 @@ HRESULT WINAPI IShellLink_Constructor (
TRACE
(
"(%p)->()
\n
"
,
sl
);
if
(
IsEqualIID
(
riid
,
&
IID_IShellLinkA
))
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IShellLinkA
))
*
ppv
=
sl
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellLinkW
))
*
ppv
=
&
(
sl
->
lpvtblw
);
...
...
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