What do you get if you do:
Code:
char path[256];
memset(path, 0, sizeof(path));
if (_getcwd(path, 256) == NULL)
{
WriteLog("Error getting working directory!");
} else {
WriteLog(path);
// do stuff here
}