Object * picture;
ULONG numPictures;
/* Note: you must always initialize this value
* prior to querying the number of pictures
* stored in a file.
*/
numPictures = PDTANUMPICTURES_Unknown;
picture = NewDTObject(...,
PDTA_WhichPicture,0,
PDTA_GetNumPictures,&numPictures,
...
TAG_DONE);
/* Now check if there is more than a single picture
if(numPictures != PDTANUMPICTURES_Unknown &&
{
Object * secondPicture;
picture = NewDTObject(...,
PDTA_WhichPicture,1,
...
TAG_DONE);
...
}