Microsoft Knowledge Base Email Alertz

The value of a stream pointer is incorrect when an application calls the ifstream::seekg function in Visual Studio 2008 SP1

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 979335 - Last Review: October 7, 2011 - Revision: 2.0

The value of a stream pointer is incorrect when an application calls the ifstream::seekg function in Visual Studio 2008 SP1

On This Page

SYMPTOMS

Consider the following scenario:
  • You develop a Microsoft Visual C++ 2008 Service Pack 1 (SP1) application by using Microsoft Visual Studio 2008 SP1.
  • The application uses the ifstream class to perform stream operations.
  • The application calls the ifstream::seekg function.
  • The seek position is located after the end position of the stream.
In this scenario, the value of the stream pointer is the value that represents the end position of the stream. However, you expect "-1" to be the value of the stream pointer. Additionally, this behavior leads to the following problems:
  • When you call the ifstream::tellg function to obtain the pointer value, "-1" is not the value that is returned.
  • When you call the ifstream::eof function, "true" is not the value that is returned.
Note This issue does not occur in Visual C++ 2005 SP1.

RESOLUTION

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem immediately, 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 Web site:
http://support.microsoft.com/contactus/?ws=support (http://support.microsoft.com/contactus/?ws=support)
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

You must have Visual Studio 2008 SP1 installed to apply this hotfix.

Restart requirement

You do not have to restart the computer after you apply this hotfix if no instance of Visual Studio is being used.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

