This function will determine (if possible) the format of a file by either using the file name or querying currently installed I/O procedures to see which I/O procedure can understand and process the specified file.
#define INCL_MMIOOS2
#include <os2.h>
PSZ pszFileName; /* Filename. */
PMMIOINFO pmmioinfo; /* Pointer to MMIOINFO. */
PMMFORMATINFO pmmformatinfo; /* Pointer to MMFORMATINFO. */
PFOURCC pfccStorageSystem; /* FOURCC pointer. */
ULONG ulReserved; /* Reserved. */
ULONG ulFlags; /* Flags. */
ULONG rc; /* Return codes. */
rc = mmioIdentifyFile(pszFileName, pmmioinfo,
pmmformatinfo, pfccStorageSystem, ulReserved,
ulFlags);