~~Title: VFS_WriteFile~~ VFS_WriteFile && BOOL && The function must return **TRUE** if data was successfully written to the file, or **FALSE** on failure or end-of-file. You should set an appropriate error code on failure that Opus can retrieve via [[vfs_getlasterror|VFS_GetLastError]] - the error code should be set to 0 for an end-of-file condition. && hVFSData && HANDLE && [in] The handle to the namespace instance data && lpFuncData && LPVFSFUNCDATA && [in] unused && hFile && HANDLE && [in] File handle as returned by your [[vfs_createfile|VFS_CreateFile]] function && lpData && LPVOID && [in] Pointer to a buffer containing the data to write && dwSize && DWORD && [in] Size of the data in bytes && fFlush && BOOL && [in] Set to **TRUE** if you should flush any write buffers to disk after completing this write operation && lpdwWriteSize && LPDWORD && [out] Pointer to a DWORD to receive the amount of data written successfully The **VFS_WriteFile** function is called to write data to an open file. You must write as much data as possible up to and including //dwSize// bytes to your file from the buffer provided. The amount of data actually written must be placed in //lpdwWriteSize//.