Returns a pointer to the internal character buffer for the CSimpleStringT object.
Call this method to return the buffer contents of the CSimpleStringT object. The returned PXSTR is not a constant and therefore allows direct modification of CSimpleStringT contents.
If you use the pointer returned by GetBuffer to change the string contents, you must call ReleaseBuffer before you use any other CSimpleStringT member methods.
The address returned by GetBuffer may not be valid after the call to ReleaseBuffer because additional CSimpleStringT operations can cause the CSimpleStringT buffer to be reallocated. The buffer is not reallocated if you do not change the length of the CSimpleStringT.
The buffer memory is automatically freed when the CSimpleStringT object is destroyed.
If you keep track of the string length yourself, you should not append the terminating null character. However, you must specify the final string length when you release the buffer with ReleaseBuffer. If you do append a terminating null character, you should pass –1 (the default) for the length. ReleaseBuffer then determines the buffer length.
If there is insufficient memory to satisfy the GetBuffer request, this method throws a CMemoryException*.