The English 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.
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Atl90.dll9.0.30729.4967176,45604-Feb-201023:32x64
Atl90.dll9.0.30729.4967416,07205-Feb-201001:12IA-64
Atl90.dll9.0.30729.4967159,04805-Feb-201002:14x86
Almap.dll18,73604-Feb-201021:38x86
Almap.lib17,80804-Feb-201021:38x86
Atl.lib20,01204-Feb-201021:42x86
Atl.lib21,88204-Feb-201021:50x86
Atl.lib19,25604-Feb-201021:41x86
Atlassem.h2,03704-Feb-201021:34
Atlbuild.h57204-Feb-201020:36
Atldload.lib396,14804-Feb-201021:42x86
Atldload.lib493,48004-Feb-201021:50x86
Atldload.lib429,02204-Feb-201021:41x86
Atls.lib1,413,00604-Feb-201021:42x86
Atls.lib1,354,52604-Feb-201021:50x86
Atls.lib1,114,53604-Feb-201021:41x86
Atlsd.lib1,784,14404-Feb-201021:42x86
Atlsd.lib2,031,79804-Feb-201021:50x86
Atlsd.lib1,605,96004-Feb-201021:41x86
Crtassem.h95104-Feb-201021:33x86
Crtassem.h1,29804-Feb-201021:34
Intrin.h91,68304-Feb-201021:34
Libcmt.lib9,217,20804-Feb-201021:42x86
Libcmt.lib12,760,76204-Feb-201021:47x86
Libcmt.lib10,006,92004-Feb-201021:40x86
Libcmtd.lib11,365,49204-Feb-201021:42x86
Libcmtd.lib16,473,87804-Feb-201021:47x86
Libcmtd.lib12,753,81804-Feb-201021:40x86
Libcpmt.lib5,349,92804-Feb-201021:42x86
Libcpmt.lib8,755,30404-Feb-201021:47x86
Libcpmt.lib6,963,46204-Feb-201021:40x86
Libcpmtd.lib6,781,27004-Feb-201021:42x86
Libcpmtd.lib11,714,09004-Feb-201021:47x86
Libcpmtd.lib9,299,51804-Feb-201021:40x86
Mfc90.lib5,196,14804-Feb-201022:20x64
Mfc90.lib5,197,22404-Feb-201022:28x86
Mfc90d.lib6,026,79204-Feb-201022:20x64
Mfc90d.lib6,017,75604-Feb-201022:28x86
Mfc90u.lib6,501,18604-Feb-201022:21x64
Mfc90u.lib6,595,79204-Feb-201022:28x86
Mfc90ud.lib7,541,86204-Feb-201022:21x64
Mfc90ud.lib7,622,20604-Feb-201022:29x86
Mfc.bsc18,705,40805-Feb-201000:09
Mfc_loc.manifest5,88205-Feb-201002:19x86
Mfcassem.h3,14304-Feb-201022:05
Mfcdload.lib780,35404-Feb-201022:17x86
Mfcm90.lib43,10404-Feb-201022:22x64
Mfcm90.lib41,05204-Feb-201022:29x86
Mfcm90d.lib46,18204-Feb-201022:22x64
Mfcm90d.lib44,59604-Feb-201022:29x86
Mfcm90u.lib44,54804-Feb-201022:22x64
Mfcm90u.lib42,46004-Feb-201022:29x86
Mfcm90ud.lib47,64004-Feb-201022:22x64
Mfcm90ud.lib46,01404-Feb-201022:29x86
Mfcs90.lib1,054,70604-Feb-201022:17x86
Mfcs90.lib1,048,94404-Feb-201022:25x86
Mfcs90d.lib1,049,10804-Feb-201022:17x64
Mfcs90d.lib1,020,31204-Feb-201022:25x86
Mfcs90u.lib1,068,31004-Feb-201022:18x64
Mfcs90u.lib1,063,03004-Feb-201022:26x86
Mfcs90ud.lib1,065,49604-Feb-201022:17x86
Mfcs90ud.lib1,035,73004-Feb-201022:26x86
Microsoft.vc90.atl.manifest85804-Feb-201023:37x64
Microsoft.vc90.atl.manifest85705-Feb-201001:15IA-64
Microsoft.vc90.atl.manifest85605-Feb-201002:19x86
Microsoft_vc90_atl_x86_ia64.msm215,04005-Feb-201017:18IA-64
Microsoft_vc90_atl_x86.msm134,65605-Feb-201017:13x86
Microsoft_vc90_atl_x86_x64.msm135,68005-Feb-201017:15x64
Microsoft.vc90.crt.manifest1,86204-Feb-201023:37x64
Microsoft.vc90.crt.manifest1,86105-Feb-201001:15IA-64
Microsoft.vc90.crt.manifest1,86005-Feb-201002:19x86
Microsoft_vc90_crt_x86_ia64.msm1,026,04805-Feb-201017:18IA-64
Microsoft_vc90_crt_x86.msm599,55205-Feb-201017:11x86
Microsoft_vc90_crt_x86_x64.msm632,83205-Feb-201017:15x64
Microsoft.vc90.debugcrt.manifest1,87004-Feb-201023:37x64
Microsoft.vc90.debugcrt.manifest1,86905-Feb-201001:15IA-64
Microsoft.vc90.debugcrt.manifest1,86805-Feb-201002:19x86
Microsoft_vc90_debugcrt_x86_ia64.msm1,797,12005-Feb-201017:17IA-64
Microsoft_vc90_debugcrt_x86.msm823,80805-Feb-201017:11x86
Microsoft_vc90_debugcrt_x86_x64.msm828,92805-Feb-201017:15x64
Microsoft.vc90.debugmfc.manifest2,36804-Feb-201023:37x64
Microsoft.vc90.debugmfc.manifest2,36605-Feb-201002:19x86
Microsoft_vc90_debugmfc_x86_ia64.msm4,759,04007-Feb-201004:58IA-64
Microsoft_vc90_debugmfc_x86.msm5,554,68805-Feb-201017:13x86
Microsoft_vc90_debugmfc_x86_x64.msm5,970,94405-Feb-201017:14x64
Microsoft.vc90.debugopenmp.manifest86705-Feb-201002:19x86
Microsoft.vc90.debugopenmp.manifest86805-Feb-201001:15x86
Microsoft.vc90.debugopenmp.manifest86904-Feb-201023:37x86
Microsoft_vc90_debugopenmp_x86_ia64.msm143,36005-Feb-201017:16IA-64
Microsoft_vc90_debugopenmp_x86.msm92,67205-Feb-201017:12x86
Microsoft_vc90_debugopenmp_x86_x64.msm92,67205-Feb-201017:13x64
Microsoft.vc90.mfc.manifest2,35904-Feb-201023:37x64
Microsoft.vc90.mfc.manifest2,35705-Feb-201002:19x86
Microsoft_vc90_mfc_x86_ia64.msm2,600,96007-Feb-201005:10IA-64
Microsoft_vc90_mfc_x86.msm4,173,31205-Feb-201017:13x86
Microsoft_vc90_mfc_x86_x64.msm4,867,58405-Feb-201017:15x64
Microsoft.vc90.mfcloc.manifest5,88404-Feb-201023:37x64
Microsoft.vc90.mfcloc.manifest5,88205-Feb-201002:19x86
Microsoft_vc90_mfcloc_x86_ia64.msm242,17607-Feb-201005:18IA-64
Microsoft_vc90_mfcloc_x86.msm243,71205-Feb-201017:12x86
Microsoft_vc90_mfcloc_x86_x64.msm241,66405-Feb-201017:14x64
Microsoft.vc90.openmp.manifest86105-Feb-201002:19x86
Microsoft.vc90.openmp.manifest86205-Feb-201001:15x86
Microsoft.vc90.openmp.manifest86304-Feb-201023:37x86
Microsoft_vc90_openmp_x86_ia64.msm109,56805-Feb-201017:16IA-64
Microsoft_vc90_openmp_x86.msm83,45605-Feb-201017:12x86
Microsoft_vc90_openmp_x86_x64.msm82,94405-Feb-201017:14x64
Msvcmrt.lib1,529,80804-Feb-201021:42x86
Msvcmrt.lib1,697,61204-Feb-201021:40x86
Msvcmrt.lib1,846,52604-Feb-201021:47x86
Msvcmrtd.lib1,625,96004-Feb-201021:42x86
Msvcmrtd.lib1,804,92604-Feb-201021:41x86
Msvcmrtd.lib1,956,88204-Feb-201021:47x86
Msvcprt.lib1,654,51604-Feb-201021:42x86
Msvcprt.lib2,140,98604-Feb-201021:47x86
Msvcprt.lib1,686,81804-Feb-201021:40x86
Msvcprtd.lib1,827,18604-Feb-201021:42x86
Msvcprtd.lib2,369,33204-Feb-201021:47x86
Msvcprtd.lib1,860,04004-Feb-201021:40x86
Msvcrt.lib1,360,06804-Feb-201021:42x86
Msvcrt.lib1,585,29604-Feb-201021:47x86
Msvcrt.lib1,357,32204-Feb-201021:40x86
Msvcrtd.lib1,392,99004-Feb-201021:42x86
Msvcrtd.lib1,642,42804-Feb-201021:47x86
Msvcrtd.lib1,400,23404-Feb-201021:40x86
Msvcurt.lib15,375,46604-Feb-201021:42x86
Msvcurt.lib15,737,14804-Feb-201021:41x86
Msvcurt.lib15,882,48204-Feb-201021:47x86
Msvcurtd.lib16,952,22604-Feb-201021:42x86
Msvcurtd.lib17,303,53804-Feb-201021:41x86
Msvcurtd.lib17,454,85204-Feb-201021:47x86
Nafxcw.lib49,963,81604-Feb-201022:28x86
Nafxcw.lib59,306,29404-Feb-201022:21x86
Nafxcwd.lib52,949,34604-Feb-201022:28x86
Nafxcwd.lib66,787,53004-Feb-201022:20x86
Nmmintrin.h4,09104-Feb-201021:34x86
Ompassem.h95104-Feb-201022:07
Ptrustm.lib426,51804-Feb-201021:42x86
Ptrustmd.lib433,69004-Feb-201021:42x86
Ptrustu.lib426,51804-Feb-201021:42x86
Ptrustud.lib433,69004-Feb-201021:42x86
Sdknames.lib7,46204-Feb-201021:38x86
Stat64.c.4424.cn.ln11,10604-Feb-201021:34
Stat.c.4423.cn.ln12,72604-Feb-201021:34
Tcmap.lib29,67604-Feb-201021:38x86
Tcmapdll.lib32,05804-Feb-201021:38x86
Uafxcw.lib50,880,28204-Feb-201022:29x86
Uafxcw.lib60,097,21204-Feb-201022:21x86
Uafxcwd.lib54,310,53804-Feb-201022:29x86
Uafxcwd.lib68,072,97604-Feb-201022:21x86
Vcomp.lib28,44604-Feb-201022:40x86
Vcomp.lib27,89004-Feb-201022:23x86
Vcomp.lib33,22004-Feb-201023:13x86
Vcompd.dll27,99804-Feb-201022:23x86
Vcompd.lib28,57404-Feb-201022:40x86
Vcompd.lib33,33004-Feb-201023:13x86
Wchar.h.1.7507.cn.ln77,30404-Feb-201021:34
Mfc90.dll9.0.30729.49675,083,46404-Feb-201023:32x64
Mfc90.dll9.0.30729.49673,765,06405-Feb-201002:14x86
Mfc90chs.dll9.0.30729.496735,66404-Feb-201023:32x64
Mfc90chs.dll9.0.30729.496735,66405-Feb-201002:14x86
Mfc90cht.dll9.0.30729.496736,68804-Feb-201023:32x64
Mfc90cht.dll9.0.30729.496736,68805-Feb-201002:14x86
Mfc90d.dll9.0.30729.49677,418,18404-Feb-201023:32x64
Mfc90d.dll9.0.30729.49675,933,89605-Feb-201002:14x86
Mfc90deu.dll9.0.30729.496763,31204-Feb-201023:32x64
Mfc90deu.dll9.0.30729.496763,31205-Feb-201002:14x86
Mfc90enu.dll9.0.30729.496753,58404-Feb-201023:32x64
Mfc90enu.dll9.0.30729.496753,58405-Feb-201002:14x86
Mfc90esn.dll9.0.30729.496761,77604-Feb-201023:32x64
Mfc90esn.dll9.0.30729.496761,77605-Feb-201002:14x86
Mfc90esp.dll9.0.30729.496761,77604-Feb-201023:32x64
Mfc90esp.dll9.0.30729.496761,77605-Feb-201002:14x86
Mfc90fra.dll9.0.30729.496762,80004-Feb-201023:32x64
Mfc90fra.dll9.0.30729.496762,80005-Feb-201002:14x86
Mfc90ita.dll9.0.30729.496761,26404-Feb-201023:32x64
Mfc90ita.dll9.0.30729.496761,26405-Feb-201002:14x86
Mfc90jpn.dll9.0.30729.496743,34404-Feb-201023:32x64
Mfc90jpn.dll9.0.30729.496743,34405-Feb-201002:14x86
Mfc90kor.dll9.0.30729.496742,83204-Feb-201023:32x64
Mfc90kor.dll9.0.30729.496742,83205-Feb-201002:14x86
Mfc90u.dll9.0.30729.49675,102,40804-Feb-201023:32x64
Mfc90u.dll9.0.30729.49673,780,42405-Feb-201002:14x86
Mfc90ud.dll9.0.30729.49677,463,24804-Feb-201023:32x64
Mfc90ud.dll9.0.30729.49675,979,47205-Feb-201002:14x86
Mfcm90.dll9.0.30729.496767,07204-Feb-201023:33x64
Mfcm90.dll9.0.30729.496759,90405-Feb-201002:15x86
Mfcm90d.dll9.0.30729.496793,18404-Feb-201023:33x64
Mfcm90d.dll9.0.30729.496780,89605-Feb-201002:15x86
Mfcm90u.dll9.0.30729.496767,07204-Feb-201023:33x64
Mfcm90u.dll9.0.30729.496759,90405-Feb-201002:15x86
Mfcm90ud.dll9.0.30729.496793,69604-Feb-201023:33x64
Mfcm90ud.dll9.0.30729.496780,89605-Feb-201002:15x86
Mfcmifc80u.dll9.0.30729.496713,13606-Feb-201008:14x86
Microsoft.visualc.stlclr.dll9.0.30729.496747,98406-Feb-201008:14x86
Msvcm90.dll9.0.30729.4967245,76004-Feb-201023:33x64
Msvcm90.dll9.0.30729.4967324,09605-Feb-201001:12IA-64
Msvcm90.dll9.0.30729.4967225,28005-Feb-201002:15x86
Msvcm90d.dll9.0.30729.4967333,31204-Feb-201023:33x64
Msvcm90d.dll9.0.30729.4967429,56805-Feb-201001:12IA-64
Msvcm90d.dll9.0.30729.4967312,83205-Feb-201002:15x86
Msvcp90.dll9.0.30729.4967853,32804-Feb-201023:32x64
Msvcp90.dll9.0.30729.49671,466,19205-Feb-201001:12IA-64
Msvcp90.dll9.0.30729.4967569,68005-Feb-201002:14x86
Msvcp90d.dll9.0.30729.49671,120,59204-Feb-201023:32x64
Msvcp90d.dll9.0.30729.49672,515,28005-Feb-201001:12IA-64
Msvcp90d.dll9.0.30729.4967871,76005-Feb-201002:14x86
Msvcr90.dll9.0.30729.4967624,46404-Feb-201023:32x64
Msvcr90.dll9.0.30729.49671,505,61605-Feb-201001:12IA-64
Msvcr90.dll9.0.30729.4967653,13605-Feb-201002:14x86
Msvcr90d.dll9.0.30729.49671,350,99204-Feb-201023:32x64
Msvcr90d.dll9.0.30729.49673,603,79205-Feb-201001:12IA-64
Msvcr90d.dll9.0.30729.49671,178,96005-Feb-201002:14x86
Vcomp90.dll9.0.30729.496756,65604-Feb-201023:32x64
Vcomp90.dll9.0.30729.4967141,64805-Feb-201001:12IA-64
Vcomp90.dll9.0.30729.496751,02405-Feb-201002:14x86
Vcomp90d.dll9.0.30729.4967104,78404-Feb-201023:32x64
Vcomp90d.dll9.0.30729.4967316,24005-Feb-201001:12IA-64
Vcomp90d.dll9.0.30729.496788,40005-Feb-201002:14x86
Vcomp90ui.dll9.0.30729.496710,57606-Feb-201008:14x86
Vcredist_ia64.exe9.0.30729.44834,683,09605-Feb-201016:42IA-64
Vcredist_x64.exe9.0.30729.44835,214,55205-Feb-201017:06x64
Vcredist_x86.exe9.0.30729.44834,478,29605-Feb-201017:34x86

STATUS

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

APPLIES TO
  • Microsoft Visual Studio 2008 Service Pack 1
Keywords: 
kbexpertiseadvanced kbsurveynew kbqfe KB979335
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate