Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29386 Discussions

Determine application (.dll) path...

laddikey
Beginner
631 Views
How can I locate a Fortran dll from within that specific binary file at run time? Is this supported? In VB6 one could use "stringx = app.path" & likewise in C# something along the lines of "stringx = Application.Path". Is there something close in Fortran?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
631 Views
If you know the name (but not path) of the DLL, you can use GetModuleHandle(filename) to get a handle for the DLL and then call GetModuleFileName to get the path. These are Win32 API routines callable from Fortran.

If you want the executable path, pass NULL to GetModuleHandle.
0 Kudos
Reply