Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

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.

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.

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:

http://support.microsoft.com/contactus/?ws=supportNote 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 name

File version

File size

Date

Time

Platform

Atl100.dll

10.0.40219.362

139,016

15-Nov-2011

14:32

x86

Mfc100.dll

10.0.40219.362

4,398,344

15-Nov-2011

14:32

x86

Mfc100chs.dll

10.0.40219.362

37,136

15-Nov-2011

14:32

x86

Mfc100cht.dll

10.0.40219.362

37,136

15-Nov-2011

14:32

x86

Mfc100deu.dll

10.0.40219.362

65,296

15-Nov-2011

14:32

x86

Mfc100enu.dll

10.0.40219.362

56,080

15-Nov-2011

14:32

x86

Mfc100esn.dll

10.0.40219.362

64,784

15-Nov-2011

14:32

x86

Mfc100fra.dll

10.0.40219.362

65,296

15-Nov-2011

14:32

x86

Mfc100ita.dll

10.0.40219.362

63,248

15-Nov-2011

14:32

x86

Mfc100jpn.dll

10.0.40219.362

44,816

15-Nov-2011

14:32

x86

Mfc100kor.dll

10.0.40219.362

44,304

15-Nov-2011

14:32

x86

Mfc100rus.dll

10.0.40219.362

61,712

15-Nov-2011

14:32

x86

Mfc100u.dll

10.0.40219.362

4,423,944

15-Nov-2011

14:32

x86

Mfcm100.dll

10.0.40219.362

82,696

15-Nov-2011

14:32

x86

Mfcm100u.dll

10.0.40219.362

82,704

15-Nov-2011

14:32

x86

Msvcp100.dll

10.0.40219.362

422,160

15-Nov-2011

14:32

x86

msvcr100.dll

10.0.40219.362

774,416

15-Nov-2011

14:32

x86

Vcomp100.dll

10.0.40219.362

51,984

15-Nov-2011

14:32

x86



For all supported x64-based versions of Microsoft Visual C++ 2010 SP1 Redistributable Package

File name

File version

File size

Date

Time

Platform

Atl100.dll

10.0.40219.362

159,496

15-Nov-2011

13:54

x64

Mfc100.dll

10.0.40219.362

5,575,944

15-Nov-2011

13:54

x64

Mfc100chs.dll

10.0.40219.362

37,136

15-Nov-2011

13:54

x64

Mfc100cht.dll

10.0.40219.362

37,136

15-Nov-2011

13:54

x64

Mfc100deu.dll

10.0.40219.362

65,296

15-Nov-2011

13:54

x64

Mfc100enu.dll

10.0.40219.362

56,080

15-Nov-2011

13:54

x64

Mfc100esn.dll

10.0.40219.362

64,784

15-Nov-2011

13:54

x64

Mfc100fra.dll

10.0.40219.362

65,296

15-Nov-2011

13:54

x64

Mfc100ita.dll

10.0.40219.362

63,248

15-Nov-2011

13:54

x64

Mfc100jpn.dll

10.0.40219.362

44,816

15-Nov-2011

13:54

x64

Mfc100kor.dll

10.0.40219.362

44,304

15-Nov-2011

13:54

x64

Mfc100rus.dll

10.0.40219.362

61,712

15-Nov-2011

13:54

x64

Mfc100u.dll

10.0.40219.362

5,603,080

15-Nov-2011

13:54

x64

Mfcm100.dll

10.0.40219.362

93,960

15-Nov-2011

13:54

x64

Mfcm100u.dll

10.0.40219.362

93,968

15-Nov-2011

13:54

x64

Msvcp100.dll

10.0.40219.362

609,040

15-Nov-2011

13:54

x64

msvcr100.dll

10.0.40219.362

830,224

15-Nov-2011

13:54

x64

Vcomp100.dll

10.0.40219.362

58,128

15-Nov-2011

13:54

x64



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

File name

File version

File size

Date

Time

Platform

Atl100.dll

10.0.40219.362

386,312

15-Nov-2011

14:13

IA-64

Msvcp100.dll

10.0.40219.362

967,440

15-Nov-2011

14:13

IA-64

msvcr100.dll.dll

10.0.40219.362

1,500,432

15-Nov-2011

14:13

IA-64

Vcomp100.dll

10.0.40219.362

144,144

15-Nov-2011

14:13

IA-64



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:

General information about the fopen() and _wfopen() functions

Status

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

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×