Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, I'm trying to read parts of a file which is about 4GB using VB6. Using the Get statement Get [#]filenumber, [recnumber], varname I soon run into problems. The recnumber is a long which only works up to roughly 2GB. How can I read a section of the file starting, lets say, around 3GB? I assume I will have to use an alternative to the Get statement. Any ideas? Best regards, Ed
Post Follow-up to this messageOn Tue, 26 Apr 2005 08:43:32 +0200, "Ed" <abcdef@hotmail.com> wrote: > >Hi, I'm trying to read parts of a file which is about 4GB using VB6. Using >the Get statement > >Get [#]filenumber, [recnumber], varname > >I soon run into problems. The recnumber is a long which only works up to >roughly 2GB. How can I read a section of the file starting, lets say, aroun d >3GB? I assume I will have to use an alternative to the Get statement. Any >ideas? I honestly think that you'll need to use the APIs to access over 2gb CreateFile, SetFilePointer etc
Post Follow-up to this messageEd <abcdef@hotmail.com> schrieb im Beitrag <uP9zEtiSFHA.1348@TK2MSFTNGP15.phx.gbl>... > Hi, I'm trying to read parts of a file which is about 4GB using VB6. Using > the Get statement > Get [#]filenumber, [recnumber], varname > I soon run into problems. The recnumber is a long which only works up to > roughly 2GB. How can I read a section of the file starting, lets say, around > 3GB? I assume I will have to use an alternative to the Get statement. Any > ideas? You will have to use the respective API functions like CreateFile(), ReadFile(), WriteFile(), and CloseHandle(). -- ---------------------------------------------------------------------- THORSTEN ALBERS Universität Freiburg albers@ uni-freiburg.de ----------------------------------------------------------------------
Post Follow-up to this messageThere was an MSDN article on how to manage large files from VB[A] using the win32 API's createfile, setfilepointer etc. Unfortunately I ca not find it right now, & I have to go from this pc! Do some googling & you may be able to find it. HTH, TC
Post Follow-up to this message"TC" <aatcbbtccctc@yahoo.com> wrote in message news:1114583707.634016.118960@o13g2000cwo.googlegroups.com... > There was an MSDN article on how to manage large files from VB[A] using > the win32 API's createfile, setfilepointer etc. Unfortunately I ca not > find it right now, & I have to go from this pc! Do some googling & you > may be able to find it. KB "HOWTO: Write Data to a File Using WriteFile APIVB" (165942) might help, but I assume there are many other samples in many of the other great sites with VB samples. My point is that sometimes people assume that the KB won't help and that it is only the other sites that can help.
Post Follow-up to this message"Ed" <abcdef@hotmail.com> wrote in message news:uP9zEtiSFHA.1348@TK2MSFTNGP15.phx.gbl... > > Hi, I'm trying to read parts of a file which is about 4GB using VB6. Using > the Get statement > > Get [#]filenumber, [recnumber], varname > > I soon run into problems. The recnumber is a long which only works up to > roughly 2GB. How can I read a section of the file starting, lets say, > around 3GB? I assume I will have to use an alternative to the Get > statement. Any ideas? If you search the internet using something such as: declare +CreateFilea You should be able to find many useful samples and such.
Post Follow-up to this messageOn Wed, 27 Apr 2005 17:13:01 -0700, "Sam Hobbs" <samuel@social.rr.com_change_social_to_socal> wrote: <snip> >If you search the internet using something such as: > > declare +CreateFilea > >You should be able to find many useful samples and such. But the first place to start is the downloadable API Guide from KPD http://www.mentalis.org/agnet/ Then look at the examples for CreateFile
Post Follow-up to this messageNearly, but not quite! There was one that provided "large" equivalents of all of the relevant primitives: Read, Write, S, etc. Stuffed if I can find it now :-( Cheers, TC
Post Follow-up to this messageFigured it out using API. Thanks for your help. Ed
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.