Alguem tem algum material referente a sintax da funcao SWPRUMCMD() p/ que eu possa resolver um problema que ja coloquei no forum quando eu mando executar esta funcao e nao tem o comando ele manda para o prompt do dos e fica experando que voce digite EXIT para voltar para o sistema.
Um dos nossos colega me deu uma sugestao mais nao deu certo, se alguem puder me ajudar fico muito agradecido, Valeu.
Helio Beltrao Jr.
helio@hrbinfo.com.br
Sintax do SWPRUNCMD()
Moderador: Moderadores
oi....
copiei diretamente do help do blinker, ve se ai tem o q vc precisa.....
copiei diretamente do help do blinker, ve se ai tem o q vc precisa.....
até a proximaSWPRUNCMD / SWPRUNCMDBAS
──────────────────────────────────────────────────────────────────────────────
Function : Execute a child process.
Syntax : lValue = SWPRUNCMD(cCommand, nuMem, cRunPath, cTempPath)
Return : TRUE if the command interpreter was executed.
FALSE if an error occurred
This function executes a child process of the current program,
freeing conventional memory occupied by the parent program. Any non
conventional memory used by the parent will remain allocated.
The parameters to SWPRUNCMD() are as follows:
cCommand: The name of the program, batch file or DOS internal
command to be executed, followed by any required parameters. An empty
string will cause the command interpreter to be loaded, giving a DOS
prompt.
nuMem: The amount of memory in kilobytes (kb) to be freed prior to
executing the child process. If this parameter is passed as zero, as
much memory as possible will be freed.
cRunPath: The drive and directory to make current prior to executing
the child process.
cTempPath: The drive and directory where the swap function should
create a disk swap file containing the image (or partial image) of
the parent program. Note that XMS and EMS memory will be used in
preference to a disk swap file if available provided their use has
not been prohibited through the use of SWPUSEEMS() and SWPUSEXMS().
Note that this parameter may be overridden at runtime through the use
of the SWAP or BLINKER environment variables. For example :
SET SWAP=F:\TEMP;
or
SET BLINKER=/SDF:\TEMP
will cause the temporary diskfile to be created in F:\TEMP,
regardless of the value passed as a parameter to the SWPRUNCMD().
The swap function will always invoke the current command interpreter
as specified in the COMSPEC environment variable, which in turn will
execute cCommand. This allows the parent program to execute any
internal or external DOS command, a batch file or any program which
can be executed from the DOS prompt. The return code of the child
process can be retrieved using the function SWPERRLEV().
The return value is a logical (boolean) value indicating the success
of the SWPRUNCMD() call. Following an unsuccessful call to
SWPRUNCMD(), the program can use SWPERRMAJ() and SWPERRMIN() to
determine the nature of the error.
Example : success = SWPRUNCMD("",0,"","")
Shell to DOS, freeing as much memory as possible, save swap file to
current directory if required.
success = SWPRUNCMD("WIN",0,"C:\WINDOWS","F:\")
This command will execute Microsoft Windows, freeing as much memory
as possible. The swap function will change drive and directory to
C:\WINDOWS prior to executing the WIN command. If a temporary disk
swap file is required, it will be created on F:\
success = SWPRUNCMD("DIR /W",100,"","")
IF (!success)
? "Swap failed"
majerr = SWPERRMAJ()
minerr = SWPERRMIN()
? "Error code ", majerr, minerr
ELSE
? "Swap succeeded"
? "Errorlevel :",SWPERRLEV()
ENDIF
Execute the DOS DIR command, first freeing 100KB, save swap disk
file to the current directory if required. On return, check the swap
funciton return code. If the swap failed display the swap major and
minor error codes, if it succeeded, display the return code of the
child process.
success = SWPRUNCMD("RRUN ABC",0,"","")
IF (!success)
? "Swap failed"
majerr = SWPERRMAJ()
minerr = SWPERRMIN()
? "Error code ", majerr, minerr
ELSE
? "Swap succeeded"
? "Errorlevel :",SWPERRLEV()
ENDIF
Execute R & R report writer, checking for errors on return.
