Bob Moore's Coding Tips

48. How do I determine the full path to my own executable file at run-time?

Hint - the correct answer to this question is NOT GetCurrentDirectory.

The correct answer is to call GetModuleFileName using NULL for the HMODULE parameter.

NB : Windows 9x developers (are there any of you left?) should read the help, there are some long-filename problems that affect only you.