예제 #1
0
        private static Int32 GetReparsePointByName(
            IntPtr FileSystem,
            IntPtr Context,
            String FileName,
            Boolean IsDirectory,
            IntPtr Buffer,
            IntPtr PSize)
        {
            FileSystemBase self = (FileSystemBase)GCHandle.FromIntPtr(Context).Target;

            try
            {
                Byte[] ReparseData;
                Int32  Result;
                ReparseData = null;
                Result      = self.GetReparsePointByName(
                    FileName,
                    IsDirectory,
                    ref ReparseData);
                if (0 <= Result)
                {
                    Result = Api.CopyReparsePoint(ReparseData, Buffer, PSize);
                }
                return(Result);
            }
            catch (Exception ex)
            {
                return(self.ExceptionHandler(ex));
            }
        }
예제 #2
0
 private static Int32 ExceptionHandler(
     FileSystemBase FileSystem,
     Exception ex)
 {
     try
     {
         return(FileSystem.ExceptionHandler(ex));
     }
     catch
     {
         return(unchecked ((Int32)0xc00000e9) /*STATUS_UNEXPECTED_IO_ERROR*/);
     }
 }
예제 #3
0
        private static Int32 GetReparsePointByName(
            IntPtr FileSystem,
            IntPtr Context,
            String FileName,
            Boolean IsDirectory,
            IntPtr Buffer,
            ref UIntPtr Size)
        {
            FileSystemBase self = (FileSystemBase)GCHandle.FromIntPtr(Context).Target;

            try
            {
                return(self.GetReparsePointByName(
                           FileName,
                           IsDirectory,
                           Buffer,
                           ref Size));
            }
            catch (Exception ex)
            {
                return(self.ExceptionHandler(ex));
            }
        }