Skip to content

Example of getting the full canonical path to an executable file. (Windows only)

Notifications You must be signed in to change notification settings

NsPro04/getCurrentExePath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

C++20 WinAPI example of getting the canonical path to an executable file.

Handles the following cases:

When the process is launched using a Long Path (> MAX_PATH)
When the process is launched using a Short Path (for example: C:\PROGRA~1\getCurrentExePath.exe)
When the process is launched using a relative path (for example: C:\dir0\..\getCurrentExePath.exe)

In case of any errors, the function throws an exception.

Building

git clone https://github.com/NsPro04/getCurrentExePath.git
.\getCurrentExePath\getCurrentExePath.sln
Ctrl+Shift+B

About

Example of getting the full canonical path to an executable file. (Windows only)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages