I don't understand exactly what 's your question.
Do you want to r/w a file in the same path where you executable is?
If yes, you can use
LPTSTR GetCommandLine(void);
this function returns an...