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

C / C++ / MFC

 
GeneralRe: Moving from VC++ 6.0 to VC++2005 Pin
josip cagalj7-Dec-07 3:55
josip cagalj7-Dec-07 3:55 
GeneralMFC Modal OpenGL dialog wont show up unless I pressed "Alt" key (on intel hardware) Pin
xanagan6666-Dec-07 22:37
xanagan6666-Dec-07 22:37 
Questionstruct member alignment? Pin
Laurence6-Dec-07 20:36
Laurence6-Dec-07 20:36 
AnswerRe: struct member alignment? Pin
Matthew Faithfull7-Dec-07 2:23
Matthew Faithfull7-Dec-07 2:23 
AnswerRe: struct member alignment? Pin
Bram van Kampen7-Dec-07 13:12
Bram van Kampen7-Dec-07 13:12 
GeneralData corruption during File Write Pin
SelvaKr6-Dec-07 20:35
SelvaKr6-Dec-07 20:35 
GeneralRe: Data corruption during File Write Pin
Nelek6-Dec-07 21:32
protectorNelek6-Dec-07 21:32 
GeneralRe: Data corruption during File Write Pin
JudyL_MD7-Dec-07 2:02
JudyL_MD7-Dec-07 2:02 
An alternative to Nelek's suggestion of Open, Write, Close is to call a Flush after every write.

There always is a window of opportunity for disk files to get trashed. Even using the suggestions you've received, there is a chance that the machine will power down before the disk cache is written to disk. The only way to make that window smaller is to use something like the commit function, which is a pretty low level C function. It instructs the OS to issue the actual write commands to the disk. The one case you can't guard against is someone powering off a machine while the actual physical write is in progress, but from what little you said, it sounds flush should give you what you need.

Judy
GeneralRe: Data corruption during File Write Pin
Bram van Kampen7-Dec-07 12:46
Bram van Kampen7-Dec-07 12:46 
Generalerrors in converting code from multibyte to unicode Pin
neha.agarwal276-Dec-07 20:13
neha.agarwal276-Dec-07 20:13 
GeneralRe: errors in converting code from multibyte to unicode Pin
kcynic6-Dec-07 20:42
kcynic6-Dec-07 20:42 
GeneralRe: errors in converting code from multibyte to unicode Pin
CPallini6-Dec-07 23:47
mveCPallini6-Dec-07 23:47 
GeneralRe: errors in converting code from multibyte to unicode Pin
krmed7-Dec-07 1:59
krmed7-Dec-07 1:59 
GeneralHelp about characterset [modified] Pin
kcynic6-Dec-07 20:11
kcynic6-Dec-07 20:11 
GeneralRe: Help about characterset Pin
Hamed Musavi7-Dec-07 3:25
Hamed Musavi7-Dec-07 3:25 
GeneralRe: Help about characterset Pin
kcynic7-Dec-07 14:14
kcynic7-Dec-07 14:14 
GeneralRe: Help about characterset Pin
Hamed Musavi7-Dec-07 19:24
Hamed Musavi7-Dec-07 19:24 
QuestionHelp! How to change the color of the current row in datagrid [modified] Pin
shakaqrj6-Dec-07 19:49
shakaqrj6-Dec-07 19:49 
GeneralHelp in visual C++ Pin
cinzhan6-Dec-07 19:39
cinzhan6-Dec-07 19:39 
GeneralRe: Help in visual C++ Pin
ThatsAlok6-Dec-07 20:11
ThatsAlok6-Dec-07 20:11 
Generaldata map declartion. Pin
CodingLover6-Dec-07 18:53
CodingLover6-Dec-07 18:53 
GeneralRe: data map declartion. Pin
Karismatic6-Dec-07 19:34
Karismatic6-Dec-07 19:34 
GeneralRe: data map declartion. Pin
CodingLover6-Dec-07 20:04
CodingLover6-Dec-07 20:04 
GeneralRe: data map declartion. Pin
jhwurmbach6-Dec-07 21:40
jhwurmbach6-Dec-07 21:40 
GeneralRe: data map declartion. Pin
David Crow7-Dec-07 2:57
David Crow7-Dec-07 2:57 

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.