Kbase 39223: How to change the current working directory of a 4GL session?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Solution ID: P9223
GOAL:
How to change the current working directory of a 4GL session?
FACT(s) (Environment):
Windows
Progress 8.x
Progress 9.x
FIX:
You can use the following 4GL code, which relies on a Win32 API call.
DEFINE VARIABLE SetCurrentDirectoryAResult AS INTEGER NO-UNDO.
PROCEDURE SetCurrentDirectoryA EXTERNAL "KERNEL32.DLL":
DEFINE INPUT PARAMETER chrCurDir AS CHARACTER.
DEFINE RETURN PARAMETER SetCurrentDirectoryAResult AS LONG.
END PROCEDURE.
RUN SetCurrentDirectoryA (INPUT <WantedDirectory>, OUTPUT SetCurrentDirectoryAResult).
IF SetCurrentDirectoryAResult <> 1 THEN
MESSAGE "Problem to set the CurrentDirectory of the process".