#include "wine/unicode.h"
#include "wine/wingdi16.h"
-#include "cursoricon.h"
#ifdef HAVE_JPEGLIB_H
/* This is a hack, so jpeglib.h does not redefine INT32 and the like*/
WINE_DEFAULT_DEBUG_CHANNEL(ole);
+#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"
+
/*************************************************************************
* Declaration of implementation class
*/
const IConnectionPointContainerVtbl *lpvtbl4;
/* Object reference count */
- DWORD ref;
+ LONG ref;
/* We own the object and must destroy it ourselves */
BOOL fOwn;
);
/* */
padding = (gif->SWidth+3) & ~3;
- bmi = HeapAlloc(GetProcessHeap(),0,sizeof(BITMAPINFOHEADER)+(1<<gif->SColorResolution)*sizeof(RGBQUAD));
- bytes= HeapAlloc(GetProcessHeap(),0,padding*gif->SHeight);
si = gif->SavedImages+0;
gid = &(si->ImageDesc);
cm = gid->ColorMap;
if (!cm) cm = gif->SColorMap;
+ bmi = HeapAlloc(GetProcessHeap(),0,sizeof(BITMAPINFOHEADER)+(cm->ColorCount)*sizeof(RGBQUAD));
+ bytes= HeapAlloc(GetProcessHeap(),0,padding*gif->SHeight);
/* look for the transparent color extension */
for (i = 0; i < si->ExtensionBlockCount; ++i) {
}
}
- for (i=0;i<(1<<gif->SColorResolution);i++) {
+ for (i = 0; i < cm->ColorCount; i++) {
bmi->bmiColors[i].rgbRed = cm->Colors[i].Red;
bmi->bmiColors[i].rgbGreen = cm->Colors[i].Green;
bmi->bmiColors[i].rgbBlue = cm->Colors[i].Blue;
bmi->bmiHeader.biSizeImage = padding*gif->SHeight;
bmi->bmiHeader.biXPelsPerMeter = 0;
bmi->bmiHeader.biYPelsPerMeter = 0;
- bmi->bmiHeader.biClrUsed = 1 << gif->SColorResolution;
+ bmi->bmiHeader.biClrUsed = cm->ColorCount;
bmi->bmiHeader.biClrImportant = 0;
hdcref = GetDC(0);
{
/* IUnknown fields */
const IClassFactoryVtbl *lpVtbl;
- DWORD ref;
+ LONG ref;
} IClassFactoryImpl;
static HRESULT WINAPI