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

application path

drpierce
Débutant
742 Visites
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 Compliments
1 Répondre
james1
Débutant
742 Visites
use kernel32
character(MAX_PATH) path
call GetModuleFileName (GetModuleHandle(NULL), path, MAX_PATH)
print *, path(:INDEX(path,CHAR(0)))
end
James
0 Compliments
Répondre