|
-
Apr 2nd, 2000, 03:06 PM
#1
Thread Starter
New Member
Hello VBWorld browsers,
I'm writing an application that use binary files as input. The files are quite big (>100MB) and the internal data types quite small (8 bytes each). This takes hours to browse through all the records due to the many "get" actions.
The solution would be to read the file in memory in big chunks first.
Before starting to write the code for that I wonder if anyone out there has done this already.
I heard that in C, there is a "memfile" function that aut. takes care of loading the file in memory. Does this (or something similar) exists in VB 6.x as well? that would be even easier and, probably, much faster as well.
hope to hear from anyone soon,
Regards,
Walter De Jean (Belgium)
-
Apr 3rd, 2000, 06:28 AM
#2
Addicted Member
Try looking up the CreatFileMapping and MapViewOfFileEx api functions. These functions allow you to operate on the memory directly as if it was in your application's workspace (very fast) and use asynchronous operations to allow you do one thing while waiting for another. For example, you could retrieve data from a file and at the same time clear all the controls on your form.
Go to http:\\www.vbapi.com for help on these and their related functions.
Hope this helps.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|