Consider the following scenario:
- You have a folder named "folder1" on drive D. For example, you have the following folder: d:\folder1.
- You run the mklink command to create a directory symbolic link to the folder. For example, you run the following command to create a directory symbolic link folder on drive C:
mklink /d c:\linkfolder d:\folder1
- You run a Microsoft Visual C++ 2010 application.
- The application calls the _stat or _wstat function, and then it passes the path of the directory symbolic link "c:\linkfolder" to the path parameter.
In this scenario, the called function does not work, and it returns an ERROR_FILE_NOT_FOUND error.
Note The returned value of the
_stat or
_wstat function is
-1. The error code is "2," which stands for "ENOENT: No such file or directory."