This function should print to the console the path of the desired process by its PID, but it only works fine while I am debugging. When the application is compiled and the resulting binary is run, it does not print the path of the desired process if it is an elevated process.
I am using VS2019 and I am just writing code in the console project. So, standard configuration. I am new in c++