%HAXELIB_ROOT%/systools/1,1,0/project/src/win/icons.h
/*
 * Create a GRPICONDIRHEADER from an ICONDIRHEADER.
 *
 * Returns malloc()'d memory.
 */
Create a GRPICONDIRHEADER from an ICONDIRHEADER.
Returns malloc()'d memory.
Create a GRPICONDIRHEADER from an ICONDIRHEADER . Returns malloc () ' d memory .
static GRPICONDIRHEADER *CreateGrpIconDirHeader(ICONDIRHEADER *pidh, int icoid)
{
    GRPICONDIRHEADER *pgidh;
    size_t size;
    int i;
    size = sizeof(GRPICONDIRHEADER) + sizeof(GRPICONDIRENTRY) * pidh->idCount;
    pgidh = (GRPICONDIRHEADER *)malloc(size);
    pgidh->idReserved = pidh->idReserved;
    pgidh->idType = pidh->idType;
    pgidh->idCount = pidh->idCount;
    for (i = 0; i < pidh->idCount; ++i) {
	pgidh->idEntries[i].bWidth = pidh->idEntries[i].bWidth;
	pgidh->idEntries[i].bHeight = pidh->idEntries[i].bHeight;
	pgidh->idEntries[i].bColorCount = pidh->idEntries[i].bColorCount;
	pgidh->idEntries[i].bReserved = pidh->idEntries[i].bReserved;
	pgidh->idEntries[i].wPlanes = pidh->idEntries[i].wPlanes;
	pgidh->idEntries[i].wBitCount = pidh->idEntries[i].wBitCount;
	pgidh->idEntries[i].dwBytesInRes = pidh->idEntries[i].dwBytesInRes;
	pgidh->idEntries[i].nID = icoid + i ;
    }
    return pgidh;
}
static GRPICONDIRHEADER * CreateGrpIconDirHeader ( ICONDIRHEADER * pidh , int icoid ) { GRPICONDIRHEADER * pgidh ; size_t size ; int i ; size = sizeof ( GRPICONDIRHEADER ) + sizeof ( GRPICONDIRENTRY ) * pidh -> idCount ; pgidh = ( GRPICONDIRHEADER * ) malloc ( size ) ; pgidh -> idReserved = pidh -> idReserved ; pgidh -> idType = pidh -> idType ; pgidh -> idCount = pidh -> idCount ; for ( i = 0 ; i < pidh -> idCount ; ++ i ) { pgidh -> idEntries [ i ] . bWidth = pidh -> idEntries [ i ] . bWidth ; pgidh -> idEntries [ i ] . bHeight = pidh -> idEntries [ i ] . bHeight ; pgidh -> idEntries [ i ] . bColorCount = pidh -> idEntries [ i ] . bColorCount ; pgidh -> idEntries [ i ] . bReserved = pidh -> idEntries [ i ] . bReserved ; pgidh -> idEntries [ i ] . wPlanes = pidh -> idEntries [ i ] . wPlanes ; pgidh -> idEntries [ i ] . wBitCount = pidh -> idEntries [ i ] . wBitCount ; pgidh -> idEntries [ i ] . dwBytesInRes = pidh -> idEntries [ i ] . dwBytesInRes ; pgidh -> idEntries [ i ] . nID = icoid + i ; } return pgidh ; }
Create a GRPICONDIRHEADER from an ICONDIRHEADER.
Create a GRPICONDIRHEADER from an ICONDIRHEADER .