473,408 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Issues with GetBuffer methods in VS2005

79
I'm having issues with some code in VS2005. The code was previously compiled in VS 6 and it works fine, but when I moved to VS2005, I started getting problem. I get a runtime error when I attempt to open a certain file after it has been modified, and the line that causes this error is this:

fread(m_SEI[i].E[j].L.GetBuffer(StringLen), StringLen, 1, InStream);

Disregard the weird names (I am required to modify them).

m_SEI[i].E[j].L is a CString
StringLen is type short
and GetBuffer() is the CSimpleStringT method


Like I said, it only happens after the file has been modified, which means that the first time I run the program everything works fine, then if I make a change, it crashes.

I'm thinking that there has been some change in the way GetBuffer works in VS 2005 but I really don't know. All this code worked fine when compiled with VS 6. Was there anything changed?

Thanks
Jul 18 '07 #1
1 1149
weaknessforcats
9,208 Expert Mod 8TB
You are using all of the TCHAR conversion macros???

CSimpleStringT is ATL. Lotta fixes in ATL. Are you using thee same ATL templates??

I know that VC 6.0 had many problems with templates. Lotta template fixes in Visual Sutdio.NET 2005 so I am not surprised that something that didn't crash in VC 6.0 does in VC.NET 2005. Probably, whatever it is, should have crashed from the beginning.

Too much missing detail for a judgemeent.
Jul 18 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Sarah Haskins | last post by:
I have a few questions about this problem I'm having involving XML, DTD, and XSL. I'm working with this DTD which defines a stylesheet, as such... <?xml version="1.0" encoding="UTF-8"?>...
16
by: clintonG | last post by:
I haven't installed VS2005 B2 yet. My main concern is installing VS2005 B2 on the XP Pro machine where VSN2003 already exists. Am I asking for trouble? Your comments... <%= Clinton Gallagher
2
by: Brian Mitchell | last post by:
Hello, I am using a MemoryStream to serialize a class but when I use the GetBuffer method it returns exactly 1024 bytes even though the stream is only 675 bytes. If I look at the...
3
by: Michael Hoehne | last post by:
Hi, I'm currently facing a problem with a mixed environment using .NET 1.1 and ..NET 2.0 web services. We have a client application (the "client", system 1) running on .NET 2.0/WinXP, calling...
3
by: Ben Kim | last post by:
Hello all, We have several minor issues on two different computers with the VS2005 Pro Edition environment: 1. Getting Started... on the start page is showing SQL 2005 information and not VS...
1
by: amansura | last post by:
Hi, I have a COM DLL written in C++ and a C# console application written in VS2003 that calls the methods written in DLL. I "Add Reference" of the DLL to the C# project and then i am able to call...
3
by: nzmike | last post by:
Hi, Hoping someone out there can help me... I just built a new Vista Home Premium 64 PC. So far everything has gone well so this morning I decided to install Visual Studio 2005 Professional....
12
by: sas | last post by:
hi, i need that because the path functions for windows, like PathAppend and PathRemoveFileExt accept a writable zero terminated char*, but i didn't find that for std::string, with CString, i...
3
by: eschneider | last post by:
Just some common issues with WS: Using custom objects: When objects change, seems you are always fixing some issue. Update references, which sometimes does not work. Deployment: Weird errors...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.