EnumSystemFiles(void (*func)(char *))
EnumSystemFiles(void (*func)(const char *))
EnumSystemFiles(void (*func)(char *)){    APIRET              rc;    ULONG               sysInfo = 0;    char                bootLetter[2];    char                sysDir[_MAX_PATH] = "";    char                filename[_MAX_PATH];    HDIR                hdir = HDIR_CREATE;    ULONG               numFiles = 1;    FILEFINDBUF3        fileBuf = {0};    ULONG               buflen = sizeof(FILEFINDBUF3);    if (DosQuerySysInfo(QSV_BOOT_DRIVE, QSV_BOOT_DRIVE, (PVOID)&sysInfo,                        sizeof(ULONG)) == NO_ERROR)    {      bootLetter[0] = sysInfo + 'A' -1;      strcpy(sysDir, bootLetter);      strcpy(sysDir+1, ":\\OS2\\");      strcpy( filename, sysDir );      strcat( filename, "*.*" );    }    rc =DosFindFirst( filename, &hdir, FILE_NORMAL, &fileBuf, buflen,                      &numFiles, FIL_STANDARD );    if( rc == NO_ERROR )    {      do {        // pass the full pathname to the callback        sprintf( filename, "%s\\%s", sysDir, fileBuf.achName );        (*func)(filename);        numFiles = 1;        rc = DosFindNext( hdir, &fileBuf, buflen, &numFiles );        if( rc != NO_ERROR && rc != ERROR_NO_MORE_FILES )          printf( "DosFindNext errod code = %d\n", rc );      } while ( rc == NO_ERROR );      rc = DosFindClose(hdir);      if( rc != NO_ERROR )        printf( "DosFindClose error code = %d", rc );    }    else      printf( "DosFindFirst error code = %d", rc );    return TRUE;}