- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Changing fro Digital Visual Fortran and from Win XP to Win 7 cause me a great probelm with a DLL that i use from Excel.
The Dll works on my PC but not on a target PC (where ordinary programs works ok)
The error read "Run time error '48': File not found c:\\testfortran\\Dll1.dll"
The file IS there, I suspect a missing DLL but is not able to locate the sinner.
Here is the Fortran code:
integer function TestRW(cdum)
c
!DEC$ ATTRIBUTES STDCALL::TestRW
!DEC$ ATTRIBUTES REFERENCE::Cdum
!DEC$ ATTRIBUTES DLLEXPORT::TestRW
!DEC$ ATTRIBUTES ALIAS:'TestRW' ::TestRW
real cdum
open(unit=55,file='c:\\testfortran\\out.txt')
write(55,10) 'Hello world'
10 format(1x,a)
close(55)
TestRW=1
end
And the VBA code:
Declare Function TestRW Lib "c:\\testfortran\\Dll1.dll" _
(ByRef cd As Single) As Long
Sub Test_til_Excel()
Dim cd As Single, ret As Long
cd = 0
ret = TestRW(cd)
ret = 0
End Sub
As far as I can tell, the error occures when including the read/write statements.
Please advice and save my day
Regards
J H Jensen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve, thank you!
As always, right on the spot and correct.
I realy admire your long and outstanding workanswering questions about FORTRAN
Regard
J H Jensen

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page