|GUI ScreenIO for Windows|
This API returns the Command Line of the currently executing application. This will include the full Path, executable name, as well as any command line arguments.
Your Compiler may provide similar APIs, which, while less transportable to other compilers may also be used
This command will execute only on the Server when used in a Client/Server application . Execution on the client side would only show the command line of GSCLIENT, and would be of no use in your programming.
Files available to copy to your system:
This is a 1024 byte area which will contain the command line of the currently executing program. This can be very simple or very complex in the case of some compilers which start their own runtime environment, and pass the name of the desired program as a parameter.
Typically, this API is used where the programer needs to know the directory from which the EXE was launched, or the program needs to inspect it's own command line for arguments in some remote subroutine (not the main program) and it is inconvenient to pass theses command line arguments to each subroutine.
Be aware that command lines may include spaces, quotes etc, and may also include drive and directory paths in either Drive\Directory format "C:\Program files\directory\prog.exe" format or in UNC "Format " \\server\directory\prog.exe" format. It may be in upper or lower case or mixed case. Some versions of windows will allow forward slash "/" for directory indicators, (especially when a server is involved).
The best method is to to use our API-Lowercase to convert the entire string to lower case.
Then begin examining from the tail end (byte 1024), indexing backward looking for .exe. This will give you the dividing line between the path to the executable and the command line arguments. But be aware that the command line might be enclosed in quotes.
This argument is standard for all CALLs to GSWINAPI. It is used to select the desired API or function, and to return the status of the operation.
Used to return the status of a call to GSWINAPI. A value of zero is a failure, any other value indicates success.
Recommended usage is to test the 88-level value WIN32API to see if it worked, then to use the text error message to see why it failed.
* ------------------------: If function failed,
Error code that was returned by Windows. This is not generally useful unless you have the Windows Platform SDK documentation available to you.
Plain-text error message that describes why the operation failed.
The number of these present varies depending on how many arguments are used by the desired function. These are not used, but must be present because this CALL requires seven arguments.
|© 2000-2006 Norcom, all rights reserved|