Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to prevent switch (or focus) to an application? Pin
Waldermort11-Feb-07 1:34
Waldermort11-Feb-07 1:34 
GeneralRe: How to prevent switch (or focus) to an application? Pin
Brooks Harris11-Feb-07 5:11
Brooks Harris11-Feb-07 5:11 
AnswerRe: How to prevent switch (or focus) to an application? Pin
Brooks Harris11-Feb-07 11:36
Brooks Harris11-Feb-07 11:36 
AnswerRe: How to prevent switch (or focus) to an application? Pin
Brooks Harris11-Feb-07 11:53
Brooks Harris11-Feb-07 11:53 
QuestionDevC++ Clock Pin
EagleAmerican1410-Feb-07 11:25
EagleAmerican1410-Feb-07 11:25 
AnswerRe: DevC++ Clock Pin
El Corazon10-Feb-07 14:25
El Corazon10-Feb-07 14:25 
AnswerRe: DevC++ Clock Pin
Christian Graus10-Feb-07 14:51
protectorChristian Graus10-Feb-07 14:51 
QuestionConfused about Mutex? Pin
nde_plume10-Feb-07 6:12
nde_plume10-Feb-07 6:12 
I am confused how to get mutex locks to work correctly. As part of my testing I wrote the following code:

HANDLE hMutex = CreateMutex(NULL, FALSE, "ABC");
int result = WaitForSingleObject(hMutex, INFINITE);
int result2 = WaitForSingleObject(hMutex, INFINITE);

The first line creates a mutex, then the next line "locks" the mutex, then the next line waits for and tries to relock the mutex. It seems to me that the second Wait should never return (since the Mutex is already locked.) However, both Waits return immediately with the return code 0 (== WAIT_OBJECT_0).

What am I missing?


AnswerRe: Confused about Mutex? Pin
Waldermort10-Feb-07 6:17
Waldermort10-Feb-07 6:17 
GeneralRe: Confused about Mutex? Pin
nde_plume10-Feb-07 6:47
nde_plume10-Feb-07 6:47 
GeneralRe: Confused about Mutex? Pin
Waldermort10-Feb-07 7:05
Waldermort10-Feb-07 7:05 
QuestionDisplay settings Pin
Waldermort10-Feb-07 5:31
Waldermort10-Feb-07 5:31 
AnswerRe: Display settings Pin
Christian Graus10-Feb-07 11:05
protectorChristian Graus10-Feb-07 11:05 
GeneralRe: Display settings Pin
Waldermort10-Feb-07 11:25
Waldermort10-Feb-07 11:25 
QuestionDirect3D forum Pin
Waldermort10-Feb-07 3:45
Waldermort10-Feb-07 3:45 
AnswerRe: Direct3D forum Pin
Hamid_RT10-Feb-07 20:46
Hamid_RT10-Feb-07 20:46 
QuestionESP exception Pin
sanjutvm10-Feb-07 3:33
sanjutvm10-Feb-07 3:33 
AnswerRe: ESP exception Pin
Cedric Moonen10-Feb-07 5:25
Cedric Moonen10-Feb-07 5:25 
GeneralRe: ESP exception Pin
sanjutvm12-Feb-07 5:15
sanjutvm12-Feb-07 5:15 
Questionwindow update problem? Pin
amitmistry_petlad 10-Feb-07 1:23
amitmistry_petlad 10-Feb-07 1:23 
QuestionGPS Receiver Holux, 211 series, USB Pin
Aurelien G.10-Feb-07 1:00
Aurelien G.10-Feb-07 1:00 
AnswerRe: GPS Receiver Holux, 211 series, USB Pin
cmk10-Feb-07 10:01
cmk10-Feb-07 10:01 
QuestionTo migrate project from VC++ 6.0 to VC ++.Net Pin
Atul2310-Feb-07 0:40
Atul2310-Feb-07 0:40 
AnswerRe: To migrate project from VC++ 6.0 to VC ++.Net Pin
Hamid_RT10-Feb-07 0:54
Hamid_RT10-Feb-07 0:54 
AnswerRe: To migrate project from VC++ 6.0 to VC ++.Net Pin
Eytukan10-Feb-07 1:28
Eytukan10-Feb-07 1:28 

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.