hw_CreateVirtualWriteFile -- create a writable virtual file (V9.0)
APTR handle = hw_CreateVirtualWriteFile(STRPTR buf, int bufsize,
                  struct hwTagList *tags);
This function can be used to create a virtual file that can be opened for writing. You have to pass a buffer that will receive the name of the writable virtual file and the size of that buffer in bytes. The buffer size should be at least 1024 bytes.

After hw_CreateVirtualWriteFile() returns, you can pass the file name it has written to buf to hw_FOpen() to open the file for writing. Then you can write to it using hw_FWrite() and other DOS functions. Virtual files will behave exactly as normal files so you will also have to call hw_FClose() when you're done with them.

Finally, you have to free all resources associated to the writable virtual file by calling hw_FreeVirtualWriteFile(). This must be done after closing the virtual file using hw_FClose().

Note that writable virtual files must never be used in your ClosePlugin() function because at that time the handler that controls writable virtual files inside Hollywood will no longer be there.

Designer compatibility

buffer to receive the writable virtual file's name
size of the buffer passed in buf in bytes (must be at least 1024)
reserved for future use, pass NULL for now
handle to the writable virtual file or NULL on error

Show TOC