Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
53ad4cbb
Commit
53ad4cbb
authored
19 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
user: Fixed PrivateExtractIcons to pass the tests when using native dlls.
parent
d237bda6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/user/exticon.c
+17
-7
17 additions, 7 deletions
dlls/user/exticon.c
with
17 additions
and
7 deletions
dlls/user/exticon.c
+
17
−
7
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
(
n
Icon
s
==
0
)
if
(
!
p
Icon
Id
)
{
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) */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment