Click here to Skip to main content
15,881,877 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CTreeCtrl, tooltips and accelerator keys Pin
phyrex6-Aug-07 20:07
phyrex6-Aug-07 20:07 
QuestionHow to get icon and name of IShellFolder Pin
FlyingBear5-Aug-07 21:50
FlyingBear5-Aug-07 21:50 
QuestionGINA Pin
MozhdehQeraati5-Aug-07 21:39
MozhdehQeraati5-Aug-07 21:39 
AnswerRe: GINA Pin
toxcct5-Aug-07 22:26
toxcct5-Aug-07 22:26 
GeneralRe: GINA Pin
MozhdehQeraati6-Aug-07 0:35
MozhdehQeraati6-Aug-07 0:35 
GeneralRe: GINA Pin
ThatsAlok6-Aug-07 1:46
ThatsAlok6-Aug-07 1:46 
GeneralRe: GINA Pin
ThatsAlok6-Aug-07 1:47
ThatsAlok6-Aug-07 1:47 
QuestionInverse Of Semaphore Pin
yccheok5-Aug-07 21:38
yccheok5-Aug-07 21:38 
Hi all,

Semaphore give us the following behavior

count thread state
----------------------------
3 -> no wait
2 -> no wait
1 -> no wait
0 -> WAIT

However, I am looking for some tool which enable me to do this :

count thread state
----------------------------
3 -> WAIT
2 -> WAIT
1 -> WAIT
0 -> no wait

I know that I can achieve my objective with the combination of :

while(WaitForSingleObject(semaphore, 0) == WAIT_OBJECT_0) {
WaitForSingleObject(event, INFINITE);

}

When the other instances start, they each increments the semaphore
with ReleaseSemaphore(). When they exit, each decrements the semaphore
counter and fires the event.

The problem with this approach is, the first instance would hang if
any of the other instances terminates abnormally.

Any better suggestion, which I can achieve my objective by just using a single primitive tool?

Thanks
AnswerRe: Inverse Of Semaphore Pin
Hans Dietrich6-Aug-07 1:21
mentorHans Dietrich6-Aug-07 1:21 
QuestionResizing of a region Pin
Md. Ali Naser Khan5-Aug-07 21:31
Md. Ali Naser Khan5-Aug-07 21:31 
AnswerRe: Resizing of a region Pin
Nelek5-Aug-07 22:00
protectorNelek5-Aug-07 22:00 
GeneralRe: Resizing of a region Pin
Md. Ali Naser Khan5-Aug-07 23:40
Md. Ali Naser Khan5-Aug-07 23:40 
AnswerRe: Resizing of a region Pin
Sam_c5-Aug-07 22:54
Sam_c5-Aug-07 22:54 
GeneralRe: Resizing of a region Pin
Md. Ali Naser Khan5-Aug-07 23:37
Md. Ali Naser Khan5-Aug-07 23:37 
AnswerRe: Resizing of a region Pin
jk chan6-Aug-07 0:40
jk chan6-Aug-07 0:40 
QuestionHeap Corruption Pin
yaminisridaran5-Aug-07 21:22
yaminisridaran5-Aug-07 21:22 
AnswerRe: Heap Corruption Pin
Sam_c5-Aug-07 22:47
Sam_c5-Aug-07 22:47 
GeneralRe: Heap Corruption Pin
yaminisridaran5-Aug-07 22:49
yaminisridaran5-Aug-07 22:49 
GeneralRe: Heap Corruption Pin
Sam_c5-Aug-07 23:00
Sam_c5-Aug-07 23:00 
GeneralRe: Heap Corruption Pin
yaminisridaran5-Aug-07 23:31
yaminisridaran5-Aug-07 23:31 
AnswerRe: Heap Corruption Pin
jk chan6-Aug-07 0:36
jk chan6-Aug-07 0:36 
GeneralRe: Heap Corruption Pin
yaminisridaran6-Aug-07 0:37
yaminisridaran6-Aug-07 0:37 
AnswerRe: Heap Corruption Pin
James R. Twine6-Aug-07 1:56
James R. Twine6-Aug-07 1:56 
GeneralRe: Heap Corruption Pin
yaminisridaran6-Aug-07 1:57
yaminisridaran6-Aug-07 1:57 
GeneralRe: Heap Corruption Pin
James R. Twine6-Aug-07 2:07
James R. Twine6-Aug-07 2:07 

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.