Sets the string of a CSimpleStringT object.
Copy a string into the CSimpleStringT object. SetString overwrites the older string data in the buffer.
Both versions of SetString check whether pszSrc is a null pointer, and if it is, throw an E_INVALIDARG error.
The one-parameter version of SetString expects pszSrc to point to a null-terminated string.
The two-parameter version of SetString also expects pszSrc to be a null-terminated string. It uses nLength as the string length unless it encounters a null terminator first.
The two-parameter version of SetString also checks whether pszSrc points to a location in the current buffer in CSimpleStringT. In this special case, SetString uses a memory copy function that does not overwrite the string data as it copies the string data back to its buffer.