Click here to Skip to main content
15,886,071 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: GetWindowTextA() function not working in Visual Studio 2005? Pin
James R. Twine14-Feb-06 4:32
James R. Twine14-Feb-06 4:32 
AnswerRe: GetWindowTextA() function not working in Visual Studio 2005? Pin
James R. Twine14-Feb-06 4:28
James R. Twine14-Feb-06 4:28 
AnswerRe: GetWindowTextA() function not working in Visual Studio 2005? Pin
David Crow14-Feb-06 4:31
David Crow14-Feb-06 4:31 
GeneralRe: GetWindowTextA() function not working in Visual Studio 2005? Pin
ThatsAlok14-Feb-06 22:07
ThatsAlok14-Feb-06 22:07 
GeneralRe: GetWindowTextA() function not working in Visual Studio 2005? Pin
David Crow15-Feb-06 3:27
David Crow15-Feb-06 3:27 
QuestionIntegrating Crystal Reports Pin
Niro198314-Feb-06 0:36
Niro198314-Feb-06 0:36 
QuestionHow to disable 'restart service' button for a service? Pin
melwyn14-Feb-06 0:22
melwyn14-Feb-06 0:22 
QuestionWinword.exe and WaitForSingleObject Pin
vikramlinux14-Feb-06 0:12
vikramlinux14-Feb-06 0:12 
Hi Friends,
Please check the following code.

PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo;

ZeroMemory( &piProcInfo, sizeof(PROCESS_INFORMATION) );
ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) );
siStartInfo.cb = sizeof(STARTUPINFO);
bool bRet=CreateProcess("C:\\apps\\Microsoft Office\\OFFICE11\\WINWORD.EXE",
NULL,// command line
NULL, // process security attributes
NULL, // primary thread security attributes
TRUE, // handles are inherited
0, // creation flags
NULL, // use parent's environment
NULL, // use parent's current directory
&siStartInfo, // STARTUPINFO pointer
&piProcInfo); // receives PROCESS_INFORMATION

DWORD dw=GetLastError();
if(NULL != bRet)
{
if(WAIT_OBJECT_0==WaitForSingleObject(piProcInfo.hProcess,INFINITE))
{
MessageBox(NULL,"Finished","Error",MB_OK);
}
}


here...WaitforSingleObject does not wait for WinWord app to finish...it just quits....Any soln/Reason?

Vikram S
AnswerRe: Winword.exe and WaitForSingleObject Pin
_anil_14-Feb-06 0:52
_anil_14-Feb-06 0:52 
GeneralRe: Winword.exe and WaitForSingleObject Pin
vikramlinux14-Feb-06 1:16
vikramlinux14-Feb-06 1:16 
AnswerRe: Winword.exe and WaitForSingleObject Pin
kakan14-Feb-06 0:57
professionalkakan14-Feb-06 0:57 
GeneralRe: Winword.exe and WaitForSingleObject Pin
_anil_14-Feb-06 1:41
_anil_14-Feb-06 1:41 
GeneralRe: Winword.exe and WaitForSingleObject Pin
kakan14-Feb-06 2:03
professionalkakan14-Feb-06 2:03 
AnswerRe: Winword.exe and WaitForSingleObject Pin
kakan14-Feb-06 2:36
professionalkakan14-Feb-06 2:36 
QuestionRe: Winword.exe and WaitForSingleObject Pin
David Crow14-Feb-06 4:34
David Crow14-Feb-06 4:34 
AnswerRe: Winword.exe and WaitForSingleObject Pin
vikramlinux15-Feb-06 18:12
vikramlinux15-Feb-06 18:12 
GeneralRe: Winword.exe and WaitForSingleObject Pin
David Crow16-Feb-06 2:48
David Crow16-Feb-06 2:48 
GeneralRe: Winword.exe and WaitForSingleObject Pin
vikramlinux16-Feb-06 3:18
vikramlinux16-Feb-06 3:18 
GeneralRe: Winword.exe and WaitForSingleObject Pin
vikramlinux16-Feb-06 3:20
vikramlinux16-Feb-06 3:20 
QuestionNeed Help - Pointers Pin
pjama13-Feb-06 23:43
pjama13-Feb-06 23:43 
AnswerRe: Need Help - Pointers Pin
BadKarma13-Feb-06 23:52
BadKarma13-Feb-06 23:52 
AnswerRe: Need Help - Pointers Pin
Naveen14-Feb-06 0:10
Naveen14-Feb-06 0:10 
GeneralRe: Need Help - Pointers Pin
toxcct14-Feb-06 0:15
toxcct14-Feb-06 0:15 
GeneralRe: Need Help - Pointers Pin
pjama14-Feb-06 0:16
pjama14-Feb-06 0:16 
GeneralRe: Need Help - Pointers Pin
toxcct14-Feb-06 0:36
toxcct14-Feb-06 0:36 

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.