What you actually want is the equivalent of fmemopen()
on Windows. No such equivalent exists.
You could use a named pipe as a workaround. You should be able to use fopen()
to open the read end of a named pipe. The resource provider then passes the FILE *
to the configuration parser while some other thread writes the resource data into the write end of the named pipe. This should be fine so long as the parser only wants to do sequential reads on the file (as opposed to seeking, which would not work on a pipe).
If you are willing to use Cygwin, it provides fmemopen()
.