. DirectXtras Home

DirectCommunication Xtra
DirectConnection Xtra
DirectControl Xtra
DirectEmail Xtra
DirectFTP Xtra
DirectImage Xtra
DirectInteraction Xtra
DirectOS Xtra
License Agreement
Licensing Fees
Order Form
DirectSMS Xtra
DirectSound Xtra
DirectTransition Xtra
DirectTransition3D Xtra Set I
DirectTransition3D Xtra Set II
DirectTransition3D Xtra Set III
DirectTTS Xtra
DirectXport Xtra


Special Discounted Bundles

The Gallery
How To Order
Order Form
Check for Upgrades

Sign in
Change Your Profile

Contact Us

Xtra Power for Director & Authorware

DirectOS Xtra
 Directing Windows and MacOS. The OS at your fingertips!

Authorware 4.x Compatible Authorware 5.x CompatibleAuthorware 6.x CompatibleAuthorware 7.x CompatibleDirector 5.x Compatible Director 6.x CompatibleDirector 7.x Compatible Director 8.x CompatibleDirector MX Compatible     MacOS 8.x and 9.x CompatibleMacOS X CompatibleWindows Compatible   

dosLaunchApp(string Application, string State, integer Wait)

Launches the specified application in the state specified and optionally waits until the application launches terminates. 

Parameters :

Application : A string specifying the pathname of the application to launch.

On Windows, the string may contain command line arguments. Note that double quotes should surround command line arguments or white spaces should be avoided in the Application argument to avoid incorrect interpretation of the command line. For example, if director.exe resides in "C:\director", you can pass: "C:\director\director.exe" to launch Director. If director.exe resides in "C:\program files\director" and you wish to open "C:\movie.dir", you can pass ""C:\program files\director\director.exe" C:\movie.dir" to launch "C:\movie.dir" using Director. Note that the "C:\program files\director\director.exe" is surrounded by double quotes because it contains white spaces.

State : A string specifying the state to start the application in. This parameter is case insensitive.
Possible Values :
"Normal" : Starts the application in a normal state (visible, not maximized, minimized or hidden). 
"Maximized" : Starts the application in a maximized state. On MacOS, this is equivalent to "Normal".
"Minimized" : Starts the application in a minimized state. 
"Hidden" : Starts the application in a hidden state with no visible graphical user interface components. On MacOS, this is equivalent to "Minimized".

Wait : An integer specifying whether or not to wait until the launched application launches or terminates. If 1 is passed, the function waits for the application to terminate before returning. If 0 is passed, the function returns immediately without waiting. If a value greater than 1 is passed, it specifies the amount of time, in milliseconds, the Xtra should wait until the application is launched in order to retrieve the ID of the launched application's window. In the later case, the function will return the ID of the launched application's window, or the integer -1 if it couldn't find the launched application's window ID. The function searches for the first non-hidden window created by the launched application. The returned window ID can then be used by the Xtra windowing functions in order to manipulate and control the launched application. Specifying a waiting time out is not applicable on the MacOS. On MacOS, the window ID of the launched application will be returned even if this parameter is set to zero.

Return Value : An integer indicating whether the application was successfully launched. If 0 is returned, dosLaunchApp() was unable to launch the application in which case dosGetLastError() should be called to determine the cause of the error. If 1  or -1 is returned, the application was successfully launched. If a value greater than 1 is returned, the application was successfully launched, and the returned integer indicates the ID of the launched application's window.

Possible Returned Error Codes via dosGetLastError() :
10002 : Invalid value for parameter 2. 
10016 : File not found error. 
10019 : Executable expected. A reference to a non executable file, drive or folder was given. 

DirectXtras Inc.
P.O Box 2645, Menlo Park, CA, 94026, U.S.A
Voice: +1-415-5058249, Fax: +1-801-8585841
Toll Free: 1-800-4453093
E-mail General Information: info@directxtras.com
E-mail Technical Support: support@directxtras.com

Copyright 1996-2004 DirectXtras Inc. All Rights Reserved.
WebMaster: tamar@directxtras.com
Last Updated: 2/18/2002 3:15:18 PM.