shell32:ExtractAssociatedIconEx{AW}
Rolf Kalbermatter
rolf.kalbermatter at citeng.com
Fri Nov 29 17:51:38 CST 2002
ChangeLog:
* dlls/shell32/iconcache.c
- add stub implementation with correct prototype for
ExtractAssociatedIconExA/W
* dlls/shell32/shell32.spec
- add stub implementation with correct prototype for
ExtractAssociatedIconExA/W
* include/shellapi.h
- add stub implementation with correct prototype for
ExtractAssociatedIconExA/W
License: X11/LGPL
Rolf Kalbermatter
Index: include/shellapi.h
===================================================================
RCS file: /home/wine/wine/include/shellapi.h,v
retrieving revision 1.17
diff -u -r1.17 shellapi.h
--- include/shellapi.h 12 Nov 2002 01:05:00 -0000 1.17
+++ include/shellapi.h 29 Nov 2002 23:35:06 -0000
@@ -270,6 +270,9 @@
HICON WINAPI ExtractAssociatedIconA(HINSTANCE,LPSTR,LPWORD);
HICON WINAPI ExtractAssociatedIconW(HINSTANCE,LPWSTR,LPWORD);
#define ExtractAssociatedIcon WINELIB_NAME_AW(ExtractAssociatedIcon)
+HICON WINAPI ExtractAssociatedIconExA(HINSTANCE,LPSTR,LPWORD,LPWORD);
+HICON WINAPI ExtractAssociatedIconExW(HINSTANCE,LPWSTR,LPWORD,LPWORD);
+#define ExtractAssociatedIconEx WINELIB_NAME_AW(ExtractAssociatedIconEx)
HICON WINAPI ExtractIconExA( LPCSTR, INT, HICON *, HICON *, UINT );
HICON WINAPI ExtractIconExW( LPCWSTR, INT, HICON *, HICON *, UINT );
#define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
Index: dlls/shell32/iconcache.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/iconcache.c,v
retrieving revision 1.61
diff -u -r1.61 iconcache.c
--- dlls/shell32/iconcache.c 21 Nov 2002 23:56:42 -0000 1.61
+++ dlls/shell32/iconcache.c 29 Nov 2002 23:48:53 -0000
@@ -498,25 +498,33 @@
}
/*************************************************************************
- * ExtractAssociatedIconExA (SHELL32.@)
+ * ExtractAssociatedIconExW (SHELL32.@)
*
* Return icon for given file (either from file itself or from associated
* executable) and patch parameters if needed.
*/
-HICON WINAPI ExtractAssociatedIconExA(DWORD d1, DWORD d2, DWORD d3, DWORD d4)
+HICON WINAPI ExtractAssociatedIconExW(HINSTANCE hInst, LPWSTR lpIconPath,
LPWORD lpiIconIdx, LPWORD lpiIconId)
{
- FIXME("(%lx %lx %lx %lx): stub\n", d1, d2, d3, d4);
+ FIXME("0x%08lx %s %p %p): stub\n", hInst, debugstr_w(lpIconPath), lpiIconIdx,
lpiIconId);
return 0;
}
/*************************************************************************
- * ExtractAssociatedIconExW (SHELL32.@)
+ * ExtractAssociatedIconExA (SHELL32.@)
*
* Return icon for given file (either from file itself or from associated
* executable) and patch parameters if needed.
*/
-HICON WINAPI ExtractAssociatedIconExW(DWORD d1, DWORD d2, DWORD d3, DWORD d4)
+HICON WINAPI ExtractAssociatedIconExA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD
lpiIconIdx, LPWORD lpiIconId)
{
- FIXME("(%lx %lx %lx %lx): stub\n", d1, d2, d3, d4);
- return 0;
+ HICON ret;
+ INT len = MultiByteToWideChar( CP_ACP, 0, lpIconPath, -1, NULL, 0 );
+ LPWSTR lpwstrFile = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
+
+ TRACE("0x%08lx %s %p %p)\n", hInst, lpIconPath, lpiIconIdx, lpiIconId);
+
+ MultiByteToWideChar( CP_ACP, 0, lpIconPath, -1, lpwstrFile, len );
+ ret = ExtractAssociatedIconExW(hInst, lpwstrFile, lpiIconIdx, lpiIconId);
+ HeapFree(GetProcessHeap(), 0, lpwstrFile);
+ return ret;
}
Index: dlls/shell32/shell32.spec
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32.spec,v
retrieving revision 1.57
diff -u -r1.57 shell32.spec
--- dlls/shell32/shell32.spec 4 Nov 2002 23:53:44 -0000 1.57
+++ dlls/shell32/shell32.spec 29 Nov 2002 23:23:38 -0000
@@ -321,8 +321,8 @@
@ stub DragQueryFileAorW
@ stdcall DuplicateIcon(long long) DuplicateIcon
@ stdcall ExtractAssociatedIconA(long ptr long)ExtractAssociatedIconA
-@ stdcall ExtractAssociatedIconExA(long long long long)ExtractAssociatedIconExA
-@ stdcall ExtractAssociatedIconExW(long long long long)ExtractAssociatedIconExW
+@ stdcall ExtractAssociatedIconExA(long ptr long long)ExtractAssociatedIconExA
+@ stdcall ExtractAssociatedIconExW(long ptr long long)ExtractAssociatedIconExW
@ stub ExtractAssociatedIconW
@ stdcall ExtractIconA(long str long)ExtractIconA
@ stdcall ExtractIconEx(ptr long ptr ptr long)ExtractIconExAW
More information about the wine-patches
mailing list