Click here to Skip to main content
14,877,232 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GetPrivateProfileString method: problems on Windows Vista Pin
Michael Dunn5-Sep-07 14:23
sitebuilderMichael Dunn5-Sep-07 14:23 
GeneralRe: GetPrivateProfileString method: problems on Windows Vista Pin
El Corazon5-Sep-07 14:30
MemberEl Corazon5-Sep-07 14:30 
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
MemberEl Corazon5-Sep-07 19:03 
QuestionCView MFC Printing Pin
NorGUI5-Sep-07 7:19
MemberNorGUI5-Sep-07 7:19 
AnswerRe: CView MFC Printing Pin
led mike5-Sep-07 7:39
Memberled mike5-Sep-07 7:39 
AnswerRe: CView MFC Printing Pin
bob169725-Sep-07 17:05
Memberbob169725-Sep-07 17:05 
QuestionFile I/O: What is the best approach Pin
KenThompson5-Sep-07 6:15
MemberKenThompson5-Sep-07 6:15 
I am currently involved a project that requires that I have random access to multiple files on disk. I have a single 'file writer' object that handles writes, but I am unsure about how to proceed with reads.

The question is: If I want to be able to service multiple 'reads' at the same time to a single file should I have a single object (an fstream) that is synchronized (using a lock) or multiple fstream objects that are independent. I want to take advantage of my raid hardware as well as multiple processors throughout the application. My initial thought is that having multiple 'reader' objects leaves synchronization up to the OS, and that using some type of locking mechanism (such as a criticalsection/mutex) could slow performance.

Any help here is much appreciated.

On a side note: If I'm just writing buffers of data (or 1 byte aligned structures) does it make more sense to just use stdio functions?


AnswerRe: File I/O: What is the best approach Pin
led mike5-Sep-07 7:38
Memberled mike5-Sep-07 7:38 
GeneralRe: File I/O: What is the best approach Pin
KenThompson5-Sep-07 7:53
MemberKenThompson5-Sep-07 7:53 
GeneralRe: File I/O: What is the best approach Pin
led mike5-Sep-07 8:16
Memberled mike5-Sep-07 8:16 
GeneralRe: File I/O: What is the best approach Pin
KenThompson5-Sep-07 8:27
MemberKenThompson5-Sep-07 8:27 
GeneralRe: File I/O: What is the best approach Pin
led mike5-Sep-07 8:58
Memberled mike5-Sep-07 8:58 
GeneralRe: File I/O: What is the best approach Pin
jhwurmbach5-Sep-07 21:45
Memberjhwurmbach5-Sep-07 21:45 
GeneralRe: File I/O: What is the best approach Pin
KenThompson6-Sep-07 4:41
MemberKenThompson6-Sep-07 4:41 
AnswerRe: File I/O: What is the best approach Pin
cmk5-Sep-07 17:03
Membercmk5-Sep-07 17:03 
GeneralRe: File I/O: What is the best approach Pin
KenThompson6-Sep-07 4:42
MemberKenThompson6-Sep-07 4:42 
QuestionSimple UDP Server Pin
Andy2025-Sep-07 5:14
MemberAndy2025-Sep-07 5:14 
AnswerRe: Simple UDP Server Pin
led mike5-Sep-07 5:49
Memberled mike5-Sep-07 5:49 
QuestionHow to protect my vector, or any other variable? Pin
bosfan5-Sep-07 4:25
Memberbosfan5-Sep-07 4:25 
AnswerRe: How to protect my vector, or any other variable? Pin
Waldermort5-Sep-07 4:29
MemberWaldermort5-Sep-07 4:29 
QuestionRe: How to protect my vector, or any other variable? Pin
David Crow5-Sep-07 4:31
MemberDavid Crow5-Sep-07 4:31 
AnswerRe: How to protect my vector, or any other variable? Pin
bosfan6-Sep-07 1:32
Memberbosfan6-Sep-07 1:32 
GeneralRe: How to protect my vector, or any other variable? Pin
David Crow6-Sep-07 2:09
MemberDavid Crow6-Sep-07 2:09 
AnswerRe: How to protect my vector, or any other variable? Pin
El Corazon5-Sep-07 4:55
MemberEl Corazon5-Sep-07 4:55 

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.