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
53ad4cbb
Commit
53ad4cbb
authored
Apr 04, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Fixed PrivateExtractIcons to pass the tests when using native dlls.
parent
d237bda6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
exticon.c
dlls/user/exticon.c
+17
-7
No files found.
dlls/user/exticon.c
View file @
53ad4cbb
...
...
@@ -401,9 +401,9 @@ static UINT ICO_ExtractIconExW(
CloseHandle
(
fmapping
);
cx1
=
LOWORD
(
cxDesired
);
cx2
=
HIWORD
(
cxDesired
)
?
HIWORD
(
cxDesired
)
:
cx1
;
cx2
=
HIWORD
(
cxDesired
);
cy1
=
LOWORD
(
cyDesired
);
cy2
=
HIWORD
(
cyDesired
)
?
HIWORD
(
cyDesired
)
:
cy1
;
cy2
=
HIWORD
(
cyDesired
);
if
(
pIconId
)
/* Invalidate first icon identifier */
*
pIconId
=
0xFFFFFFFF
;
...
...
@@ -469,7 +469,8 @@ static UINT ICO_ExtractIconExW(
/* .ICO files have only one icon directory */
if
(
lpiID
==
NULL
)
/* not *.ico */
pCIDir
=
USER32_LoadResource
(
peimage
,
pIconDir
+
i
+
nIconIndex
,
*
(
WORD
*
)
pData
,
&
uSize
);
pIconId
[
i
]
=
LookupIconIdFromDirectoryEx
(
pCIDir
,
TRUE
,
(
i
&
1
)
?
cx2
:
cx1
,
(
i
&
1
)
?
cy2
:
cy1
,
flags
);
pIconId
[
i
]
=
LookupIconIdFromDirectoryEx
(
pCIDir
,
TRUE
,
cx1
,
cy1
,
flags
);
if
(
cx2
&&
cy2
)
pIconId
[
++
i
]
=
LookupIconIdFromDirectoryEx
(
pCIDir
,
TRUE
,
cx2
,
cy2
,
flags
);
}
if
(
lpiID
&&
pCIDir
)
/* *.ico file, deallocate heap pointer*/
HeapFree
(
GetProcessHeap
(),
0
,
pCIDir
);
...
...
@@ -485,8 +486,13 @@ static UINT ICO_ExtractIconExW(
pCIDir
=
USER32_LoadResource
(
peimage
,
pIconStorage
+
i
,
*
(
WORD
*
)
pData
,
&
uSize
);
if
(
pCIDir
)
{
RetPtr
[
icon
]
=
(
HICON
)
CreateIconFromResourceEx
(
pCIDir
,
uSize
,
TRUE
,
0x00030000
,
(
icon
&
1
)
?
cx2
:
cx1
,
(
icon
&
1
)
?
cy2
:
cy1
,
flags
);
cx1
,
cy1
,
flags
);
if
(
cx2
&&
cy2
)
RetPtr
[
++
icon
]
=
(
HICON
)
CreateIconFromResourceEx
(
pCIDir
,
uSize
,
TRUE
,
0x00030000
,
cx2
,
cy2
,
flags
);
}
else
RetPtr
[
icon
]
=
0
;
}
...
...
@@ -550,7 +556,7 @@ static UINT ICO_ExtractIconExW(
iconDirCount
=
icongroupresdir
->
NumberOfNamedEntries
+
icongroupresdir
->
NumberOfIdEntries
;
/* only number of icons requested */
if
(
nIcons
==
0
)
if
(
!
pIconId
)
{
ret
=
iconDirCount
;
goto
end
;
/* success */
...
...
@@ -630,7 +636,8 @@ static UINT ICO_ExtractIconExW(
FIXME
(
"no matching real address for icongroup!
\n
"
);
goto
end
;
/* failure */
}
pIconId
[
i
]
=
LookupIconIdFromDirectoryEx
(
igdata
,
TRUE
,
(
i
&
1
)
?
cx2
:
cx1
,
(
i
&
1
)
?
cy2
:
cy1
,
flags
);
pIconId
[
i
]
=
LookupIconIdFromDirectoryEx
(
igdata
,
TRUE
,
cx1
,
cy1
,
flags
);
if
(
cx2
&&
cy2
)
pIconId
[
++
i
]
=
LookupIconIdFromDirectoryEx
(
igdata
,
TRUE
,
cx2
,
cy2
,
flags
);
}
if
(
!
(
iconresdir
=
find_entry_by_id
(
rootresdir
,
LOWORD
(
RT_ICON
),
rootresdir
)))
...
...
@@ -669,7 +676,10 @@ static UINT ICO_ExtractIconExW(
continue
;
}
RetPtr
[
i
]
=
(
HICON
)
CreateIconFromResourceEx
(
idata
,
idataent
->
Size
,
TRUE
,
0x00030000
,
(
i
&
1
)
?
cx2
:
cx1
,
(
i
&
1
)
?
cy2
:
cy1
,
flags
);
cx1
,
cy1
,
flags
);
if
(
cx2
&&
cy2
)
RetPtr
[
++
i
]
=
(
HICON
)
CreateIconFromResourceEx
(
idata
,
idataent
->
Size
,
TRUE
,
0x00030000
,
cx2
,
cy2
,
flags
);
}
ret
=
i
;
/* return number of retrieved icons */
}
/* if(sig == IMAGE_NT_SIGNATURE) */
...
...
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