Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application Running

Status
Not open for further replies.

jbeetz1

Programmer
Nov 28, 2000
60
US
I need to determine if an executable (dbserv.exe) is running before continuing with my script. I don't believe PB9 has any fuction to determine this so I was looking for an API that will tell me. Are there any API's that will tell me if dbserv.exe is currently running.
 
Try this:

Code:
long ll_handle
application la_application

//Get the handle of the previous instance of the current application

ll_handle = Handle(la_application,TRUE)

Also refer to the Help file under 'Handle'

Matt

"Nature forges everything on the anvil of time
 
Matt

The handle function according to the documentation will only work for a Powerbuilder object. Dbsrv50.exe is not a Powerbuilder object, it is the engine to start a SQLAnywhere database. Also in PB9 the second argument (true,false) is obsolete.

I thought about using the API FindWindow but you need to know the exact title of the open window. In the case of Dbsrv50, it is the name of the database being started which could be one of many.

Thanks
Jerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top