Click here to Skip to main content
15,913,836 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: In MFC using a MS Access Database will NOT allow more Tahn 255 Chars even with setting RFX_Text to 1024 length Pin
David Crow16-Dec-09 3:40
David Crow16-Dec-09 3:40 
QuestionCopying files from an archive Pin
Code-o-mat14-Dec-09 12:02
Code-o-mat14-Dec-09 12:02 
QuestionRe: Copying files from an archive Pin
David Crow15-Dec-09 3:10
David Crow15-Dec-09 3:10 
AnswerRe: Copying files from an archive Pin
Code-o-mat15-Dec-09 3:20
Code-o-mat15-Dec-09 3:20 
GeneralA solution Pin
Code-o-mat15-Dec-09 10:55
Code-o-mat15-Dec-09 10:55 
Questionproblem with using MUTEX events Pin
Alan Kurlansky14-Dec-09 10:43
Alan Kurlansky14-Dec-09 10:43 
AnswerRe: problem with using MUTEX events Pin
Migounette14-Dec-09 11:53
Migounette14-Dec-09 11:53 
GeneralRe: problem with using MUTEX events Pin
Alan Kurlansky15-Dec-09 3:09
Alan Kurlansky15-Dec-09 3:09 
Thanks for the hints. I created the threads as follows:
HANDLE   mutexFIXHandle;         
HANDLE   mutexSetAlertTimer;    
HANDLE     mutexSetAWAYHandle;    
mutexFIXHandle     = CreateMutex(NULL, false, NULL);
mutexSetAlertTimer = CreateMutex(NULL, false, NULL);
mutexSetAWAYHandle = CreateMutex(NULL, false, NULL);

Based on first reply I changed this to and will retest:

mutexFIXHandle     = CreateMutex(SYNCHRONIZE, false, NULL);
mutexSetAlertTimer = CreateMutex(SYNCHRONIZE, false, NULL);
mutexSetAWAYHandle = CreateMutex(SYNCHRONIZE, false, NULL);
   //    
   // for waitformutlipleobjects
   //
HANDLE ghEvents[3];
ghEvents[0] =     mutexFIXHandle;
ghEvents[1] =     mutexSetAlertTimer;
ghEvents[2] =     mutexSetAWAYHandle;
The skeleton of the WaitForMultipleObjects looks like this:
while (1) {         
   waitRval =   WaitForMultipleObjects( 3, ghEvents, FALSE,   2000);              
         
     if (waitRval == WAIT_OBJECT_0) {
                     // process event
                     ReleaseMutex(mutexFIXHandle);    
            }
            else if (waitRval == (WAIT_OBJECT_0 + 1) ) {
                     // process event  
                     ReleaseMutex(mutexSetAlertTimer);
            }
            else if (waitRval == (WAIT_OBJECT_0 + 2) ) {
                        // process event
                        ReleaseMutex(mutexSetAWAYHandle);         
            }
            else if (waitRval == WAIT_TIMEOUT) {
                     //printf("Wait timed out\n");              
            }
            else {
                     // log something
            }
}
GeneralRe: problem with using MUTEX events Pin
Alan Kurlansky15-Dec-09 3:23
Alan Kurlansky15-Dec-09 3:23 
GeneralRe: problem with using MUTEX events Pin
Alan Kurlansky15-Dec-09 3:55
Alan Kurlansky15-Dec-09 3:55 
QuestionPlaying an AVI video from memory Pin
zzelephant14-Dec-09 10:10
zzelephant14-Dec-09 10:10 
Generalhi Pin
akhtar nasary14-Dec-09 8:45
akhtar nasary14-Dec-09 8:45 
GeneralRe: hi Pin
loyal ginger14-Dec-09 9:05
loyal ginger14-Dec-09 9:05 
QuestionRe: hi Pin
CPallini14-Dec-09 10:14
mveCPallini14-Dec-09 10:14 
QuestionSplit images into several regions. Pin
franckesh14-Dec-09 5:06
franckesh14-Dec-09 5:06 
AnswerRe: Split images into several regions. Pin
Tim Craig14-Dec-09 14:23
Tim Craig14-Dec-09 14:23 
QuestionHow to control LEDs using Parallel Port and Turbo C? Pin
--xtiAN_002--14-Dec-09 3:53
--xtiAN_002--14-Dec-09 3:53 
AnswerRe: How to control LEDs using Parallel Port and Turbo C? Pin
transoft14-Dec-09 4:35
transoft14-Dec-09 4:35 
QuestionRect Pin
kumar sanghvi14-Dec-09 2:29
kumar sanghvi14-Dec-09 2:29 
AnswerRe: Rect Pin
CPallini14-Dec-09 2:56
mveCPallini14-Dec-09 2:56 
GeneralRe: Rect Pin
kumar sanghvi14-Dec-09 17:39
kumar sanghvi14-Dec-09 17:39 
GeneralRe: Rect Pin
loyal ginger14-Dec-09 18:02
loyal ginger14-Dec-09 18:02 
GeneralRe: Rect Pin
kumar sanghvi14-Dec-09 18:37
kumar sanghvi14-Dec-09 18:37 
GeneralRe: Rect Pin
Cedric Moonen14-Dec-09 21:04
Cedric Moonen14-Dec-09 21:04 
QuestionFailed to initialize COM library error Pin
Le@rner14-Dec-09 1:22
Le@rner14-Dec-09 1:22 

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.