By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,118 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

handling files above 4GB in VC++

P: n/a
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

Sep 22 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

sona wrote:
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

Sep 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.