Search code examples
c++winapipathfully-qualified-naming

How to get the fully qualified path name in C++


Is there a function that returns the fully qualified path name for any inputted file?

I'm thinking of something like:

LPCSTR path = "foo.bar"
LPCSTR fullPath = FullyQualifiedPath(path);
//fullPath now equals C:\path\to\foo.bar

Thanks


Solution

  • In Win32, call the GetFullPathName function.