Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: "_stat" or "_wstat" function fails together with ENOENT error when a directory symbolic link path is passed to it in Visual Studio 2010 SP1


View products that this article applies to.

Symptoms

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 that is developed by Microsoft Visual Studio 2010 Service Pack 1 (SP1). 
  • The application calls the _stat or _wstat function, and passes the path of the directory symbolic link "c:\linkfolder" to the path parameter.
In this scenario, the called function does not work, and 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."

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a "Hotfix Download Available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website: Note The "Hotfix Download Available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

 To apply this hotfix, you must have Microsoft Visual Studio 2010 SP1 installed.

Restart requirement

You do not have to restart the computer after you install the hotfix if the affected files are not being used at the time of installation. We recommend that you close all Visual Studio 2010-related components before you install the hotfix.
File information
The global version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.455138,8968-Oct-201313:34x86
Atl100.dll10.0.40219.455386,1928-Oct-201313:44IA-64
Atl100.dll10.0.40219.455159,3768-Oct-201314:27x64
Mfc100.dll10.0.40219.4555,579,9208-Oct-201314:27x64
Mfc100.dll10.0.40219.4554,400,7848-Oct-201314:59x86
Mfc100chs.dll10.0.40219.45537,0168-Oct-201314:27x64
Mfc100chs.dll10.0.40219.45537,0168-Oct-201314:59x86
Mfc100cht.dll10.0.40219.45537,0168-Oct-201314:27x64
Mfc100cht.dll10.0.40219.45537,0168-Oct-201314:59x86
Mfc100d.dll10.0.40219.4559,144,4648-Oct-201315:47x64
Mfc100d.dll10.0.40219.4557,064,2088-Oct-201316:14x86
Mfc100deu.dll10.0.40219.45565,1768-Oct-201314:27x64
Mfc100deu.dll10.0.40219.45565,1768-Oct-201314:59x86
Mfc100enu.dll10.0.40219.45555,9608-Oct-201314:27x64
Mfc100enu.dll10.0.40219.45555,9608-Oct-201314:59x86
Mfc100esn.dll10.0.40219.45564,6648-Oct-201314:27x64
Mfc100esn.dll10.0.40219.45564,6648-Oct-201314:59x86
Mfc100fra.dll10.0.40219.45565,1768-Oct-201314:27x64
Mfc100fra.dll10.0.40219.45565,1768-Oct-201314:59x86
Mfc100ita.dll10.0.40219.45563,1288-Oct-201314:27x64
Mfc100ita.dll10.0.40219.45563,1288-Oct-201314:59x86
Mfc100jpn.dll10.0.40219.45544,6968-Oct-201314:27x64
Mfc100jpn.dll10.0.40219.45544,6968-Oct-201314:59x86
Mfc100kor.dll10.0.40219.45544,1848-Oct-201314:27x64
Mfc100kor.dll10.0.40219.45544,1848-Oct-201314:59x86
Mfc100rus.dll10.0.40219.45561,5928-Oct-201314:27x64
Mfc100rus.dll10.0.40219.45561,5928-Oct-201314:59x86
Mfc100u.dll10.0.40219.4555,606,0328-Oct-201314:27x64
Mfc100u.dll10.0.40219.4554,425,8728-Oct-201314:59x86
Mfc100ud.dll10.0.40219.4559,220,7608-Oct-201315:47x64
Mfc100ud.dll10.0.40219.4557,132,8248-Oct-201316:14x86
Mfcm100.dll10.0.40219.45593,8408-Oct-201314:27x64
Mfcm100.dll10.0.40219.45582,5768-Oct-201314:59x86
Mfcm100d.dll10.0.40219.455120,4728-Oct-201315:47x64
Mfcm100d.dll10.0.40219.455104,6008-Oct-201316:14x86
Mfcm100u.dll10.0.40219.45593,8488-Oct-201314:27x64
Mfcm100u.dll10.0.40219.45582,5848-Oct-201314:59x86
Mfcm100ud.dll10.0.40219.455122,0088-Oct-201315:47x64
Mfcm100ud.dll10.0.40219.455106,1368-Oct-201316:14x86
Mfcmifc80u.dll10.0.40219.45513,9769-Oct-201312:02x86
Msvcp100.dll10.0.40219.455422,0408-Oct-201313:34x86
Msvcp100.dll10.0.40219.455967,3208-Oct-201313:44IA-64
Msvcp100.dll10.0.40219.455608,9208-Oct-201314:27x64
Msvcp100d.dll10.0.40219.4551,980,0568-Oct-201315:26IA-64
Msvcp100d.dll10.0.40219.4551,015,4488-Oct-201315:53x64
Msvcp100d.dll10.0.40219.455744,6008-Oct-201316:19x86
Msvcr100_clr0400.dll10.0.40219.455774,8088-Oct-201313:34x86
Msvcr100_clr0400.dll10.0.40219.4551,500,8248-Oct-201313:44IA-64
Msvcr100_clr0400.dll10.0.40219.455830,6168-Oct-201314:27x64
Msvcr100d_clr0400.dll10.0.40219.4553,765,9128-Oct-201315:26IA-64
Msvcr100d_clr0400.dll10.0.40219.4551,874,5848-Oct-201315:53x64
Msvcr100d_clr0400.dll10.0.40219.4551,506,4568-Oct-201316:19x86
Vcomp100.dll10.0.40219.455144,5368-Oct-201313:44IA-64
Vcomp100.dll10.0.40219.45559,0328-Oct-201314:27x64
Vcomp100.dll10.0.40219.45552,3768-Oct-201314:59x86
Vcomp100d.dll10.0.40219.455318,6168-Oct-201315:21IA-64
Vcomp100d.dll10.0.40219.455108,6968-Oct-201315:42x64
Vcomp100d.dll10.0.40219.45589,7528-Oct-201316:10x86
Vcomp100ui.dll10.0.40219.45510,3929-Oct-201312:02x86
Vcomp100ui.dll10.0.40219.45510,9049-Oct-201312:02x86
Vcomp100ui.dll10.0.40219.45511,9289-Oct-201312:02x86
Vcomp100ui.dll10.0.40219.45512,4409-Oct-201312:02x86
Vcredist_ia64.exe10.0.40219.4553,045,0488-Oct-201317:34x86
Vcredist_x64.exe10.0.40219.45510,292,9128-Oct-201317:44x86
Vcredist_x86.exe10.0.40219.4559,009,3288-Oct-201317:47x86


↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kbautohotfix, kbqfe, kbfix, kbsurveynew, kbexpertiseadvanced, kbhotfixserver, kb

↑ Back to the top

Article Info
Article ID : 2889080
Revision : 1
Created on : 1/7/2017
Published on : 10/25/2013
Exists online : False
Views : 243