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

C / C++ / MFC

 
GeneralRe: GetPrivateProfileString method: problems on Windows Vista Pin
Michael Dunn5-Sep-07 17:19
sitebuilderMichael Dunn5-Sep-07 17:19 
GeneralRe: GetPrivateProfileString method: problems on Windows Vista Pin
El Corazon5-Sep-07 19:03
El Corazon5-Sep-07 19:03 
QuestionCView MFC Printing Pin
NorGUI5-Sep-07 7:19
NorGUI5-Sep-07 7:19 
AnswerRe: CView MFC Printing Pin
led mike5-Sep-07 7:39
led mike5-Sep-07 7:39 
AnswerRe: CView MFC Printing Pin
bob169725-Sep-07 17:05
bob169725-Sep-07 17:05 
QuestionFile I/O: What is the best approach Pin
KenThompson5-Sep-07 6:15
KenThompson5-Sep-07 6:15 
AnswerRe: File I/O: What is the best approach Pin
led mike5-Sep-07 7:38
led mike5-Sep-07 7:38 
GeneralRe: File I/O: What is the best approach Pin
KenThompson5-Sep-07 7:53
KenThompson5-Sep-07 7:53 
I'm already synchronizing write and read operations. By this I mean that I keep track of what is currently being done to the file. Basically, the writer never goes backwards, so whatever has been written is fair game in regards to reading. The only random access is reading. A database for this application isn't acceptable.

The question remains though. What approach is the best? Have a single reader per file handling many requests. (ie. setg to the offset) or having several fstream objects created that read independently, in a shared mode.

I didn't mean that the OS, in this case Windows, prevents corruption when modifying files. I should of been more clear in my statement. I meant to say: My initial thought is that having multiple 'reader' objects is perfectly acceptable and not a performance hit. In addition, in a raid situation would it not make more sense to create multiple file streams to the same file due to the very nature of multiple disk heads? I'm not all that aware of where there is any performance to gain based on implementation. I can only assume that if I issue two reads to the same file, via two streams, that the raid controller (in my case raid 5) would out perform a setg operation. Maybe not with 2 reads, but maybe 100s of reads per second. Does this make sense?
GeneralRe: File I/O: What is the best approach Pin
led mike5-Sep-07 8:16
led mike5-Sep-07 8:16 
GeneralRe: File I/O: What is the best approach Pin
KenThompson5-Sep-07 8:27
KenThompson5-Sep-07 8:27 
GeneralRe: File I/O: What is the best approach Pin
led mike5-Sep-07 8:58
led mike5-Sep-07 8:58 
GeneralRe: File I/O: What is the best approach Pin
jhwurmbach5-Sep-07 21:45
jhwurmbach5-Sep-07 21:45 
GeneralRe: File I/O: What is the best approach Pin
KenThompson6-Sep-07 4:41
KenThompson6-Sep-07 4:41 
AnswerRe: File I/O: What is the best approach Pin
cmk5-Sep-07 17:03
cmk5-Sep-07 17:03 
GeneralRe: File I/O: What is the best approach Pin
KenThompson6-Sep-07 4:42
KenThompson6-Sep-07 4:42 
QuestionSimple UDP Server Pin
Andy2025-Sep-07 5:14
Andy2025-Sep-07 5:14 
AnswerRe: Simple UDP Server Pin
led mike5-Sep-07 5:49
led mike5-Sep-07 5:49 
QuestionHow to protect my vector, or any other variable? Pin
bosfan5-Sep-07 4:25
bosfan5-Sep-07 4:25 
AnswerRe: How to protect my vector, or any other variable? Pin
Waldermort5-Sep-07 4:29
Waldermort5-Sep-07 4:29 
QuestionRe: How to protect my vector, or any other variable? Pin
David Crow5-Sep-07 4:31
David Crow5-Sep-07 4:31 
AnswerRe: How to protect my vector, or any other variable? Pin
bosfan6-Sep-07 1:32
bosfan6-Sep-07 1:32 
GeneralRe: How to protect my vector, or any other variable? Pin
David Crow6-Sep-07 2:09
David Crow6-Sep-07 2:09 
AnswerRe: How to protect my vector, or any other variable? Pin
El Corazon5-Sep-07 4:55
El Corazon5-Sep-07 4:55 
QuestionExtracting Zip file stored as BLOB from DB using VC++ Pin
sourav.chats5-Sep-07 4:23
sourav.chats5-Sep-07 4:23 
QuestionNoob seeks help with codecave! [modified] Pin
selkov5-Sep-07 4:07
selkov5-Sep-07 4:07 

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.