private static Int32 Create( IntPtr FileSystemPtr, String FileName, UInt32 CreateOptions, UInt32 GrantedAccess, UInt32 FileAttributes, IntPtr SecurityDescriptor, UInt64 AllocationSize, ref FullContext FullContext, ref OpenFileInfo OpenFileInfo) { FileSystemBase FileSystem = (FileSystemBase)Api.GetUserContext(FileSystemPtr); try { Object FileNode, FileDesc; String NormalizedName; Int32 Result; Result = FileSystem.Create( FileName, CreateOptions, GrantedAccess, FileAttributes, Api.MakeSecurityDescriptor(SecurityDescriptor), AllocationSize, out FileNode, out FileDesc, out OpenFileInfo.FileInfo, out NormalizedName); if (0 <= Result) { if (null != NormalizedName) { OpenFileInfo.SetNormalizedName(NormalizedName); } Api.SetFullContext(ref FullContext, FileNode, FileDesc); } return(Result); } catch (Exception ex) { return(ExceptionHandler(FileSystem, ex)); } }