Open writer with openToMemory(), then close it with closeAndGetStream() which will return the stream pointer. After that you have to do fclose() on that pointer.
Open writer with openToMemory(), then close it with closeAndGetStream() which will return the stream pointer. After that you have to do fclose() on that pointer.