|
-
Nov 28th, 2009, 10:24 PM
#1
New Member
Re: VB6 - Treat a file like an array without reading to memory.
I forgot to mention it, but the necessity of Comintern's code should make it clear that VB6 cannot directly manipulate the mapped file via pointers - you need to dump the data into a variable of some sort (like the SafeArray structure) before you can manipulate it and send it back.
However, this just gives you a few more hoops to jump through, and if you are careful with your code you can maintain all the benefits of shared memory and blazing IO that MMFs give you.
-
Dec 30th, 2009, 05:14 AM
#2
New Member
Re: VB6 - Treat a file like an array without reading to memory.
My project is saving acquisition data to a file. The data as: 900 bytes/sample, 500 samples/second. I receive each data sample from a data acquisition board. This sample will be checked and if it okay, my program will write it to a file. When I press a button (on the my program), the program will close the file.
I had a look the example above. The data stay in memory and only write to HDD after released pages. This method will faster a normal method in my program (I think that).
But in my program, I can write the data continue to end posision of file. But in this example, I must declare a fix array before mapping file. Can you find a any way to do with a file without knowing len?
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
|