c++ cli - Visual C++ GetCurrentDirectory() Not Working Properly During Startup -


The program works fine with a problem GetCurrentDirectory (); When it is used during start-up, it shows the directory as "c: \ documents and settings \ administrator", which is the actual application directory. If you use the application to close it and run it again it returns the proper directory after writing the current directory in a different file and then without reading it how can you solve this problem.

I will use GetModuleFileName () and then search for the last "\", checking the string Divide by GetCurrentDirectory (), if I do not match, then I will set the stepline string as the current directory by using SetcurrentDirectory ()


Comments

Popular posts from this blog

eclipse plugin - Run java code error: Workspace is closed -

ios - How do I use CFArrayRef in Swift? -

scala - Play Framework - how to bind form to a session field -