I am calling an Visual Fortran exe file from VC++ using ShellExecute and passing some parameters with it. I want my Fortran program to retrieve the parameter. I am using GetArg to retrieve it but it only works when i pass the parameter from the command-line and not using VC++
Herez the test code:
VC++ part of the code
ShellExecute(NULL,"open","C:\\Sassi\\MAIN\\HOUSEEx.exe","pb1","", SW_SHOW );
Visual Fortran part of the code
MODNAME = ''
print*,'enter program HouseEX'
CALL GETARG (1, MODNAME)
IST = len(trim(MODNAME))
IF (IST.LT.1) THEN
PRINT *,' ENTER INPUT FILE NAME '
READ (*,22) FINP
PRINT *,' ENTER OUTPUT FILE NAME '
READ (*,22) FOUT
PRINT *,' ENTER FILE4 NAME (INCLUDING FULL PATH)'
READ (*,22) FILE4N
Print *,' Argument received '
Any suggestion or help would be greatly appreciated.