Re: Get/Put read/write efficiency
- From: "Mike Williams" <gagamomo@xxxxxxxxxxxxxx>
- Date: Tue, 13 Jan 2009 21:54:22 -0000
"mayayana" <mayaXXyana@xxxxxxxxx> wrote in message news:OTR841adJHA.3520@xxxxxxxxxxxxxxxxxxxxxxx
I was thinking there might be some kind of
syntax like a pointer in an API function, a way
to tell it to start writing from array(x). OK.
Yes, you can do that, as has been mentioned in a couple of responses, by setting up a temporary Byte array the same size as the data block you wish to load and then loading the file data into it and then using CopyMemory to copy the loaded block of data data into the main large array which contains the entire file. But there is no need to set up a temporary array at all if you don't wish to. You can do exactly what you have asked (tell it to start writing from array(x) and specify how many bytes you want) by setting up a SafeASrray structure and pointing it at the desired data position in the large array. This involves swapping only a four byte pointer no matter how many data bytes you wish to read or write. See my two recent responses for details.
Mike
.
- References:
- Get/Put read/write efficiency
- From: mayayana
- Re: Get/Put read/write efficiency
- From: Larry Serflaten
- Re: Get/Put read/write efficiency
- From: mayayana
- Get/Put read/write efficiency
- Prev by Date: Re: How to Get and Set Default Font on Forms and Controls?
- Next by Date: Re: How to Get and Set Default Font on Forms and Controls?
- Previous by thread: Re: Get/Put read/write efficiency
- Next by thread: RE: Get/Put read/write efficiency
- Index(es):
Relevant Pages
|