Click here to Skip to main content
15,918,624 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralFolder Calls Pin
JWood12-Apr-05 16:20
JWood12-Apr-05 16:20 
GeneralRe: Folder Calls Pin
David Crow12-Apr-05 17:01
David Crow12-Apr-05 17:01 
GeneralRe: Folder Calls Pin
John R. Shaw12-Apr-05 19:30
John R. Shaw12-Apr-05 19:30 
GeneralWhy isn't my Dialog REPAINT Pin
Jobby Joseph12-Apr-05 13:42
Jobby Joseph12-Apr-05 13:42 
GeneralRe: Why isn't my Dialog REPAINT Pin
John R. Shaw12-Apr-05 17:47
John R. Shaw12-Apr-05 17:47 
GeneralRe: Why isn't my Dialog REPAINT Pin
Jobby Joseph13-Apr-05 4:18
Jobby Joseph13-Apr-05 4:18 
GeneralRe: Why isn't my Dialog REPAINT Pin
Jobby Joseph13-Apr-05 10:57
Jobby Joseph13-Apr-05 10:57 
GeneralComputer freezing up on wait Pin
theFrenchHornet12-Apr-05 12:08
theFrenchHornet12-Apr-05 12:08 
The application I am working on, call it Main, starts up another executable, call it Sub, and the two share an event. The event is created in Main before Sub starts, and then opened in Sub. The problem I am having in debugging them is that if Main hasn't reset the event, Sub freezes the computer, to the point where the only way I can recover is to power-down. The freeze happens here:

<br />
while (WaitForSingleObject(hAcquireActive, 100)==WAIT_OBJECT_0)<br />
{<br />
   Sleep(1000);<br />
}<br />



I tried something slightly different by creating an event to use in place of the Sleep, but it freezes the computer in the same way.

That code is:

<br />
HANDLE waitForeverEvent;<br />
waitForeverEvent = CreateEvent(NULL, FALSE, FALSE, "forever");<br />
while (WaitForSingleObject(hAcquireActive, 100)==WAIT_OBJECT_0)<br />
{<br />
   WaitForSingleObject(waitForeverEvent, 1000);<br />
}<br />


Environment is : Windows XP Professional, Visual Studio 2003.

Any explanation for why the computer is freezing, and/or a better way to wait for the hAcquireActive event to be reset while I am debugging?

Thanks.
GeneralRe: Computer freezing up on wait Pin
Jack Puppy12-Apr-05 13:06
Jack Puppy12-Apr-05 13:06 
GeneralRe: Computer freezing up on wait Pin
theFrenchHornet13-Apr-05 5:01
theFrenchHornet13-Apr-05 5:01 
GeneralRe: Computer freezing up on wait Pin
theFrenchHornet14-Apr-05 6:35
theFrenchHornet14-Apr-05 6:35 
GeneralRe: Computer freezing up on wait Pin
Blake Miller14-Apr-05 9:29
Blake Miller14-Apr-05 9:29 
GeneralRe: Computer freezing up on wait Pin
Blake Miller13-Apr-05 6:52
Blake Miller13-Apr-05 6:52 
GeneralRe: Computer freezing up on wait Pin
theFrenchHornet14-Apr-05 6:33
theFrenchHornet14-Apr-05 6:33 
GeneralReading A File Pin
LighthouseJ12-Apr-05 11:33
LighthouseJ12-Apr-05 11:33 
GeneralFollow-Up Pin
LighthouseJ12-Apr-05 16:03
LighthouseJ12-Apr-05 16:03 
GeneralRe: Follow-Up Pin
John R. Shaw12-Apr-05 19:16
John R. Shaw12-Apr-05 19:16 
GeneralRe: Follow-Up Pin
LighthouseJ12-Apr-05 19:30
LighthouseJ12-Apr-05 19:30 
GeneralRe: Follow-Up Pin
John R. Shaw12-Apr-05 20:43
John R. Shaw12-Apr-05 20:43 
GeneralRe: Follow-Up Pin
LighthouseJ13-Apr-05 4:02
LighthouseJ13-Apr-05 4:02 
GeneralRe: Reading A File Pin
Ryan Binns12-Apr-05 18:25
Ryan Binns12-Apr-05 18:25 
GeneralRe: Reading A File Pin
LighthouseJ12-Apr-05 19:16
LighthouseJ12-Apr-05 19:16 
GeneralRe: Reading A File Pin
namaskaaram12-Apr-05 21:20
namaskaaram12-Apr-05 21:20 
GeneralRe: Reading A File Pin
LighthouseJ13-Apr-05 4:01
LighthouseJ13-Apr-05 4:01 
GeneralRe: Reading A File Pin
Blake Miller13-Apr-05 7:12
Blake Miller13-Apr-05 7:12 

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.