473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

handling files above 4GB in VC++

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
1 2179

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Hans-Joachim Widmaier | last post by:
Hi all. Handling files is an extremely frequent task in programming, so most programming languages have an abstraction of the basic files offered by the underlying operating system. This is...
7
by: | last post by:
I have this code: --------------------- try { int *a = new int; } catch (...) { cout << "oh no!"; exit(0); } ---------------------- new returns 0 but no exception occur in this error. Why?
3
by: WindAndWaves | last post by:
I am writing error handling procedures at the moment. Here are some questions: 1. Can you write a procedure that picks up any error and deals with it no matter where it happens in the database?...
4
by: aaj | last post by:
Hi all I have an automated application, that runs in the middle of the night. If certain 'non system' errors occur (things like malformed files, missing files etc..), I send an automatic Email...
3
by: Ashok Kumar K | last post by:
Hi all, Where can I get some insight on using the __hook, __unhook, event_source and event_receiver for specifically COM events. The documentation given in MSDN is very minimal. I have the...
9
by: Gustaf | last post by:
I'm confused about structured error handling. The following piece of code is a simplification of a class library I'm working on. It works, and it does what I want, but I'm still not convinced that...
2
by: Susan Baker | last post by:
Hi, I am writing a Win32 DLL. I want to be able to handle any SEGVs (segmentation violations) gracefully, by using an error handler of sorts. Currently, if a user of my DLL (typically a VB...
10
by: subramanian | last post by:
Consider the following code: segment violation is deliberately generated to catch the SIGSEGV signal. The handler for this signal, namely SIGSEGV_handler, is called. However after the handler is...
132
by: Zorro | last post by:
The simplicity of stack unraveling of C++ is not without defective consequences. The following article points to C++ examples showing the defects. An engineer aware of defects can avoid...
6
by: sathiyamurthy | last post by:
Hi all I am working in VC++ domain. i need one help regarding vc++ exception handling. how to use exception handling in vc++? how to get the error message? how to avoid the runtime error. i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.