Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Alternative to the file Get statement for large files
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



Report this thread to moderator Post Follow-up to this message
Old Post
Ed
04-26-05 01:56 PM


Re: Alternative to the file Get statement for large files
On 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

Report this thread to moderator Post Follow-up to this message
Old Post
J French
04-26-05 01:56 PM


Re: Alternative to the file Get statement for large files
Ed <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
----------------------------------------------------------------------


Report this thread to moderator Post Follow-up to this message
Old Post
Thorsten Albers
04-26-05 08:56 PM


Re: Alternative to the file Get statement for large files
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.

HTH,
TC


Report this thread to moderator Post Follow-up to this message
Old Post
TC
04-27-05 01:55 PM


Re: Alternative to the file Get statement for large files
"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.



Report this thread to moderator Post Follow-up to this message
Old Post
Sam Hobbs
04-28-05 08:56 AM


Re: Alternative to the file Get statement for large files
"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.



Report this thread to moderator Post Follow-up to this message
Old Post
Sam Hobbs
04-28-05 08:56 AM


Re: Alternative to the file Get statement for large files
On 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


Report this thread to moderator Post Follow-up to this message
Old Post
J French
04-28-05 08:56 AM


Re: Alternative to the file Get statement for large files
Nearly, 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


Report this thread to moderator Post Follow-up to this message
Old Post
TC
04-28-05 01:55 PM


Re: Alternative to the file Get statement for large files
Figured it out using API. Thanks for your help.

Ed



Report this thread to moderator Post Follow-up to this message
Old Post
Ed
04-28-05 08:57 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:34 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.