read file > 2 GB



hi all,

I need to read a binary file > 2GB. (17GB in this case)

So I'm trying to use the setfilepointer API, which
accepts 64 bit integers.

I could write a function to take my large offset and split it into
high/low 32 bit numbers, but for a quick test I thought I would just
loop (offset/max_long) number of times, moving the file pointer from
the current location each time. (max_long = 2^31) than finally moving
the reaminder. This way I'm staying with 32 bit numbers, and just pass
a null as the high order long (per the documentation).

Well when I pass max_long to the SetFilePointer routine it complains
about overflow, so I'm sure I'm messing up on some of the finer points
of api usage.

Anyone got any large file vb6 api (or non-api) references?

thanks

kpg
.



Relevant Pages

  • Re: read file > 2 GB
    ... So I'm trying to use the setfilepointer API, ... points of api usage. ... Good call, Bob, ... calculator can't do math any better than I can. ...
    (microsoft.public.vb.general.discussion)
  • Re: read file > 2 GB
    ... kpg wrote: ... So I'm trying to use the setfilepointer API, ... moving the file pointer from ... of api usage. ...
    (microsoft.public.vb.general.discussion)
  • importing embedded dynamic lib
    ... 2- import by embedded python interpreter using an API call. ... 1- what would be the recommended technique to embed a binary file inside ... 2- Let's imagine that I managed to load "noddy.so" into my source code ... Any hints as to the correct python API call to import a dynamic lib ...
    (comp.lang.python)
  • Re: read file > 2 GB
    ... moving the file pointer from ... points of api usage. ... calculator can't do math any better than I can. ...
    (microsoft.public.vb.general.discussion)
  • Re: Why no serious MS Application in .NET yet ??
    ... Anf that is why there is not a wrapper API for DDE. ... supporting existing APIs and moving forward? ... "CMM" wrote: ...
    (microsoft.public.dotnet.framework.clr)