We are using the CString class throughout most of our code. However sometimes we need to convert to a char *. at the moment we have been doing this using variable.GetBuffer(
when you call the getbuffer function it allocates memory for you. when you have done with it, you need to call releasebuffer to deallocate it