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

application path

drpierce
Beginner
441 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
441 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