Beispiel #1
0
        private static Int32 Write(
            IntPtr FileSystemPtr,
            ref FullContext FullContext,
            IntPtr Buffer,
            UInt64 Offset,
            UInt32 Length,
            Boolean WriteToEndOfFile,
            Boolean ConstrainedIo,
            out UInt32 PBytesTransferred,
            out FileInfo FileInfo)
        {
            FileSystemBase FileSystem = (FileSystemBase)Api.GetUserContext(FileSystemPtr);

            try
            {
                Object FileNode, FileDesc;
                Api.GetFullContext(ref FullContext, out FileNode, out FileDesc);
                return(FileSystem.Write(
                           FileNode,
                           FileDesc,
                           Buffer,
                           Offset,
                           Length,
                           WriteToEndOfFile,
                           ConstrainedIo,
                           out PBytesTransferred,
                           out FileInfo));
            }
            catch (Exception ex)
            {
                PBytesTransferred = default(UInt32);
                FileInfo          = default(FileInfo);
                return(ExceptionHandler(FileSystem, ex));
            }
        }