View CString length in debugger 
Author Message
 View CString length in debugger

How can I view the length of a CString in the watch window?  Trying
"stringVar.GetLength()" gives me this message:
    "CXX0052: Error: member function not present"


Mon, 05 Jan 2004 08:31:24 GMT  
 View CString length in debugger
Hi, Issac:

If you are linking with MFC statically, then you stringVar.GetLength()
would work in the watch window.

This is a limitation in the VC de{*filter*}.  Basically you can call a member
function if the class is imported from another dll.
In this case,  if you use mfc as shared libraries, the CString class is
imported from the mfc42(d).dll. That is why you are getting
this error.

Alternatively,  you can use Trace() statements to get the string length but
that requires recompiling.

James



Wed, 07 Jan 2004 04:27:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. View object as string in debugger (like CString)

2. CString Length

3. CString buffer length - how to increase and monitor?

4. CString max length?

5. Maximum length for a CString.

6. Serializing CString without string length

7. CString exceeding length size

8. CString length?

9. CString max length

10. Text length limit of CString

11. Display CString using VS.NET Debugger

12. CString objects in the MSVC debugger

 

 
Powered by phpBB® Forum Software