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.

application path

drpierce
Beginner
454 Views
I would like to get the application path for my executable. I have looked over the documentation and your forum to no avail.
A customer provided a dll that requires that I pass in the location of the dll. No idea why. I can't change it. I can't hardcode the path. I have to be able to determine the application location through code.
Any ideas?
Thanks
0 Kudos
1 Reply
james1
Beginner
454 Views
use kernel32
character(MAX_PATH) path
call GetModuleFileName (GetModuleHandle(NULL), path, MAX_PATH)
print *, path(:INDEX(path,CHAR(0)))
end
James
0 Kudos
Reply