title: Extending Visual Studio 2003 C++ debugger using autoexp.dat and DLL
body: <p>I know a solution would be to use VS 2005 or 2008, but that's not an option at the moment. I am supposed to write an extension to the VS 2003 C++ debugger to improve the way it displays data in the watch window. The main reason I am using a DLL rather than just the basic autoexp.dat functionality is that I want to be able to display things conditionally. I.e. I want to be able to say "If the name member is not an empty string, display name, otherwise display [some other member]"</p>
  
  <p>I can't find much documentation online, either from MS or other people who have used (or tried to use) this part of VS 2003. The MSDN EEaddin sample was an ok start, but very basic and didn't really help me get very far. </p>
  
  <p>So far I am just learning my way around it, learning how to display various types without knowing exactly what kind of types I will be working on in the end. </p>
  
  <p>I have managed (through much trial and error) to get the DLL to display pointer-to-basic-type members, string members, pointer-to-user-defined-type members and auto_ptr&#60;int&#62; members. At the moment I am having trouble displaying vector members and auto_ptr&#60;string&#62; members.</p>
  
  <p>(I found a page that says auto_ptrs are deprecated, but I need to be able to display them properly as they are used in the code my extension is meant for.)</p>
  
  <p>My question is: has anyone done this kind of thing and do you have or know of some helpful documentation on the subject? </p>
  
  <p>Thanks!</p>
  
  <p>[update:]
  I've worked out why I'm having trouble with the auto_ptr&#60;string&#62; class members. It's because of the way the string class is implemented. It has a char[16] buffer where it stores the data for short strings, and a char* pointer if the string is longer than (15 characters+termination character). I'm not sure whether it's possible and worth trying to hack into that to display longer strings (I can display strings that short enough to be saved in the char[16] buffer)</p>