Click here to Skip to main content
15,897,371 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to migrate qt creator project (that doesn't need qt) to visual studio Pin
Maximilien13-May-21 7:08
Maximilien13-May-21 7:08 
AnswerRe: How to migrate qt creator project (that doesn't need qt) to visual studio Pin
Richard MacCutchan13-May-21 0:11
mveRichard MacCutchan13-May-21 0:11 
QuestionQuestion Arduino programming + joystick + bulbs Pin
titi titi11-May-21 12:55
titi titi11-May-21 12:55 
AnswerRe: Question Arduino programming + joystick + bulbs Pin
CPallini11-May-21 20:23
mveCPallini11-May-21 20:23 
AnswerRe: Question Arduino programming + joystick + bulbs Pin
Richard MacCutchan11-May-21 21:47
mveRichard MacCutchan11-May-21 21:47 
QuestionWaitForMultipleObjects getting access violation in Worker Thread Pin
ForNow9-May-21 13:32
ForNow9-May-21 13:32 
QuestionRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
David Crow9-May-21 16:15
David Crow9-May-21 16:15 
AnswerRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
ForNow9-May-21 16:21
ForNow9-May-21 16:21 
AnswerRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
Victor Nijegorodov9-May-21 20:30
Victor Nijegorodov9-May-21 20:30 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
ForNow10-May-21 2:20
ForNow10-May-21 2:20 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
Victor Nijegorodov10-May-21 3:32
Victor Nijegorodov10-May-21 3:32 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
ForNow10-May-21 3:57
ForNow10-May-21 3:57 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
Victor Nijegorodov10-May-21 4:06
Victor Nijegorodov10-May-21 4:06 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
ForNow10-May-21 4:25
ForNow10-May-21 4:25 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
Victor Nijegorodov10-May-21 4:39
Victor Nijegorodov10-May-21 4:39 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
ForNow10-May-21 4:51
ForNow10-May-21 4:51 
AnswerRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
Randor 11-May-21 12:30
professional Randor 11-May-21 12:30 
ForNow wrote:
I pass all the info (HWND windows


The MFC framework does not always give you the *real* HWND to a window. As strange as this might sound, the MFC framework maintains two object maps. The 'real objects' and an internal 'temporary handle map'. MFC will sometimes give you a temporary CTempWnd instead. If you are passing the window handle of a MFC class then you need to use CWnd::GetSafeHwnd[^]. There are some rare occasions where GetSafeHwnd cannot give you the real window handle and will return NULL instead so you should probably check for that too.

Not many people are using MFC these days. You should consider moving on.

I can't think of much else that would cause WaitForMultipleObjects to throw an access violation. The only other thing I can think of... is a corrupt heap. Sounds like you are somehow passing garbage to WaitForMultipleObjects.

Best Wishes,
-David Delaune
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
ForNow12-May-21 1:36
ForNow12-May-21 1:36 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
Victor Nijegorodov12-May-21 2:00
Victor Nijegorodov12-May-21 2:00 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
ForNow12-May-21 2:30
ForNow12-May-21 2:30 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
Victor Nijegorodov12-May-21 2:37
Victor Nijegorodov12-May-21 2:37 
GeneralRe: WaitForMultipleObjects getting access violation in Worker Thread Pin
ForNow12-May-21 2:47
ForNow12-May-21 2:47 
QuestionC, Pin
Ajay Kumar May20214-May-21 20:49
Ajay Kumar May20214-May-21 20:49 
AnswerRe: C, Pin
Richard MacCutchan4-May-21 21:23
mveRichard MacCutchan4-May-21 21:23 
AnswerRe: C, Pin
Gerry Schmitz5-May-21 8:29
mveGerry Schmitz5-May-21 8:29 

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.