Jacek Caban : user32: Use proper types in ICO_GetIconDirectory.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon May 2 09:52:30 CDT 2016
Module: wine
Branch: master
Commit: 03b93eeeff304fadf1b11c622777cd75bb5e7f81
URL: http://source.winehq.org/git/wine.git/?a=commit;h=03b93eeeff304fadf1b11c622777cd75bb5e7f81
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Apr 29 21:00:34 2016 +0200
user32: Use proper types in ICO_GetIconDirectory.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/cursoricon.c | 23 -----------------------
dlls/user32/exticon.c | 4 ++--
dlls/user32/user_private.h | 19 +++++++++++++++++++
3 files changed, 21 insertions(+), 25 deletions(-)
diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c
index 4de6b28..4f93195 100644
--- a/dlls/user32/cursoricon.c
+++ b/dlls/user32/cursoricon.c
@@ -48,29 +48,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(cursor);
WINE_DECLARE_DEBUG_CHANNEL(icon);
WINE_DECLARE_DEBUG_CHANNEL(resource);
-#include "pshpack1.h"
-
-typedef struct {
- BYTE bWidth;
- BYTE bHeight;
- BYTE bColorCount;
- BYTE bReserved;
- WORD xHotspot;
- WORD yHotspot;
- DWORD dwDIBSize;
- DWORD dwDIBOffset;
-} CURSORICONFILEDIRENTRY;
-
-typedef struct
-{
- WORD idReserved;
- WORD idType;
- WORD idCount;
- CURSORICONFILEDIRENTRY idEntries[1];
-} CURSORICONFILEDIR;
-
-#include "poppack.h"
-
static HDC screen_dc;
static const WCHAR DISPLAYW[] = {'D','I','S','P','L','A','Y',0};
diff --git a/dlls/user32/exticon.c b/dlls/user32/exticon.c
index 0dbbef1..a428ae7 100644
--- a/dlls/user32/exticon.c
+++ b/dlls/user32/exticon.c
@@ -218,13 +218,13 @@ static BYTE * ICO_LoadIcon( LPBYTE peimage, LPicoICONDIRENTRY lpiIDE, ULONG *uSi
*/
static BYTE * ICO_GetIconDirectory( LPBYTE peimage, LPicoICONDIR* lplpiID, ULONG *uSize )
{
- CURSORICONDIR * lpcid; /* icon resource in resource-dir format */
+ CURSORICONFILEDIR *lpcid; /* icon resource in resource-dir format */
CURSORICONDIR * lpID; /* icon resource in resource format */
int i;
TRACE("%p %p\n", peimage, lplpiID);
- lpcid = (CURSORICONDIR*)peimage;
+ lpcid = (CURSORICONFILEDIR*)peimage;
if( lpcid->idReserved || (lpcid->idType != 1) || (!lpcid->idCount) )
return 0;
diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h
index ead7a53..e4a2ed1 100644
--- a/dlls/user32/user_private.h
+++ b/dlls/user32/user_private.h
@@ -318,6 +318,25 @@ typedef struct
CURSORICONDIRENTRY idEntries[1];
} CURSORICONDIR;
+typedef struct {
+ BYTE bWidth;
+ BYTE bHeight;
+ BYTE bColorCount;
+ BYTE bReserved;
+ WORD xHotspot;
+ WORD yHotspot;
+ DWORD dwDIBSize;
+ DWORD dwDIBOffset;
+} CURSORICONFILEDIRENTRY;
+
+typedef struct
+{
+ WORD idReserved;
+ WORD idType;
+ WORD idCount;
+ CURSORICONFILEDIRENTRY idEntries[1];
+} CURSORICONFILEDIR;
+
#include "poppack.h"
extern BOOL get_icon_size( HICON handle, SIZE *size ) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list