On 18 Nov 2001, at 12:05, Christopher Cave wrote: > Help please. I have just had parts of my QXL.WIN file > overwritten rather mysteriously. Fortunately, I have been > backing up my current project ever hour or so but I would like > to recover what I can using Wined. I used to have a > description of the QXL.WIN structure but it disappeared in an > earlier disaster. Can anyone please tell me where to find this > info?
What exactly do you need? The first sector contains afisk header and then the FAT. The following might help: Main header of device +00 long "QLWA" +04 word lenth device name +06 20 bytes ASCII device name +1A word 0000 ? +1C word random number +1E word access counter +20 word 0000 ? +22 word number of sectors (512 bytes) in cluster (4 = 2048 bytes) +24 3 x word 0000 0000 0000 ? +2A word total clusters (1) +2C word free clusters (1) +2E word size of FAT? +30 word 0001 ? +32 word pointer to first free cluster (2) +34 word pointer to main directory (2) +36 long lenth of main directory +header +3A 3 x word 0000 0000 0000 ? +40 words linked cluster pointer map (3) (1) virtual values if device > 33 MB (2) if cluster = 2048 bytes (h800) then pointer x h800 = address (3) Linked cluster pointer map: +0040 word pointer to next cluster or 0000 if end +0042 word pointer to next cluster or 0000 if end ... +xxxx word same until all clusters are pointed Example reading main directory (win about 20M):></B></P> +0022: 0004 ----> cluster = h800 +0034: 001A ----> x800 = address hD000 = DIR now look at (001A x 2 + h40 = 0074) if 0000 then main directory has no more clusters else for exemple: +0074: 1939 ---->; x800 = address hC9C800 more entries now look at (1939 x 2 + h40 = 32B2) +32B2: 2605 ---->; x800 = adress h01302800 still entries now look at (2605 x 2 + h40 = 4C4A) +4C4A: 0000 no more cluster: end of main directory Structure of directories: DIR+00 64 bytes space for header (not used) DIR+40+00 long lenth of file (+header) DIR+40+04 word filetype (0=data, 1=exe-file, h00FF=subdirectory) DIR+40+06 word generally 0000 sometimes 0318 DIR+40+08 word dataspace if exe-file else 0000 DIR+40+0A word generally 0000 sometimes 0318 if exe-file ? DIR+40+0C word 0000 ? DIR+40+0E word file name lenth DIR+40+10 36 bytes ASCII file name DIR+40+34 long date or 0000 0000 if subdir DIR+40+38 word overwrite counter ? DIR+40+3A word pointer to first file cluster (4) DIR+40+3C 2 x word 0000 0000 ? (4) Structure of file: FILE+00 64 (h40) bytes of space for not used header (only in the first cluster of file) FILE+40 h7C0 bytes of data then search next adress through clusterpointer: see example adress+00 h800 bytes of data until pointer = 0000 number of sectors = number of clusters * nbr_of_sects in clusters $8C00 space need for FAT = 2 bytes per cluster = 71680 bytes = 140 ($8c) sectors + $40 for header = 141 ($8d) sectors how to find a cluster in absolute positioning: cluster number * 512* nbr_of_sects_in_cluster Wolfgang ----------------- www.wlenerz.com