Click here to Skip to main content
15,887,822 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralEvent Fire for Buttons created at Runtime Pin
Surya Prakash Adari30-Dec-04 17:30
Surya Prakash Adari30-Dec-04 17:30 
GeneralRe: Event Fire for Buttons created at Runtime Pin
ThatsAlok30-Dec-04 18:15
ThatsAlok30-Dec-04 18:15 
GeneralRunning exes from a MFC app Pin
SPARTAN-11730-Dec-04 17:22
SPARTAN-11730-Dec-04 17:22 
GeneralRe: Running exes from a MFC app Pin
ThatsAlok30-Dec-04 18:04
ThatsAlok30-Dec-04 18:04 
GeneralRe: Running exes from a MFC app Pin
Rahim Rattani30-Dec-04 18:11
Rahim Rattani30-Dec-04 18:11 
GeneralRe: Running exes from a MFC app Pin
SPARTAN-11731-Dec-04 15:24
SPARTAN-11731-Dec-04 15:24 
GeneralRe: Running exes from a MFC app Pin
Michael Dunn30-Dec-04 19:18
sitebuilderMichael Dunn30-Dec-04 19:18 
GeneralAbout OOP thread programming Pin
stans8030-Dec-04 15:32
stans8030-Dec-04 15:32 
--------------------------------------------------------------------------------

Now i am using C++ try to create a Thread class, and used by main function.
in the main function i will create 2 threads and 1 critical section and 1 com port handle, i want the 2 threads share the same handle and critical section.

in the construction of thread, i pass the address of handle and critical section in.
In the function of thread i will try to enter the critical section and do something.
But now the condition i met is that neither of the 2 threads can enter the critical section.
If i don't care about the critical section, neither of them can use the send thing to com port handle.

So is there anyone met this condition before? what's the problem?
Thanks a lot for your help in advance...

Questiontemplate friend operator function ? Pin
anycallmy30-Dec-04 15:15
anycallmy30-Dec-04 15:15 
AnswerRe: template friend operator function ? Pin
toxcct31-Dec-04 4:43
toxcct31-Dec-04 4:43 
GeneralRe: template friend operator function ? Pin
anycallmy3-Jan-05 19:31
anycallmy3-Jan-05 19:31 
Generalevent driven programming Pin
monageasmear30-Dec-04 14:56
monageasmear30-Dec-04 14:56 
GeneralRe: event driven programming Pin
Selvam R30-Dec-04 21:33
professionalSelvam R30-Dec-04 21:33 
GeneralAlternative for ellipses(...) Pin
Anonymous30-Dec-04 13:05
Anonymous30-Dec-04 13:05 
GeneralRe: Alternative for ellipses(...) Pin
Michael Dunn30-Dec-04 14:08
sitebuilderMichael Dunn30-Dec-04 14:08 
GeneralRe: Alternative for ellipses(...) Pin
Anonymous30-Dec-04 14:28
Anonymous30-Dec-04 14:28 
AnswerRe: Alternative for ellipses(...) Pin
kbsbng8-Feb-07 18:35
kbsbng8-Feb-07 18:35 
QuestionHow to print/preview multiple pages Pin
AiKnight30-Dec-04 12:57
AiKnight30-Dec-04 12:57 
AnswerRe: How to print/preview multiple pages Pin
PJ Arends30-Dec-04 20:34
professionalPJ Arends30-Dec-04 20:34 
QuestionDocking Windows...How? Pin
Gurra_Koo30-Dec-04 12:53
Gurra_Koo30-Dec-04 12:53 
AnswerRe: Docking Windows...How? Pin
Selvam R30-Dec-04 21:38
professionalSelvam R30-Dec-04 21:38 
GeneralSubclassing Dialogs Pin
Mike Zinni30-Dec-04 10:41
Mike Zinni30-Dec-04 10:41 
GeneralRe: Subclassing Dialogs Pin
Michael Bergman30-Dec-04 11:57
Michael Bergman30-Dec-04 11:57 
GeneralRe: Subclassing Dialogs Pin
PJ Arends30-Dec-04 12:10
professionalPJ Arends30-Dec-04 12:10 
GeneralDirectx problems Pin
samet karadağ30-Dec-04 10:36
samet karadağ30-Dec-04 10:36 

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.