Commit 03b93eee authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

user32: Use proper types in ICO_GetIconDirectory.

parent 5aaa8e25
......@@ -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};
......
......@@ -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;
......
......@@ -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;
......
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