Consultor Eletrônico



Kbase P74539: How to call a GUI Session from a CHUI Session
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   31/03/2004
Status: Unverified

GOAL:

How to call a GUI Session from a CHUI Session

FIX:

You will have to invoke the OS-COMMAND if the CHUI Session is started and you are looking to start the GUI Session.

As for example:

OS-COMMAND prowin32.exe DBNAME ConnectionsParameters -p ProgramName SessionParameter.

Remember that your GUI Session invoked in this way will be dependent of your CHUI Session.

Also remember to set all the Progress Environment variables and part needed to point to the DLC variables and Paths.

Maybe another idea is to invoke a file.bat from the CHUI Session that will have all the settings ready you can use as template the PROENV.BAT
located in DLC\bin\proenv.bat.

In that case you will use the following from the CHUI Session:

OS-COMMAND YourDirectory\YourBatch.bat.

Remember to add at the end of the batchfile the call to the GUI Progress executable

@echo off
set DLC=d:\apps\91d
if x%1 == xpsc goto setit

if not exist %DLC%\bin\proenv.bat goto err_end
if not "%OS%"=="Windows_NT" set ENVSIZE=/E:5120
if exist %COMSPEC% goto csok
echo.
echo COMSPEC is not defined correctly, the current definition is:
echo COMSPEC=%COMSPEC%
echo.
pause
exit

:csok
%COMSPEC% %ENVSIZE% /K %DLC%\bin\proenv.bat psc
if not x%1 == xpsc goto tell

:setit
set PATH=%DLC%\BIN;%PATH%
set LIB=%DLC%\LIB;%LIB%
if x%1 == xpsc prompt proenv$g
cls
goto tell

:err_end
echo.
echo DLC variable is not correct - Please check setting in (%0)
echo.

:tell
cls
echo.
echo DLC: %DLC%
echo.
echo Inserting %DLC%\bin to beginning of path and
echo the current directory is
cd
echo.
type %DLC%\version

----> prowin32 DBName ConnectionStrings -p ProcedureName