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
418ca6d1
Commit
418ca6d1
authored
Dec 07, 2002
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Dec 07, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add SHDefExtractIcon{AW} function.
parent
263cdcd8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
iconcache.c
dlls/shell32/iconcache.c
+41
-0
shell32.spec
dlls/shell32/shell32.spec
+5
-0
shlobj.h
include/shlobj.h
+9
-0
No files found.
dlls/shell32/iconcache.c
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
;
}
dlls/shell32/shell32.spec
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
include/shlobj.h
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
*/
...
...
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