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
Releases
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
Johnny Cai
wine
Commits
418ca6d1
Commit
418ca6d1
authored
22 years ago
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add SHDefExtractIcon{AW} function.
parent
263cdcd8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/shell32/iconcache.c
+41
-0
41 additions, 0 deletions
dlls/shell32/iconcache.c
dlls/shell32/shell32.spec
+5
-0
5 additions, 0 deletions
dlls/shell32/shell32.spec
include/shlobj.h
+9
-0
9 additions, 0 deletions
include/shlobj.h
with
55 additions
and
0 deletions
dlls/shell32/iconcache.c
+
41
−
0
View file @
418ca6d1
...
...
@@ -534,3 +534,44 @@ HICON WINAPI ExtractAssociatedIconExA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD
HeapFree
(
GetProcessHeap
(),
0
,
lpwstrFile
);
return
ret
;
}
/****************************************************************************
* SHDefExtractIconW [SHELL32.@]
*/
HRESULT
WINAPI
SHDefExtractIconW
(
LPCWSTR
pszIconFile
,
int
iIndex
,
UINT
uFlags
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
)
{
UINT
ret
;
HICON
hIcons
[
2
];
WARN
(
"%s %d 0x%08x %p %p %d, semi-stub
\n
"
,
debugstr_w
(
pszIconFile
),
iIndex
,
uFlags
,
phiconLarge
,
phiconSmall
,
nIconSize
);
ret
=
PrivateExtractIconsW
(
pszIconFile
,
iIndex
,
nIconSize
,
nIconSize
,
hIcons
,
NULL
,
2
,
LR_DEFAULTCOLOR
);
/* FIXME: deal with uFlags parameter which contains GIL_ flags */
if
(
ret
==
0xFFFFFFFF
)
return
E_FAIL
;
if
(
ret
>
0
)
{
*
phiconLarge
=
hIcons
[
0
];
*
phiconSmall
=
hIcons
[
1
];
return
S_OK
;
}
return
S_FALSE
;
}
/****************************************************************************
* SHDefExtractIconA [SHELL32.@]
*/
HRESULT
WINAPI
SHDefExtractIconA
(
LPCSTR
pszIconFile
,
int
iIndex
,
UINT
uFlags
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
)
{
HRESULT
ret
;
INT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pszIconFile
,
-
1
,
NULL
,
0
);
LPWSTR
lpwstrFile
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
TRACE
(
"%s %d 0x%08x %p %p %d
\n
"
,
pszIconFile
,
iIndex
,
uFlags
,
phiconLarge
,
phiconSmall
,
nIconSize
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pszIconFile
,
-
1
,
lpwstrFile
,
len
);
ret
=
SHDefExtractIconW
(
lpwstrFile
,
iIndex
,
uFlags
,
phiconLarge
,
phiconSmall
,
nIconSize
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwstrFile
);
return
ret
;
}
This diff is collapsed.
Click to expand it.
dlls/shell32/shell32.spec
+
5
−
0
View file @
418ca6d1
...
...
@@ -411,3 +411,8 @@
@ stdcall SHGetFolderPathA(long long long long ptr)SHGetFolderPathA
@ stdcall SHGetFolderPathW(long long long long ptr)SHGetFolderPathW
@ stdcall SHGetFolderLocation(long long long long ptr)SHGetFolderLocation
# version 6.0 (WinXP)
# _WIN32_IE >= 0x600
@ stdcall SHDefExtractIconA(str long long ptr ptr long) SHDefExtractIconA
@ stdcall SHDefExtractIconW(wstr long long ptr ptr long) SHDefExtractIconW
This diff is collapsed.
Click to expand it.
include/shlobj.h
+
9
−
0
View file @
418ca6d1
...
...
@@ -569,6 +569,15 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND, INT, LPITEMIDLIST *);
#define CSIDL_FLAG_MASK 0xff00
/****************************************************************************
* SHDefExtractIcon API
*/
HRESULT
WINAPI
SHDefExtractIconA
(
LPCSTR
pszIconFile
,
int
iIndex
,
UINT
uFlags
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
);
HRESULT
WINAPI
SHDefExtractIconW
(
LPCWSTR
pszIconFile
,
int
iIndex
,
UINT
uFlags
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIconSize
);
#define SHDefExtractIcon WINELIB_NAME_AW(SHDefExtractIcon)
/*
* DROPFILES for CF_HDROP and CF_PRINTERS
*/
...
...
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