IAccessPrivateBuffer

This interface is implemented mostly on objects that represent a memory stream. This includes those returned by SHCreateMemStream, SHOpenRegStream, SHOpenRegStream2, etc. It's sole purpose is to access the memory that is backing the objects, presumably so that it can be manipulated independently of the object's actual methods.

In the case of Shlwapi's implementation, after calling GetPrivateBuffer the memory is still owned by the object. Do not attempt to free it.
Accessing the buffer like this does not stop the parent object from invalidating it if, for example, more data is written to a memory stream causing the backing memory buffer to be reallocated.