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

C / C++ / MFC

 
AnswerRe: Problem about IHTMLDocument2->wirte() , plz ! Pin
Leesen27-Feb-06 1:53
Leesen27-Feb-06 1:53 
Questionhard ware serial number Pin
ss200625-Feb-06 21:29
ss200625-Feb-06 21:29 
QuestionProgramming the Parallel Port Pin
kmaster25-Feb-06 21:12
kmaster25-Feb-06 21:12 
AnswerRe: Programming the Parallel Port Pin
Cool Ju26-Feb-06 0:53
Cool Ju26-Feb-06 0:53 
GeneralRe: Programming the Parallel Port Pin
normanS26-Feb-06 19:26
normanS26-Feb-06 19:26 
QuestionPrinting colors Pin
includeh1025-Feb-06 20:52
includeh1025-Feb-06 20:52 
Questionhardware monitor Pin
gr8coaster32925-Feb-06 13:45
gr8coaster32925-Feb-06 13:45 
AnswerRe: hardware monitor Pin
Hamid_RT25-Feb-06 17:15
Hamid_RT25-Feb-06 17:15 
QuestionRe: hardware monitor Pin
gr8coaster32926-Feb-06 15:07
gr8coaster32926-Feb-06 15:07 
AnswerRe: hardware monitor Pin
Hamid_RT26-Feb-06 17:30
Hamid_RT26-Feb-06 17:30 
QuestionCEdit Default focus Pin
j_sharan25-Feb-06 12:28
j_sharan25-Feb-06 12:28 
AnswerRe: CEdit Default focus Pin
Hamid_RT25-Feb-06 17:07
Hamid_RT25-Feb-06 17:07 
AnswerRe: CEdit Default focus Pin
FarPointer26-Feb-06 3:58
FarPointer26-Feb-06 3:58 
QuestionCDialog and Keyboard events Pin
braveheartkenya25-Feb-06 11:15
braveheartkenya25-Feb-06 11:15 
AnswerRe: CDialog and Keyboard events Pin
Hamid_RT25-Feb-06 17:04
Hamid_RT25-Feb-06 17:04 
GeneralRe: CDialog and Keyboard events Pin
braveheartkenya26-Feb-06 0:48
braveheartkenya26-Feb-06 0:48 
GeneralRe: CDialog and Keyboard events Pin
Hamid_RT26-Feb-06 3:49
Hamid_RT26-Feb-06 3:49 
GeneralRe: CDialog and Keyboard events Pin
braveheartkenya27-Feb-06 6:09
braveheartkenya27-Feb-06 6:09 
Questionloading a file into strings Pin
FARGORE25-Feb-06 11:13
FARGORE25-Feb-06 11:13 
QuestionMultithreading and ReadFile() / WriteFile() Pin
Halloko25-Feb-06 8:56
Halloko25-Feb-06 8:56 
AnswerRe: Multithreading and ReadFile() / WriteFile() Pin
FARGORE25-Feb-06 11:53
FARGORE25-Feb-06 11:53 
GeneralRe: Multithreading and ReadFile() / WriteFile() Pin
Halloko25-Feb-06 12:03
Halloko25-Feb-06 12:03 
AnswerRe: Multithreading and ReadFile() / WriteFile() Pin
cmk25-Feb-06 13:54
cmk25-Feb-06 13:54 
Halloko wrote:
I use the handle in both ReadFile() and WriteFile() which are called in separate threads.

A file handle only has 1 'current offset' value which is the location that the next read or write will take place at in the file. You will likely trash your file using the same handle in more than 1 thread unless you guard the handle (e.g. critical section) and always set the offset before a read/write.

Halloko wrote:
I should instead open two handles to the driver.

That is one solution.


...cmk

Save the whales - collect the whole set
GeneralRe: Multithreading and ReadFile() / WriteFile() Pin
Halloko25-Feb-06 22:33
Halloko25-Feb-06 22:33 
GeneralRe: Multithreading and ReadFile() / WriteFile() Pin
ThatsAlok26-Feb-06 22:56
ThatsAlok26-Feb-06 22:56 

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.