Click here to Skip to main content
16,017,788 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionmanaged/unmanaged code Pin
includeh102-Jun-07 6:09
includeh102-Jun-07 6:09 
AnswerRe: managed/unmanaged code Pin
Sathesh Sakthivel2-Jun-07 7:39
Sathesh Sakthivel2-Jun-07 7:39 
AnswerRe: managed/unmanaged code Pin
Mark Salsbery4-Jun-07 6:19
Mark Salsbery4-Jun-07 6:19 
Questionquestion about function InterlockedIncrement() Pin
includeh102-Jun-07 5:50
includeh102-Jun-07 5:50 
AnswerRe: question about function InterlockedIncrement() Pin
Mark Salsbery2-Jun-07 6:00
Mark Salsbery2-Jun-07 6:00 
AnswerRe: question about function InterlockedIncrement() Pin
toxcct2-Jun-07 6:02
toxcct2-Jun-07 6:02 
Generalnot really Pin
includeh102-Jun-07 7:04
includeh102-Jun-07 7:04 
GeneralRe: not really Pin
Mark Salsbery2-Jun-07 8:16
Mark Salsbery2-Jun-07 8:16 
How can it lock if you don't use InterlockedIncrement() for all cases? It can't.
The system has no way of knowing if you are changing the variable directly.
You have to use InterlockedIncrement() every place you increment the variable for it to work.

The way you've coded your thread, all 5 threads are going to increment the value regardless.
InterlockedIncrement() ensures the increment won't happen at the same time but it's still
going to happen as soon as another thread is done incrementing it.

Smile | :)
Mark




"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

GeneralRe: not really Pin
includeh102-Jun-07 16:47
includeh102-Jun-07 16:47 
GeneralRe: not really Pin
Mark Salsbery3-Jun-07 9:07
Mark Salsbery3-Jun-07 9:07 
QuestionFatal Error Pin
mahesh.mundackal2-Jun-07 2:55
mahesh.mundackal2-Jun-07 2:55 
QuestionRe: Fatal Error Pin
Rajesh R Subramanian2-Jun-07 3:18
professionalRajesh R Subramanian2-Jun-07 3:18 
AnswerRe: Fatal Error Pin
S Douglas2-Jun-07 19:49
professionalS Douglas2-Jun-07 19:49 
AnswerRe: Fatal Error Pin
Hamid_RT2-Jun-07 20:31
Hamid_RT2-Jun-07 20:31 
QuestionAligning Toolbars Pin
Anurag Gandhi2-Jun-07 2:23
professionalAnurag Gandhi2-Jun-07 2:23 
QuestionProblem in Inserting ActiveX Control in SDI Pin
S_Murali2-Jun-07 2:03
S_Murali2-Jun-07 2:03 
GeneralRe: Problem in Inserting ActiveX Control in SDI Pin
Rajesh R Subramanian2-Jun-07 2:09
professionalRajesh R Subramanian2-Jun-07 2:09 
GeneralRe: Problem in Inserting ActiveX Control in SDI Pin
S_Murali2-Jun-07 2:32
S_Murali2-Jun-07 2:32 
JokeRe: Problem in Inserting ActiveX Control in SDI Pin
Hamid_RT2-Jun-07 20:28
Hamid_RT2-Jun-07 20:28 
QuestionRe: Problem in Inserting ActiveX Control in SDI Pin
Hamid_RT2-Jun-07 20:27
Hamid_RT2-Jun-07 20:27 
QuestionException! Pin
kcynic2-Jun-07 1:05
kcynic2-Jun-07 1:05 
GeneralRe: Exception! Pin
Rajesh R Subramanian2-Jun-07 1:11
professionalRajesh R Subramanian2-Jun-07 1:11 
GeneralRe: Exception! Pin
kcynic2-Jun-07 1:27
kcynic2-Jun-07 1:27 
GeneralRe: Exception! Pin
Rajesh R Subramanian2-Jun-07 1:33
professionalRajesh R Subramanian2-Jun-07 1:33 
GeneralRe: Exception! Pin
kcynic2-Jun-07 1:45
kcynic2-Jun-07 1:45 

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.