i using windwos xp , want append data (about 4 mb each time) file. using 'writefilegather', increase offset's value of overlapped struct time. since the system call 32 bit, offset value(dword) can not exceed 4gb value.
code sample:
large_integer size; if (!getfilesizeex(_hfile, &size)) { return; } overlapped.offset = size.quadpart;
using ftell , fseek not working me. apparently, 'writefilegather' requires overlapped.offset value assigned.
what way exceed 4g limit?
writefilegather
takes overlapped
structure gets offset within file @ writing starts. offset split high , low doubleword (offset
, offsethigh
), it's 64-bit offset.
so, if want use writefilegather
(personally, wouldn't), no hindrance. cannot write more 4gb in 1 go (but wouldn't want anyway!), though total file length or offset file can lot larger that.
Comments
Post a Comment