On 12/7/2016 3:23 PM, Dipak Gaigole wrote: > GetCurrentDirectory returned , ret = <6> GetCurrentDirectory failed with ERROR_INVALID_HANDLE. As a result the buffer was not populated. What is in dirname[] is stack garbage. My guess is that /cygdrive/c/Program Files is not associated with a device or if it associated with a NTFS device the driver doesn't know how to match /cygdrive with a valid path. Jeffrey Altman