Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29295 Discussions

Determine application (.dll) path...

laddikey
Beginner
501 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
501 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