Click here to Skip to main content
16,012,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem retrieving data from list box Pin
Deepak Samuel23-Jul-03 23:56
Deepak Samuel23-Jul-03 23:56 
GeneralRe: problem retrieving data from list box Pin
Ryan Binns24-Jul-03 2:10
Ryan Binns24-Jul-03 2:10 
GeneralLoading text into a browser control Pin
HP723-Jul-03 13:14
HP723-Jul-03 13:14 
GeneralIs it possible to use Manifest file in VC6 Pin
Valera24117623-Jul-03 10:07
Valera24117623-Jul-03 10:07 
GeneralRe: Is it possible to use Manifest file in VC6 Pin
AlexO23-Jul-03 10:43
AlexO23-Jul-03 10:43 
GeneralRe: Is it possible to use Manifest file in VC6 Pin
Debs24-Jul-03 0:25
Debs24-Jul-03 0:25 
GeneralCreating un-fragmented files Pin
od@ananzi.co.za23-Jul-03 9:02
od@ananzi.co.za23-Jul-03 9:02 
GeneralRe: Creating un-fragmented files Pin
QuiJohn23-Jul-03 9:14
QuiJohn23-Jul-03 9:14 
Wow, that's fascinating. Those results surprise me.

I would guess that the severe fragmenting is due to the delayed write cache that Windows uses. It sees you madly writing data, so it waits before it actually commits anything to disk. But when it does, whatever algorithm it uses causes the files to get written haphazardly, resulting in fragmentation.

I made all that up as I went along, by the way.

Anyway, there are Flush functions that may force the file buffers to disk. If you're using fopen() there is a fflush() that may do what I'm suggesting. There is also CFile::Flush() if you swing that way. I think every method of file writing has an associated flush function.

I would recommend flushing each file at the end of each loop, maybe at the end of each block write. Just to see what happens.

Let us know what you find!
GeneralRe: Creating un-fragmented files Pin
AlexO23-Jul-03 9:15
AlexO23-Jul-03 9:15 
GeneralRe: Creating un-fragmented files Pin
David Crow23-Jul-03 9:15
David Crow23-Jul-03 9:15 
GeneralRe: Creating un-fragmented files Pin
John M. Drescher23-Jul-03 9:16
John M. Drescher23-Jul-03 9:16 
GeneralRe: Creating un-fragmented files Pin
Bob Stanneveld23-Jul-03 12:38
Bob Stanneveld23-Jul-03 12:38 
GeneralRe: Creating un-fragmented files Pin
Ryan Binns23-Jul-03 16:06
Ryan Binns23-Jul-03 16:06 
GeneralRe: Creating un-fragmented files Pin
Anders Molin23-Jul-03 13:41
professionalAnders Molin23-Jul-03 13:41 
GeneralRe: Creating un-fragmented files Pin
FlyingDancer23-Jul-03 15:04
FlyingDancer23-Jul-03 15:04 
GeneralRe: Creating un-fragmented files Pin
Ryan Binns23-Jul-03 16:05
Ryan Binns23-Jul-03 16:05 
GeneralRe: Creating un-fragmented files Pin
od@ananzi.co.za23-Jul-03 21:03
od@ananzi.co.za23-Jul-03 21:03 
GeneralAuto application logout Pin
Andrew Allen23-Jul-03 8:54
Andrew Allen23-Jul-03 8:54 
GeneralRe: Auto application logout Pin
John M. Drescher23-Jul-03 9:21
John M. Drescher23-Jul-03 9:21 
GeneralRe: Auto application logout Pin
Ryan Binns23-Jul-03 18:55
Ryan Binns23-Jul-03 18:55 
GeneralRe: Auto application logout Pin
John M. Drescher23-Jul-03 19:14
John M. Drescher23-Jul-03 19:14 
Generalqualifying enums ... Pin
Maximilien23-Jul-03 8:32
Maximilien23-Jul-03 8:32 
GeneralRe: qualifying enums ... Pin
Nathan Blomquist23-Jul-03 8:43
Nathan Blomquist23-Jul-03 8:43 
GeneralRe: qualifying enums ... Pin
QuiJohn23-Jul-03 8:55
QuiJohn23-Jul-03 8:55 
GeneralRe: qualifying enums ... Pin
John M. Drescher23-Jul-03 9:12
John M. Drescher23-Jul-03 9:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.