The following code illustrates how to create a chunk in a file.
HMMIO hmmio1; MMCKINFO mmckinfo; USHORT usFlags; USHORT rc; ... memset( &mmckinfo, '\0', sizeof(MMCKINFO) ); mmckinfo.ckid = FOURCC_WAVE; mmckinfo.ckSize = 1000; usFlags |= MMIO_CREATERIFF; rc = mmioCreateChunk(hmmio1, &mmckinfo, usFlags); if (rc) /* error */ else ...