handling files above 4GB in VC++

S

sona

hi all

i m using the function SetFilePointer to move the file pointer to a
64-bit offset.
i m using it as follows n writting my data but everytime it jumps to
the same location for ne offset value which i guess is 2^32.

LARGE_INTEGER li;
li = distance //64-bit offset

li.LowPart = SetFilePointer(hfile,li.LowPart,&li.HighPart,FILE_BEGIN);

li.LowPart has the lower 32 bit and li.HighPart has the higher 32-bit
values of the 64-bit offset. the retun value is correct for the
function the file pointer is stuck at one position for all inputs.

kindly help....

sona
 
P

peter koch

sona said:
hi all

i m using the function SetFilePointer to move the file pointer to a
64-bit offset.
i m using it as follows n writting my data but everytime it jumps to
the same location for ne offset value which i guess is 2^32.

LARGE_INTEGER li;
li = distance //64-bit offset

li.LowPart = SetFilePointer(hfile,li.LowPart,&li.HighPart,FILE_BEGIN);

li.LowPart has the lower 32 bit and li.HighPart has the higher 32-bit
values of the 64-bit offset. the retun value is correct for the
function the file pointer is stuck at one position for all inputs.

kindly help....
Neither LARGE_INTEGER or SetFilePointer is part of standard C++, so we
can not help you here. I believe you should visit some microsoft group
(microsoft.public.*) for help. There are lots of groups so you'll have
to look around a little.

/Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top