Click here to Skip to main content
15,888,293 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: can VC++ 6.0 talk with SharePoint Server Pin
Stuart Dootson5-May-09 10:37
professionalStuart Dootson5-May-09 10:37 
QuestionSemaphore Max count. Pin
_80865-May-09 6:57
_80865-May-09 6:57 
AnswerRe: Semaphore Max count. Pin
Stuart Dootson5-May-09 7:26
professionalStuart Dootson5-May-09 7:26 
GeneralRe: Semaphore Max count. Pin
_80865-May-09 16:36
_80865-May-09 16:36 
GeneralRe: Semaphore Max count. Pin
Stuart Dootson5-May-09 17:00
professionalStuart Dootson5-May-09 17:00 
GeneralRe: Semaphore Max count. Pin
_80865-May-09 17:20
_80865-May-09 17:20 
GeneralRe: Semaphore Max count. Pin
_80866-May-09 6:36
_80866-May-09 6:36 
GeneralRe: Semaphore Max count. Pin
Stuart Dootson6-May-09 7:24
professionalStuart Dootson6-May-09 7:24 
_8086 wrote:
CreateSemaphore


Ummm - it'd create a new semaphore? Or are you creating a named semaphore and using the same name as previously (and if that's the case, the initial and maximum counts are ignored)?

Anyway - CreateSemaphore doesn't matter - it's the wait function[^] that acquires the semaphore. When the semaphore's count is zero, waiting on the semaphore will cause the wait function to block - that's what the documentation[^] says, anyway.

If you use WaitForSingleObject, it will return WAIT_OBJECT_0 if it acquires the semaphore or WAIT_TIMEOUT if the semaphore isn't available (unless you specify a timeout of INFINITE, in which case WaitForSingleObject will never return).

The 'Using Semaphore Objects[^]' page may clarify things.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Semaphore Max count. Pin
_80866-May-09 16:23
_80866-May-09 16:23 
GeneralRe: Semaphore Max count. Pin
Stuart Dootson6-May-09 19:32
professionalStuart Dootson6-May-09 19:32 
QuestionHelp about Win32 Message loop Pin
reply2am5-May-09 4:48
reply2am5-May-09 4:48 
QuestionAnimatedGif drawing with openGL Pin
Jufranz5-May-09 4:10
Jufranz5-May-09 4:10 
QuestionHow to Convert _asm to Interinsics Pin
AB_dev5-May-09 3:32
AB_dev5-May-09 3:32 
AnswerRe: How to Convert _asm to Interinsics Pin
Stuart Dootson5-May-09 3:42
professionalStuart Dootson5-May-09 3:42 
GeneralRe: How to Convert _asm to Interinsics Pin
AB_dev5-May-09 3:47
AB_dev5-May-09 3:47 
GeneralRe: How to Convert _asm to Interinsics Pin
harold aptroot5-May-09 4:02
harold aptroot5-May-09 4:02 
GeneralRe: How to Convert _asm to Interinsics Pin
Stuart Dootson5-May-09 4:03
professionalStuart Dootson5-May-09 4:03 
AnswerRe: How to Convert _asm to Interinsics Pin
Randor 5-May-09 7:45
professional Randor 5-May-09 7:45 
QuestionHow to add web reference in my C++ project? Pin
eight5-May-09 3:29
eight5-May-09 3:29 
AnswerRe: How to add web reference in my C++ project? Pin
Stuart Dootson5-May-09 3:35
professionalStuart Dootson5-May-09 3:35 
GeneralRe: How to add web reference in my C++ project? Pin
eight5-May-09 16:16
eight5-May-09 16:16 
GeneralRe: How to add web reference in my C++ project? Pin
Stuart Dootson5-May-09 16:51
professionalStuart Dootson5-May-09 16:51 
GeneralRe: How to add web reference in my C++ project? Pin
Member 22503526-Mar-11 20:14
Member 22503526-Mar-11 20:14 
QuestionSync problem when call ControlService with SERVICE_CONTROL_PARAMCHANGE Pin
maishuiking5-May-09 2:38
maishuiking5-May-09 2:38 
AnswerRe: Sync problem when call ControlService with SERVICE_CONTROL_PARAMCHANGE Pin
Stuart Dootson5-May-09 3:31
professionalStuart Dootson5-May-09 3:31 

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.