Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: Best way to Write and read from a file Pin
James R. Twine23-Feb-06 2:33
James R. Twine23-Feb-06 2:33 
GeneralRe: Best way to Write and read from a file Pin
Dennis Gourjii23-Feb-06 2:50
Dennis Gourjii23-Feb-06 2:50 
JokeRe: Best way to Write and read from a file Pin
James R. Twine23-Feb-06 3:28
James R. Twine23-Feb-06 3:28 
GeneralRe: Best way to Write and read from a file Pin
Dennis Gourjii23-Feb-06 3:45
Dennis Gourjii23-Feb-06 3:45 
AnswerRe: Best way to Write and read from a file Pin
James R. Twine23-Feb-06 4:51
James R. Twine23-Feb-06 4:51 
AnswerRe: Best way to Write and read from a file Pin
Wim Engberts23-Feb-06 5:01
Wim Engberts23-Feb-06 5:01 
GeneralRe: Best way to Write and read from a file Pin
fearless stallion23-Feb-06 19:03
fearless stallion23-Feb-06 19:03 
GeneralRe: Best way to Write and read from a file Pin
Wim Engberts23-Feb-06 23:17
Wim Engberts23-Feb-06 23:17 
My best suggestion would be to use locking. I don't know how big your file is going to be, but I assume that this will not be enormous? In that case, reading will only take some milliseconds, so your user will not even notice that he has been waiting for the read to complete.
On the other hand, locking is a two-way process: also your reading thread will have to wait for the write to complete. However, this too should take just milliseconds. Besindes, you could fine-tune all of this, by just locking the record that you are working with (the LockRange instruction allows you to specify a starting point and a size of the range you want to lock). This makes the chance of having to wait even smaller.

Success,
William
GeneralRe: Best way to Write and read from a file Pin
fearless stallion24-Feb-06 1:17
fearless stallion24-Feb-06 1:17 
AnswerRe: ListCtrl Pin
James R. Twine23-Feb-06 4:55
James R. Twine23-Feb-06 4:55 
QuestionOverwriting in the console Pin
Cedric Moonen22-Feb-06 23:59
Cedric Moonen22-Feb-06 23:59 
AnswerRe: Overwriting in the console Pin
divine_augustine8423-Feb-06 0:11
divine_augustine8423-Feb-06 0:11 
GeneralRe: Overwriting in the console Pin
toxcct23-Feb-06 0:13
toxcct23-Feb-06 0:13 
AnswerRe: Overwriting in the console Pin
toxcct23-Feb-06 0:12
toxcct23-Feb-06 0:12 
GeneralRe: Overwriting in the console Pin
Wim Engberts23-Feb-06 0:16
Wim Engberts23-Feb-06 0:16 
GeneralRe: Overwriting in the console Pin
toxcct23-Feb-06 0:17
toxcct23-Feb-06 0:17 
AnswerRe: Overwriting in the console Pin
toxcct23-Feb-06 0:25
toxcct23-Feb-06 0:25 
AnswerRe: Overwriting in the console Pin
Cedric Moonen23-Feb-06 0:49
Cedric Moonen23-Feb-06 0:49 
QuestionPrinting directly without dialog box Pin
LapinGarou22-Feb-06 23:53
LapinGarou22-Feb-06 23:53 
AnswerRe: Printing directly without dialog box Pin
Cool Ju23-Feb-06 0:08
Cool Ju23-Feb-06 0:08 
GeneralRe: Printing directly without dialog box Pin
LapinGarou24-Feb-06 22:49
LapinGarou24-Feb-06 22:49 
QuestionHow to get mac address from specical IP? Pin
Rulala22-Feb-06 23:14
Rulala22-Feb-06 23:14 
QuestionPC/SC in C++ Builder Pin
kittymew22-Feb-06 23:07
kittymew22-Feb-06 23:07 
Questionoperator () overloading. Pin
9ine22-Feb-06 23:00
9ine22-Feb-06 23:00 
AnswerRe: operator () overloading. Pin
Russell'22-Feb-06 23:22
Russell'22-Feb-06 23:22 

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.