How to break WaitRun()

How to break WaitRun()

Postby avista » Tue Aug 27, 2013 9:40 am

Hi,
How to break WaitRun() becouse if application is closed it is still active until started program with WaitRun() is active.
Best regards,
User avatar
avista
 
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Re: How to break WaitRun()

Postby Antonio Linares » Tue Aug 27, 2013 11:24 am

WaitRun() tries to create the process and if it is not possible then it returns:

if( ! CreateProcess( 0, ( LPSTR ) hb_parc( 1 ), 0, 0, FALSE,
CREATE_NEW_CONSOLE | NORMAL_PRIORITY_CLASS,
0, 0, &StartupInfo, &ProcessInfo ) )
hb_retnl( -1 );
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How to break WaitRun()

Postby avista » Tue Aug 27, 2013 2:23 pm

Antonio
Thanks for reply
And what if process is created (program i started with waitrun())
How to kill that proccess (end started program from FW application)
before closing fivewin application.

Best regards,
User avatar
avista
 
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia

Re: How to break WaitRun()

Postby Antonio Linares » Wed Aug 28, 2013 6:02 am

SendMessage( FindWindow( 0, "Called app title" ), WM_CLOSE )
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: How to break WaitRun()

Postby avista » Mon Sep 02, 2013 7:15 am

Antonio
1.
I dont know the app title (main window title) becouse it is changing while executing ...
Need i use GetTasks() ?
GetTasks() for all 16bit apps return app title and for second parameter always C:\WINDOWS\System32\ntvdm.exe
2.
If WaitRun() is used is it possible to start another application with WaitRun() or WinExec() ... or first started app must be closed?

Best regards,
User avatar
avista
 
Posts: 301
Joined: Fri Jun 01, 2007 9:07 am
Location: Macedonia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], nageswaragunupudi and 93 guests