The following code illustrates how to close a file.
HMMIO hmmio1; USHORT usFlags; USHORT rc; ... usFlags = 0; rc = mmioClose(hmmio1, usFlags); if (rc) /* error */ else ...