GetFullPathName resolves file names and relative path names in absolute paths by adding the current working directory of the calling process.
GetLongPathName only allows short (8.3) names for long names.
Note that the latter requires access to the disk, so the relative path is likely to be resolved using the current working directory.
TL; dr:
Call GetFullPathName to resolve the relative path to the absolute.
Call GetLongPathName to resolve the absolute path, which may contain a short (8.3) name for the long form of the name.
Be careful:
The current working directory is a resource of each process and can be changed, for example. in the standard file open dialog box. I would use this only to resolve command line arguments, which may be relative to the CWD in which the program was running.
A long path name length may not exist for every 8.3 named file.
source share