The following code illustrates how to remove an element from a compound file and compact it after it is removed.
ULONG ulReturnCode; ulReturnCode=mmioRemoveElement("test.bnd+element",MMIO_RE_COMPACT); if (ulReturnCode) ... error ... success