BITMAPINFO * pBmi = 0; pBmi = (BITMAPINFO*) new BYTE [ sizeof (BITMAPINFO) + (sizeof (RGBQUAD) * 8)) ];
Ok, and is there a replacement for 'realloc'? Case in point:
typedef struct {
BYTE width;
<more members....>
} ICONDIRENTRY;typedef struct {
WORD idCount;
ICONDIRENTRY idEntries[1];
} ICONDIR;ICONDIR* icon = new ICONDIR; HANDLE file = ::CreateFile(<parameters go here>); ::ReadFile(file, &icon->idCount, sizeof(WORD), <more parameters...>);
Now I should realloc the icondir->idEntries array to (sizeof(ICONDIRENTRY) * icon->idCount). But how? Thanks.
cheers,
roel
