Click here to Skip to main content
16,007,126 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBYTE to CString Pin
stevenson9-Oct-02 15:11
stevenson9-Oct-02 15:11 
GeneralRe: BYTE to CString Pin
Chris Losinger9-Oct-02 15:43
professionalChris Losinger9-Oct-02 15:43 
GeneralCStrings in MFC/ATL/Whatever 7.0 Pin
me9-Oct-02 15:01
me9-Oct-02 15:01 
GeneralRe: CStrings in MFC/ATL/Whatever 7.0 Pin
Chris Losinger9-Oct-02 15:44
professionalChris Losinger9-Oct-02 15:44 
GeneralRe: CStrings in MFC/ATL/Whatever 7.0 Pin
me9-Oct-02 15:57
me9-Oct-02 15:57 
GeneralRe: CStrings in MFC/ATL/Whatever 7.0 Pin
Joe Woodbury9-Oct-02 20:04
professionalJoe Woodbury9-Oct-02 20:04 
GeneralRe: CStrings in MFC/ATL/Whatever 7.0 Pin
me9-Oct-02 21:22
me9-Oct-02 21:22 
GeneralRe: CStrings in MFC/ATL/Whatever 7.0 Pin
Joe Woodbury9-Oct-02 22:01
professionalJoe Woodbury9-Oct-02 22:01 
These kinds of bugs are among the most aggravating.

CString changed drastically between 6 and 7. The new CString is a typedef of CStringT which is derived from CSimpleStringT. Unfortunately, while I knew the old CString like the back of my hand, I am just getting acquainted with the new.

One thing to check for is a buffer overrun. The old CString used a fixed memory allocator pool which meant that depending on the size of the string, you could do a GetBuffer() then copy more data to the string than you had requested be allocated. Of course, this would usually be caught in debug mode, but it's worth a look.

(That your problem is with the memory points me in this general direction.)

My only other suggestion is to write a test program and break out chunks of code and test them in it. (And if my experience is normal, the test program will probably grow into a hideous monster, but it may help.)

And nothing beats just stepping through the code, line by line.

GeneralMultidimensional array Pin
Todd Smith9-Oct-02 12:52
Todd Smith9-Oct-02 12:52 
GeneralRe: Multidimensional array Pin
Jörgen Sigvardsson9-Oct-02 13:50
Jörgen Sigvardsson9-Oct-02 13:50 
GeneralRe: Multidimensional array Pin
Michael Dunn9-Oct-02 13:51
sitebuilderMichael Dunn9-Oct-02 13:51 
GeneralTemplate Q Pin
Todd Smith9-Oct-02 12:24
Todd Smith9-Oct-02 12:24 
GeneralRe: Template Q Pin
Paul M Watt9-Oct-02 12:58
mentorPaul M Watt9-Oct-02 12:58 
GeneralRe: Template Q Pin
Jörgen Sigvardsson9-Oct-02 13:56
Jörgen Sigvardsson9-Oct-02 13:56 
Generalaccesing the registry Pin
Loin Chiviki9-Oct-02 11:15
sussLoin Chiviki9-Oct-02 11:15 
GeneralRe: accesing the registry Pin
Ranjan Banerji9-Oct-02 11:21
Ranjan Banerji9-Oct-02 11:21 
GeneralRe: accesing the registry Pin
Carlos Antollini9-Oct-02 11:43
Carlos Antollini9-Oct-02 11:43 
GeneralThis is wierd regarding MSFlexgrid licensing... Pin
JohnnyG9-Oct-02 11:08
JohnnyG9-Oct-02 11:08 
GeneralBoehm framework Pin
S van Leent9-Oct-02 11:05
S van Leent9-Oct-02 11:05 
GeneralRe: Boehm framework Pin
Joaquín M López Muñoz9-Oct-02 11:26
Joaquín M López Muñoz9-Oct-02 11:26 
GeneralRe: Boehm framework Pin
S van Leent10-Oct-02 10:52
S van Leent10-Oct-02 10:52 
QuestionCreate a process, wait til its finished, then continue? Pin
dazinith9-Oct-02 11:04
dazinith9-Oct-02 11:04 
AnswerRe: Create a process, wait til its finished, then continue? Pin
Ranjan Banerji9-Oct-02 11:07
Ranjan Banerji9-Oct-02 11:07 
Generalparsing a text file and store into SQL Server Pin
vinnieqtran9-Oct-02 9:45
vinnieqtran9-Oct-02 9:45 
GeneralRe: parsing a text file and store into SQL Server Pin
Daniel Turini9-Oct-02 9:56
Daniel Turini9-Oct-02 9:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.