I almost forgot about GetCurrentDirectory(). That will give you your current directory without any parsing.

In terms of when you are done with a file, what Windows returns to you is a file HANDLE. You need to use CloseHandle() on that. I consider that to be IMPORTANT.

Unless I have some specific reason to do so, I don't usually use the Windows Api functions for file access, but rather the low level file functions in stdio.h. You might want to take a look at them. I have a tutorial about them if you are interested.