Hi,
I have spent most of 3 days tracking down a problem (no, I'm not a professional programmer) that occurred when I tried to call a Fortran DLL from Visual Basic. It appears the problem is caused by using CURDIR@ in the Fortran.
The following Fortran works fine when called from VB: …. Character (LEN=300):: FN_Input …. FN_input = “hardwired path to test.csv” Open(unit=IR, file = FN_Input, status='old', err=999) ….
Replacing the above code with: …. Character (LEN=300):: FN_Input CHARACTER (LEN=256)::CURDIR@ …. FN_Input = Trim(CURDIR@()) // '\test.csv' Open(unit=IR, file = FN_Input, status='old', err=999) …. Results in Excel crashing as soon as the open command is executed
However, if I call the same code from Fortran rather than VB, it executes fine as far as I can tell (i.e. it reads the contents of the file)
Am I doing something obviously wrong?
Thanks, Kent