.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL's wiki page for SDL_RWFromMem: .\" https://wiki.libsdl.org/SDL_RWFromMem .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision SDL-prerelease-3.0.0-3508-g7c089f4e5 .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20SDL_RWFromMem .\" SDL can be found at https://libsdl.org/ .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH SDL_RWFromMem 3 "SDL 3.0.0" "SDL" "SDL3 FUNCTIONS" .SH NAME SDL_RWFromMem \- Use this function to prepare a read-write memory buffer for use with .BR SDL_RWops \[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3/SDL.h\(dq .PP .BI "SDL_RWops* SDL_RWFromMem(void *mem, size_t size); .fi .SH DESCRIPTION This function sets up an .BR SDL_RWops struct based on a memory area of a certain size, for both read and write access\[char46] This memory buffer is not copied by the RWops; the pointer you provide must remain valid until you close the stream\[char46] Closing the stream will not free the original buffer\[char46] If you need to make sure the RWops never writes to the memory buffer, you should use .BR SDL_RWFromConstMem () with a read-only buffer of memory instead\[char46] .SH FUNCTION PARAMETERS .TP .I mem a pointer to a buffer to feed an .BR SDL_RWops stream .TP .I size the buffer size, in bytes .SH RETURN VALUE Returns a pointer to a new .BR SDL_RWops structure, or NULL if it fails; call .BR SDL_GetError () for more information\[char46] .SH AVAILABILITY This function is available since SDL 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR SDL_RWclose (3), .BR SDL_RWFromConstMem (3), .BR SDL_RWFromFile (3), .BR SDL_RWFromMem (3), .BR SDL_RWread (3), .BR SDL_RWseek (3), .BR SDL_RWtell (3), .BR SDL_RWwrite (3)