Click here to Skip to main content
15,888,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello..........
I'm now after achieving ReadFile() using this API function trying to write using WriteFile API function some bytes to my flash memory(pendrive). the problem is that I only can move the pointer using SetFilePointerEx() API function a multiple of 512 bytes offset, what if I want to write for example at 43 bytes offset? 43 is not multiple of 512 then a can't get there using SetFilePointerEx().. or really a can but a don't know how????..someone could help me?..
Posted

1 solution

The typical way of doing partial page writes to a device that only supports writes on page boundaries is to first read the entire page into memory, then change the bytes you want to change in your in memory copy, then write the entire page back out.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 7-Jul-11 19:19pm    
That is correct idea, my 5.
--SA
glbrt.gds 8-Jul-11 8:50am    
and mine too ............ :) ..thanks.. but.. what is the fastest way to modify my byte buffer array???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900