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: You cannot open a file that is at least 4 GB to append or to write data by using an application that uses the Visual C++ 2010 Redistributable Package


Symptoms

When you try to load a file that is equal to or larger than 4 gigabytes (GB) in a Microsoft Visual C++ 2010 application to append or write data, the file does not load, or the following error is returned:
EINVAL (Invalid argument)

Note This issue occurs when the fopen() function is used in the application to open the file.

↑ Back to the top


Cause

This issue occurs because of the way that the fopen() function seeks to the ends of files after it opens the files for appending. The fopen() function internally uses the _lseek() function to perform this action. However, the _lseek() function cannot handle files that are equal to or larger than 4 GB.

↑ Back to the top


Resolution

This hotfix changes the behavior of the fopen() family of functions. After you apply this hotfix, the fopen() function internally uses a function that can seek beyond the 4 GB limit without returning an error. Specifically, the fopen() function uses the _lseeki64() function instead of the _lseek() function.

Hotfix information

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

To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft website:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.


Prerequisites

To apply this hotfix, you must have Microsoft Visual C++ 2010 Service Pack 1 (SP1) Redistributable Package installed.

Restart requirement

You may have to restart the computer after you install this hotfix if the affected files are being used.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The global version of this 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.362139,01615-Nov-201114:32x86
Mfc100.dll10.0.40219.3624,398,34415-Nov-201114:32x86
Mfc100chs.dll10.0.40219.36237,13615-Nov-201114:32x86
Mfc100cht.dll10.0.40219.36237,13615-Nov-201114:32x86
Mfc100deu.dll10.0.40219.36265,29615-Nov-201114:32x86
Mfc100enu.dll10.0.40219.36256,08015-Nov-201114:32x86
Mfc100esn.dll10.0.40219.36264,78415-Nov-201114:32x86
Mfc100fra.dll10.0.40219.36265,29615-Nov-201114:32x86
Mfc100ita.dll10.0.40219.36263,24815-Nov-201114:32x86
Mfc100jpn.dll10.0.40219.36244,81615-Nov-201114:32x86
Mfc100kor.dll10.0.40219.36244,30415-Nov-201114:32x86
Mfc100rus.dll10.0.40219.36261,71215-Nov-201114:32x86
Mfc100u.dll10.0.40219.3624,423,94415-Nov-201114:32x86
Mfcm100.dll10.0.40219.36282,69615-Nov-201114:32x86
Mfcm100u.dll10.0.40219.36282,70415-Nov-201114:32x86
Msvcp100.dll10.0.40219.362422,16015-Nov-201114:32x86
msvcr100.dll 10.0.40219.362774,41615-Nov-201114:32x86
Vcomp100.dll10.0.40219.36251,98415-Nov-201114:32x86


For all supported x64-based versions of Microsoft Visual C++ 2010 SP1 Redistributable Package
File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.362159,49615-Nov-201113:54x64
Mfc100.dll10.0.40219.3625,575,94415-Nov-201113:54x64
Mfc100chs.dll10.0.40219.36237,13615-Nov-201113:54x64
Mfc100cht.dll10.0.40219.36237,13615-Nov-201113:54x64
Mfc100deu.dll10.0.40219.36265,29615-Nov-201113:54x64
Mfc100enu.dll10.0.40219.36256,08015-Nov-201113:54x64
Mfc100esn.dll10.0.40219.36264,78415-Nov-201113:54x64
Mfc100fra.dll10.0.40219.36265,29615-Nov-201113:54x64
Mfc100ita.dll10.0.40219.36263,24815-Nov-201113:54x64
Mfc100jpn.dll10.0.40219.36244,81615-Nov-201113:54x64
Mfc100kor.dll10.0.40219.36244,30415-Nov-201113:54x64
Mfc100rus.dll10.0.40219.36261,71215-Nov-201113:54x64
Mfc100u.dll10.0.40219.3625,603,08015-Nov-201113:54x64
Mfcm100.dll10.0.40219.36293,96015-Nov-201113:54x64
Mfcm100u.dll10.0.40219.36293,96815-Nov-201113:54x64
Msvcp100.dll10.0.40219.362609,04015-Nov-201113:54x64
msvcr100.dll10.0.40219.362830,22415-Nov-201113:54x64
Vcomp100.dll10.0.40219.36258,12815-Nov-201113:54x64


For all supported IA-64–based versions of Visual C++ 2010 SP1 Redistributable Package

File nameFile versionFile sizeDateTimePlatform
Atl100.dll10.0.40219.362386,31215-Nov-201114:13IA-64
Msvcp100.dll10.0.40219.362967,44015-Nov-201114:13IA-64
msvcr100.dll.dll10.0.40219.3621,500,43215-Nov-201114:13IA-64
Vcomp100.dll10.0.40219.362144,14415-Nov-201114:13IA-64


↑ Back to the top


More Information

For more information about another hotfix package that applies to Microsoft Visual Studio 2010 Service Pack 1 (SP1) to resolve this issue, click the following article number to view the article in the Microsoft Knowledge Base:

2606069  FIX: You cannot open a file that is at least 4 GB to append or to write data by using a Visual C++ 2010 application

For more information about the fopen() and _wfopen() functions, visit the following MSDN website:

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

↑ Back to the top

Article Info
Article ID : 2606060
Revision : 1
Created on : 1/7/2017
Published on : 1/30/2012
Exists online : False
Views : 296