CInfoPBRec cipb; /* allocate a union */
cipb. hFileInfo.vRefNum = 2; /* as a union member field */
cipb. dirInfo.ioDrFndrInfo.frLocation.h = 100;
hfipb->vRefNum = 2 ; Û/* or as a structure field */
dipb->ioDrFndrInfo.frLocation.h = 100;
unsigned char pb[108]; /* big enough to hold either struct */
short theVRef;
theVRef = ((HFileInfo *)pb)-> ioVRefNum; /* fetch 1 field */ ((HFileParam *)pb)->ioFlLgLen = 1000L; /* change some fields */ /* access chars of a long */
printf("File type is '%c%c%c%c'\n", pb[32], pb[33], pb[34],pb[35]);