- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve, hi all,
How can I call from Fortran a Fortran function, who has a C header as the interface (in a DLL)?
code within the dll:
C header:
extern "C" __declspec(dllimport) char* _cdecl TRNSYSFUNCTIONS_mp_GETTRNSYSUSERLIBDIR(void);
#define getTrnsysUserLibDir TRNSYSFUNCTIONS_mp_GETTRNSYSUSERLIBDIR
Fortranfunction:
! function getTrnsysUserLibDir: returns the location of the directory that contains Release versions of external DLLs.
Function getTrnsysUserLibDir()
!dec$ attributes dllexport :: getTrnsysUserLibDir
Use TrnsysData
Character (len=maxPathLength) :: getTrnsysUserLibDir
getTrnsysUserLibDir = TrnsysUserLibDir
End Function getTrnsysUserLibDir
In the dependency walker I can see this:
Ordinal: 170 (0x00A9), Hint: 169 (0x00AD), Function: TRNSYSFUNCTIONS_mp_GETTRNSYSUSERLIBDIR, Entry Point: 0x00A6CBA
Olaf
Link Copied

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