GetCurrentDirectory might not return the real directory path, its not constant. try to use GetModuleFileName(NULL, sIniPath); instead. it retrieves the whole path of the exe including filename, but you can strip the filename off