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

C / C++ / MFC

 
GeneralConsole Applications Pin
Cpudood26-Oct-02 11:43
Cpudood26-Oct-02 11:43 
GeneralRe: Console Applications Pin
Anders Molin26-Oct-02 12:17
professionalAnders Molin26-Oct-02 12:17 
GeneralRe: Console Applications Pin
Daniel Turini26-Oct-02 12:28
Daniel Turini26-Oct-02 12:28 
GeneralRe: Console Applications Pin
carrie26-Oct-02 13:07
carrie26-Oct-02 13:07 
GeneralCCriticalSection Pin
Anonymous26-Oct-02 10:57
Anonymous26-Oct-02 10:57 
GeneralRe: CCriticalSection Pin
Neville Franks26-Oct-02 12:09
Neville Franks26-Oct-02 12:09 
GeneralRe: CCriticalSection - volatile? Pin
26-Oct-02 13:00
suss26-Oct-02 13:00 
GeneralRe: CCriticalSection - volatile? Pin
Neville Franks26-Oct-02 13:34
Neville Franks26-Oct-02 13:34 
Anonymous wrote:
The reason that I placed the CriticalSection variables in the App class is that -just like the CStringList's- I have to access them in different classes, therefore the App seemed to be the most obvious place. The CStringList are "produced" by the worker thread, and displayed by the UI. That's why I need CriticalSections in order to avoid mutual access.

No you misunderstood me. I wasn't talking about where the critical section is defined. I meant that you need to lock it in the app thread, as well as the worker threads. If you aren't doing that, then this could well be the cause of your problem.

Anonymous wrote:
The error I experience is something really weird: a function returns one value and some time later another value without having manipulated it's input, etc.

A function that accesses the CStringList?


Anonymous wrote:
Another thougth: should the CStringList's be declared volatile if I use them both in my user interface class (for simplicity lat's say: CDialog, where they are declared) and my worker threads?

I don't think this is relevant to the problem at hand.


Neville Franks, Author of ED for Windows. www.getsoft.com
General10x Pin
Anonymous26-Oct-02 14:19
Anonymous26-Oct-02 14:19 
GeneralParaller Port Comunication. Pin
int01h26-Oct-02 9:12
int01h26-Oct-02 9:12 
GeneralRe: Paraller Port Comunication. Pin
Gary R. Wheeler27-Oct-02 3:56
Gary R. Wheeler27-Oct-02 3:56 
GeneralRe: Paraller Port Comunication. Pin
Daniel Strigl28-Oct-02 0:41
Daniel Strigl28-Oct-02 0:41 
GeneralOperator overloading! Help! Pin
26-Oct-02 8:43
suss26-Oct-02 8:43 
GeneralRe: Operator overloading! Help! Pin
Paul M Watt26-Oct-02 11:36
mentorPaul M Watt26-Oct-02 11:36 
GeneralRe: Operator overloading! Help! Pin
MGraw26-Oct-02 14:38
sussMGraw26-Oct-02 14:38 
GeneralRe: Operator overloading! Help! Pin
Paul M Watt26-Oct-02 19:44
mentorPaul M Watt26-Oct-02 19:44 
GeneralRe: Operator overloading! Help! Pin
MGraw27-Oct-02 8:51
sussMGraw27-Oct-02 8:51 
GeneralNeed Help(CDC) Pin
26-Oct-02 6:26
suss26-Oct-02 6:26 
GeneralRe: Need Help(CDC) Pin
Chris Losinger26-Oct-02 11:32
professionalChris Losinger26-Oct-02 11:32 
QuestionHow to programmatically generate GUIDs? Pin
Abin26-Oct-02 6:15
Abin26-Oct-02 6:15 
AnswerRe: How to programmatically generate GUIDs? Pin
Michael Dunn26-Oct-02 6:54
sitebuilderMichael Dunn26-Oct-02 6:54 
AnswerRe: How to programmatically generate GUIDs? Pin
Alexander Wiseman26-Oct-02 9:48
Alexander Wiseman26-Oct-02 9:48 
GeneralRe: How to programmatically generate GUIDs? Pin
Abin26-Oct-02 10:28
Abin26-Oct-02 10:28 
QuestionDLL function export ? Pin
Stan the man26-Oct-02 5:45
Stan the man26-Oct-02 5:45 
AnswerRe: DLL function export ? Pin
Paul M Watt26-Oct-02 6:37
mentorPaul M Watt26-Oct-02 6:37 

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.