Commit 628e3e0f authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Implemented ExtractIconEx16, added some consts to ExtractIconEx*.

parent 18aacf15
...@@ -706,7 +706,7 @@ INT32 WINAPI Shell_GetCachedImageIndex32AW(LPCVOID szPath, INT32 nIndex, DWORD z ...@@ -706,7 +706,7 @@ INT32 WINAPI Shell_GetCachedImageIndex32AW(LPCVOID szPath, INT32 nIndex, DWORD z
/************************************************************************* /*************************************************************************
* ExtracticonEx32 [shell32.189] * ExtracticonEx32 [shell32.189]
*/ */
HICON32 WINAPI ExtractIconEx32AW ( LPVOID lpszFile, INT32 nIconIndex, HICON32 * phiconLarge, HICON32 * phiconSmall, UINT32 nIcons ) HICON32 WINAPI ExtractIconEx32AW ( LPCVOID lpszFile, INT32 nIconIndex, HICON32 * phiconLarge, HICON32 * phiconSmall, UINT32 nIcons )
{ if (VERSION_OsIsUnicode()) { if (VERSION_OsIsUnicode())
return ExtractIconEx32W ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); return ExtractIconEx32W ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
return ExtractIconEx32A ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons); return ExtractIconEx32A ( lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons);
...@@ -718,7 +718,7 @@ HICON32 WINAPI ExtractIconEx32AW ( LPVOID lpszFile, INT32 nIconIndex, HICON32 * ...@@ -718,7 +718,7 @@ HICON32 WINAPI ExtractIconEx32AW ( LPVOID lpszFile, INT32 nIconIndex, HICON32 *
* 1 file is not valid * 1 file is not valid
* HICON32 handle of a icon (phiconLarge/Small == NULL) * HICON32 handle of a icon (phiconLarge/Small == NULL)
*/ */
HICON32 WINAPI ExtractIconEx32A ( LPSTR lpszFile, INT32 nIconIndex, HICON32 * phiconLarge, HICON32 * phiconSmall, UINT32 nIcons ) HICON32 WINAPI ExtractIconEx32A ( LPCSTR lpszFile, INT32 nIconIndex, HICON32 * phiconLarge, HICON32 * phiconSmall, UINT32 nIcons )
{ HICON32 ret=0; { HICON32 ret=0;
TRACE(shell,"file=%s idx=%i %p %p num=%i\n", lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons ); TRACE(shell,"file=%s idx=%i %p %p num=%i\n", lpszFile, nIconIndex, phiconLarge, phiconSmall, nIcons );
...@@ -750,7 +750,7 @@ HICON32 WINAPI ExtractIconEx32A ( LPSTR lpszFile, INT32 nIconIndex, HICON32 * ph ...@@ -750,7 +750,7 @@ HICON32 WINAPI ExtractIconEx32A ( LPSTR lpszFile, INT32 nIconIndex, HICON32 * ph
/************************************************************************* /*************************************************************************
* ExtracticonEx32W [shell32.191] * ExtracticonEx32W [shell32.191]
*/ */
HICON32 WINAPI ExtractIconEx32W ( LPWSTR lpszFile, INT32 nIconIndex, HICON32 * phiconLarge, HICON32 * phiconSmall, UINT32 nIcons ) HICON32 WINAPI ExtractIconEx32W ( LPCWSTR lpszFile, INT32 nIconIndex, HICON32 * phiconLarge, HICON32 * phiconSmall, UINT32 nIcons )
{ LPSTR sFile; { LPSTR sFile;
DWORD ret; DWORD ret;
......
...@@ -21,7 +21,7 @@ type win16 ...@@ -21,7 +21,7 @@ type win16
37 pascal DoEnvironmentSubst(ptr word) DoEnvironmentSubst 37 pascal DoEnvironmentSubst(ptr word) DoEnvironmentSubst
38 pascal FindEnvironmentString(ptr) FindEnvironmentString 38 pascal FindEnvironmentString(ptr) FindEnvironmentString
39 pascal16 InternalExtractIcon(word ptr s_word word) InternalExtractIcon 39 pascal16 InternalExtractIcon(word ptr s_word word) InternalExtractIcon
40 stub ExtractIconEx 40 pascal16 ExtractIconEx(str word ptr ptr word) ExtractIconEx16
# 98 stub SHL3216_THUNKDATA16 # 98 stub SHL3216_THUNKDATA16
# 99 stub SHL1632_THUNKDATA16 # 99 stub SHL1632_THUNKDATA16
......
...@@ -311,10 +311,11 @@ LPWSTR WINAPI StrFormatByteSize32W ( DWORD dw, LPWSTR pszBuf, UINT32 cchBuf ); ...@@ -311,10 +311,11 @@ LPWSTR WINAPI StrFormatByteSize32W ( DWORD dw, LPWSTR pszBuf, UINT32 cchBuf );
/**************************************************************************** /****************************************************************************
* other functions * other functions
*/ */
HICON32 WINAPI ExtractIconEx32A ( LPSTR, INT32, HICON32 *, HICON32 *, UINT32 ); HICON16 WINAPI ExtractIconEx16 ( LPCSTR, INT16, HICON16 *, HICON16 *, UINT16 );
HICON32 WINAPI ExtractIconEx32W ( LPWSTR, INT32, HICON32 *, HICON32 *, UINT32 ); HICON32 WINAPI ExtractIconEx32A( LPCSTR, INT32, HICON32 *, HICON32 *, UINT32 );
HICON32 WINAPI ExtractIconEx32W( LPCWSTR, INT32, HICON32 *, HICON32 *, UINT32 );
#define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx) #define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
HICON32 WINAPI ExtractIconEx32AW ( LPVOID, INT32, HICON32 *, HICON32 *, UINT32 ); HICON32 WINAPI ExtractIconEx32AW(LPCVOID, INT32, HICON32 *, HICON32 *, UINT32 );
LPVOID WINAPI SHAlloc(DWORD len); LPVOID WINAPI SHAlloc(DWORD len);
DWORD WINAPI SHFree(LPVOID x); DWORD WINAPI SHFree(LPVOID x);
......
...@@ -875,7 +875,38 @@ HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName, ...@@ -875,7 +875,38 @@ HICON16 WINAPI ExtractIcon16( HINSTANCE16 hInstance, LPCSTR lpszExeFileName,
return ExtractIcon32A( hInstance, lpszExeFileName, nIconIndex ); return ExtractIcon32A( hInstance, lpszExeFileName, nIconIndex );
} }
/*************************************************************************
* ExtractIconEx16 (SHELL.40)
*/
HICON16 WINAPI ExtractIconEx16(
LPCSTR lpszFile, INT16 nIconIndex, HICON16 *phiconLarge,
HICON16 *phiconSmall, UINT16 nIcons
) {
HICON32 *ilarge,*ismall;
UINT16 ret;
int i;
if (phiconLarge)
ilarge = (HICON32*)HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON32));
else
ilarge = NULL;
if (phiconSmall)
ismall = (HICON32*)HeapAlloc(GetProcessHeap(),0,nIcons*sizeof(HICON32));
else
ismall = NULL;
ret = ExtractIconEx32A(lpszFile,nIconIndex,ilarge,ismall,nIcons);
if (ilarge) {
for (i=0;i<nIcons;i++)
phiconLarge[i]=ilarge[i];
HeapFree(GetProcessHeap(),0,ilarge);
}
if (ismall) {
for (i=0;i<nIcons;i++)
phiconSmall[i]=ismall[i];
HeapFree(GetProcessHeap(),0,ismall);
}
return ret;
}
/************************************************************************* /*************************************************************************
* ExtractAssociatedIcon [SHELL.36] * ExtractAssociatedIcon [SHELL.36]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment