prefix_length = strlen(directory) - 1;
prefix_length = lstrlen(directory) - 1;
int ExtractDirEntries(char* directory, void* vZip){  int   err;  int   result;  char  buf[512];  // XXX: need an XP "max path"  int paths = 1;  if(paths)  {    void* find = ZIP_FindInit(vZip, directory);    if(find)    {      int prefix_length = 0;            if(directory)        prefix_length = strlen(directory) - 1;      if(prefix_length >= sizeof(buf)-1)        return ZIP_ERR_GENERAL;      err = ZIP_FindNext( find, buf, sizeof(buf) );      while ( err == ZIP_OK )       {        CreateDirectoriesAll(buf, FALSE);        if(buf[lstrlen(buf) - 1] != '/')          // only extract if it's a file          result = ZIP_ExtractFile(vZip, buf, buf);        err = ZIP_FindNext( find, buf, sizeof(buf) );      }      ZIP_FindFree( find );    }    else      err = ZIP_ERR_GENERAL;    if ( err == ZIP_ERR_FNF )      return ZIP_OK;   // found them all  }  return ZIP_ERR_GENERAL;}