user32: Use proper types in ICO_GetIconDirectory.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Jacek Caban 2016-04-29 21:00:34 +02:00 committed by Alexandre Julliard
parent 5aaa8e25ad
commit 03b93eeeff
3 changed files with 21 additions and 25 deletions

View File

@ -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};

View File

@ -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;

View File

@ -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;