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
86bd0603
Commit
86bd0603
authored
Mar 25, 2014
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Forward ShExtractIconsW to user32.PrivateExtractIconsW.
parent
fb31e0fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
1 deletion
+61
-1
shell32.spec
dlls/shell32/shell32.spec
+1
-1
shelllink.c
dlls/shell32/tests/shelllink.c
+60
-0
No files found.
dlls/shell32/shell32.spec
View file @
86bd0603
...
...
@@ -347,7 +347,7 @@
@ stdcall SHCreateShellItemArrayFromShellItem(ptr ptr ptr)
@ stdcall SHEmptyRecycleBinA(long str long)
@ stdcall SHEmptyRecycleBinW(long wstr long)
@ st
ub SH
ExtractIconsW
@ st
dcall SHExtractIconsW(wstr long long long ptr ptr long long) user32.Private
ExtractIconsW
@ stdcall SHFileOperation(ptr) SHFileOperationA
@ stdcall SHFileOperationA(ptr)
@ stdcall SHFileOperationW(ptr)
...
...
dlls/shell32/tests/shelllink.c
View file @
86bd0603
...
...
@@ -42,6 +42,7 @@ static HRESULT (WINAPI *pSHDefExtractIconA)(LPCSTR, int, UINT, HICON*, HICON*, U
static
HRESULT
(
WINAPI
*
pSHGetStockIconInfo
)(
SHSTOCKICONID
,
UINT
,
SHSTOCKICONINFO
*
);
static
DWORD
(
WINAPI
*
pGetLongPathNameA
)(
LPCSTR
,
LPSTR
,
DWORD
);
static
DWORD
(
WINAPI
*
pGetShortPathNameA
)(
LPCSTR
,
LPSTR
,
DWORD
);
static
UINT
(
WINAPI
*
pSHExtractIconsW
)(
LPCWSTR
,
int
,
int
,
int
,
HICON
*
,
UINT
*
,
UINT
,
UINT
);
static
const
GUID
_IID_IShellLinkDataList
=
{
0x45e2b4ae
,
0xb1c3
,
0x11d0
,
...
...
@@ -1095,6 +1096,63 @@ static void test_SHGetStockIconInfo(void)
ok
(
hr
==
E_INVALIDARG
,
"NULL: got 0x%x
\n
"
,
hr
);
}
static
void
test_SHExtractIcons
(
void
)
{
static
const
WCHAR
notepadW
[]
=
{
'n'
,
'o'
,
't'
,
'e'
,
'p'
,
'a'
,
'd'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
static
const
WCHAR
shell32W
[]
=
{
's'
,
'h'
,
'e'
,
'l'
,
'l'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
emptyW
[]
=
{
0
};
UINT
ret
,
ret2
;
HICON
icons
[
256
];
UINT
ids
[
256
],
i
;
if
(
!
pSHExtractIconsW
)
{
win_skip
(
"SHExtractIconsW not available
\n
"
);
return
;
}
ret
=
pSHExtractIconsW
(
emptyW
,
0
,
16
,
16
,
icons
,
ids
,
1
,
0
);
ok
(
ret
==
~
0u
,
"got %u
\n
"
,
ret
);
ret
=
pSHExtractIconsW
(
notepadW
,
0
,
16
,
16
,
NULL
,
NULL
,
1
,
0
);
ok
(
ret
==
1
||
broken
(
ret
==
2
)
/* win2k */
,
"got %u
\n
"
,
ret
);
icons
[
0
]
=
(
HICON
)
0xdeadbeef
;
ret
=
pSHExtractIconsW
(
notepadW
,
0
,
16
,
16
,
icons
,
NULL
,
1
,
0
);
ok
(
ret
==
1
,
"got %u
\n
"
,
ret
);
ok
(
icons
[
0
]
!=
(
HICON
)
0xdeadbeef
,
"icon not set
\n
"
);
DestroyIcon
(
icons
[
0
]);
icons
[
0
]
=
(
HICON
)
0xdeadbeef
;
ids
[
0
]
=
0xdeadbeef
;
ret
=
pSHExtractIconsW
(
notepadW
,
0
,
16
,
16
,
icons
,
ids
,
1
,
0
);
ok
(
ret
==
1
,
"got %u
\n
"
,
ret
);
ok
(
icons
[
0
]
!=
(
HICON
)
0xdeadbeef
,
"icon not set
\n
"
);
ok
(
ids
[
0
]
!=
0xdeadbeef
,
"id not set
\n
"
);
DestroyIcon
(
icons
[
0
]);
ret
=
pSHExtractIconsW
(
shell32W
,
0
,
16
,
16
,
NULL
,
NULL
,
0
,
0
);
ret2
=
pSHExtractIconsW
(
shell32W
,
4
,
MAKELONG
(
32
,
16
),
MAKELONG
(
32
,
16
),
NULL
,
NULL
,
256
,
0
);
ok
(
ret
&&
ret
==
ret2
,
"icon count should be independent of requested icon sizes and base icon index
\n
"
);
ret
=
pSHExtractIconsW
(
shell32W
,
0
,
16
,
16
,
icons
,
ids
,
0
,
0
);
ok
(
ret
==
~
0u
||
!
ret
/* < vista */
,
"got %u
\n
"
,
ret
);
ret
=
pSHExtractIconsW
(
shell32W
,
0
,
16
,
16
,
icons
,
ids
,
3
,
0
);
ok
(
ret
==
3
,
"got %u
\n
"
,
ret
);
for
(
i
=
0
;
i
<
ret
;
i
++
)
DestroyIcon
(
icons
[
i
]);
/* count must be a multiple of two when getting two sizes */
ret
=
pSHExtractIconsW
(
shell32W
,
0
,
MAKELONG
(
16
,
32
),
MAKELONG
(
16
,
32
),
icons
,
ids
,
3
,
0
);
ok
(
!
ret
/* vista */
||
ret
==
4
,
"got %u
\n
"
,
ret
);
for
(
i
=
0
;
i
<
ret
;
i
++
)
DestroyIcon
(
icons
[
i
]);
ret
=
pSHExtractIconsW
(
shell32W
,
0
,
MAKELONG
(
16
,
32
),
MAKELONG
(
16
,
32
),
icons
,
ids
,
4
,
0
);
ok
(
ret
==
4
,
"got %u
\n
"
,
ret
);
for
(
i
=
0
;
i
<
ret
;
i
++
)
DestroyIcon
(
icons
[
i
]);
}
START_TEST
(
shelllink
)
{
HRESULT
r
;
...
...
@@ -1108,6 +1166,7 @@ START_TEST(shelllink)
pSHGetStockIconInfo
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHGetStockIconInfo"
);
pGetLongPathNameA
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetLongPathNameA"
);
pGetShortPathNameA
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetShortPathNameA"
);
pSHExtractIconsW
=
(
void
*
)
GetProcAddress
(
hmod
,
"SHExtractIconsW"
);
r
=
CoInitialize
(
NULL
);
ok
(
r
==
S_OK
,
"CoInitialize failed (0x%08x)
\n
"
,
r
);
...
...
@@ -1120,6 +1179,7 @@ START_TEST(shelllink)
test_shdefextracticon
();
test_GetIconLocation
();
test_SHGetStockIconInfo
();
test_SHExtractIcons
();
CoUninitialize
();
}
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