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

C / C++ / MFC

 
AnswerRe: Visual Studio 6 on Vista Pin
Michael Dunn6-Jul-07 6:30
sitebuilderMichael Dunn6-Jul-07 6:30 
QuestionWaitForSingleObject - freeze [modified] Pin
erikbe6-Jul-07 2:05
erikbe6-Jul-07 2:05 
AnswerRe: WaitForSingleObject - freeze Pin
toxcct6-Jul-07 2:20
toxcct6-Jul-07 2:20 
GeneralRe: WaitForSingleObject - freeze Pin
erikbe6-Jul-07 2:55
erikbe6-Jul-07 2:55 
AnswerRe: WaitForSingleObject - freeze Pin
David Crow6-Jul-07 2:49
David Crow6-Jul-07 2:49 
GeneralRe: WaitForSingleObject - freeze Pin
erikbe6-Jul-07 2:59
erikbe6-Jul-07 2:59 
GeneralRe: WaitForSingleObject - freeze Pin
Cyrilix6-Jul-07 5:34
Cyrilix6-Jul-07 5:34 
AnswerRe: WaitForSingleObject - freeze - problem solved Pin
erikbe9-Jul-07 2:48
erikbe9-Jul-07 2:48 
Problem solved:

if (CreateProcess( lpAppPath,
strCommandLine,
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
NULL,
&processInformation
)
)
{
DWORD dw = MsgWaitForMultipleObjects(1, &pi.hProcess, FALSE, INFINITE, QS_POSTMESSAGE|QS_SENDMESSAGE );
}
else
{
AfxMessageBox(L"The process could not be started...");
}

MsgWaitForMultipleObjects(...)

As the documentation says:

Use caution when calling the wait functions and code that directly or indirectly creates windows. If a thread creates any windows, it must process messages. Message broadcasts are sent to all windows in the system. A thread that uses a wait function with no time-out interval may cause the system to become deadlocked. For example, the Dynamic Data Exchange (DDE) protocol and the COM function CoInitialize both indirectly create windows that can cause a deadlock. Therefore, if you have a thread that creates windows, use MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx, rather than WaitForSingleObject.
QuestionEntered digit gets twice in number... 1 becomes 11, 2 becomes 22... Pin
Sgg2456-Jul-07 1:50
Sgg2456-Jul-07 1:50 
QuestionRe: Entered digit gets twice in number... 1 becomes 11, 2 becomes 22... Pin
David Crow6-Jul-07 2:50
David Crow6-Jul-07 2:50 
Questionhow to findout that a certain program is running or not Pin
V_shr6-Jul-07 1:35
V_shr6-Jul-07 1:35 
AnswerRe: how to findout that a certain program is running or not Pin
aatul6-Jul-07 1:38
aatul6-Jul-07 1:38 
GeneralRe: how to findout that a certain program is running or not Pin
V_shr6-Jul-07 1:45
V_shr6-Jul-07 1:45 
GeneralRe: how to findout that a certain program is running or not Pin
David Crow6-Jul-07 2:52
David Crow6-Jul-07 2:52 
GeneralRe: how to findout that a certain program is running or not Pin
Hamid_RT6-Jul-07 6:51
Hamid_RT6-Jul-07 6:51 
QuestionCDialogBar Close Issue?? Pin
SandipG 6-Jul-07 1:14
SandipG 6-Jul-07 1:14 
AnswerRe: CDialogBar Close Issue?? Pin
Mark Salsbery6-Jul-07 5:54
Mark Salsbery6-Jul-07 5:54 
Questiongetting IShellFolder interface of file system folder Pin
Abhijeet Pathak6-Jul-07 0:58
Abhijeet Pathak6-Jul-07 0:58 
AnswerRe: getting IShellFolder interface of file system folder Pin
Hamid_RT6-Jul-07 1:12
Hamid_RT6-Jul-07 1:12 
QuestionI have to create a class which parse a char Pin
nickalai176-Jul-07 0:50
nickalai176-Jul-07 0:50 
AnswerRe: I have to create a class which parse a char Pin
Chris Losinger6-Jul-07 1:13
professionalChris Losinger6-Jul-07 1:13 
AnswerRe: I have to create a class which parse a char Pin
Christian Graus6-Jul-07 1:14
protectorChristian Graus6-Jul-07 1:14 
AnswerRe: I have to create a class which parse a char Pin
David Crow6-Jul-07 2:55
David Crow6-Jul-07 2:55 
AnswerRe: I have to create a class which parse a char Pin
Mark Salsbery6-Jul-07 5:57
Mark Salsbery6-Jul-07 5:57 
QuestionHow do I create a virtual serial port? Pin
AlecJames5-Jul-07 23:46
AlecJames5-Jul-07 23:46 

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.