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 a Visual C++ 2010 application


View products that this article applies to.

This hotfix applies to Microsoft Visual C++ 2010 Service Pack 1 (SP1) Redistributable Package.

↑ Back to the top


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.
  • 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."

↑ 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 C++ 2010 SP1 Redistributable Package installed.

Restart requirement

You may 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 C++ 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.

For all supported x86-based versions of Microsoft Visual C++ 2010 SP1 Redistributable Package
File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.455138,89608-Oct-201313:34x86
Mfc100.dll10.0.40219.4554,400,78408-Oct-201314:59x86
Mfc100chs.dll10.0.40219.45537,01608-Oct-201314:59x86
Mfc100cht.dll10.0.40219.45537,01608-Oct-201314:59x86
Mfc100deu.dll10.0.40219.45565,17608-Oct-201314:59x86
Mfc100enu.dll10.0.40219.45555,96008-Oct-201314:59x86
Mfc100esn.dll10.0.40219.45564,66408-Oct-201314:59x86
Mfc100fra.dll10.0.40219.45565,17608-Oct-201314:59x86
Mfc100ita.dll10.0.40219.45563,12808-Oct-201314:59x86
Mfc100jpn.dll10.0.40219.45544,69608-Oct-201314:59x86
Mfc100kor.dll10.0.40219.45544,18408-Oct-201314:59x86
Mfc100rus.dll10.0.40219.45561,59208-Oct-201314:59x86
Mfc100u.dll10.0.40219.4554,425,87208-Oct-201314:59x86
Mfcm100.dll10.0.40219.45582,57608-Oct-201314:59x86
Mfcm100u.dll10.0.40219.45582,58408-Oct-201314:59x86
Msvcp100.dll10.0.40219.455422,04008-Oct-201313:34x86
Msvcr100.dll10.0.40219.455774,80808-Oct-201313:34x86
Vcomp100.dll10.0.40219.45552,37608-Oct-201314:59x86
For all supported x64-based versions of Microsoft Visual C++ 2010 SP1 Redistributable Package
File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.455159,37608-Oct-201314:27x64
Mfc100.dll10.0.40219.4555,579,92008-Oct-201314:27x64
Mfc100chs.dll10.0.40219.45537,01608-Oct-201314:27x64
Mfc100cht.dll10.0.40219.45537,01608-Oct-201314:27x64
Mfc100deu.dll10.0.40219.45565,17608-Oct-201314:27x64
Mfc100enu.dll10.0.40219.45555,96008-Oct-201314:27x64
Mfc100esn.dll10.0.40219.45564,66408-Oct-201314:27x64
Mfc100fra.dll10.0.40219.45565,17608-Oct-201314:27x64
Mfc100ita.dll10.0.40219.45563,12808-Oct-201314:27x64
Mfc100jpn.dll10.0.40219.45544,69608-Oct-201314:27x64
Mfc100kor.dll10.0.40219.45544,18408-Oct-201314:27x64
Mfc100rus.dll10.0.40219.45561,59208-Oct-201314:27x64
Mfc100u.dll10.0.40219.4555,606,03208-Oct-201314:27x64
Mfcm100.dll10.0.40219.45593,84008-Oct-201314:27x64
Mfcm100u.dll10.0.40219.45593,84808-Oct-201314:27x64
Msvcp100.dll10.0.40219.455608,92008-Oct-201314:27x64
Msvcr100.dll10.0.40219.455830,61608-Oct-201314:27x64
Vcomp100.dll10.0.40219.45559,03208-Oct-201314:27x64
For all supported IA-64–based versions of Visual C++ 2010 SP1 Redistributable Package
File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.455386,19208-Oct-201313:44IA-64
Msvcp100.dll10.0.40219.455967,32008-Oct-201313:44IA-64
Msvcr100.dll10.0.40219.4551,500,82408-Oct-201313:44IA-64
Vcomp100.dll10.0.40219.455144,53608-Oct-201313:44IA-64


↑ 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, kbhotfixserver, kbfix, kbsurveynew, kbexpertiseadvanced, kb

↑ Back to the top

Article Info
Article ID : 2890375
Revision : 1
Created on : 1/7/2017
Published on : 1/21/2014
Exists online : False
Views : 1454