示例#1
0
        private static Int32 GetReparsePoint(
            IntPtr FileSystemPtr,
            ref FullContext FullContext,
            String FileName,
            IntPtr Buffer,
            IntPtr PSize)
        {
            FileSystemBase FileSystem = (FileSystemBase)Api.GetUserContext(FileSystemPtr);

            try
            {
                Byte[] ReparseData;
                Object FileNode, FileDesc;
                Int32  Result;
                Api.GetFullContext(ref FullContext, out FileNode, out FileDesc);
                ReparseData = null;
                Result      = FileSystem.GetReparsePoint(
                    FileNode,
                    FileDesc,
                    FileName,
                    ref ReparseData);
                if (0 <= Result)
                {
                    Result = Api.CopyReparsePoint(ReparseData, Buffer, PSize);
                }
                return(Result);
            }
            catch (Exception ex)
            {
                return(ExceptionHandler(FileSystem, ex));
            }
        }
示例#2
0
        private static Int32 GetReparsePoint(
            IntPtr FileSystemPtr,
            ref FullContext FullContext,
            String FileName,
            IntPtr Buffer,
            out UIntPtr PSize)
        {
            FileSystemBase FileSystem = (FileSystemBase)Api.GetUserContext(FileSystemPtr);

            try
            {
                Object FileNode, FileDesc;
                Api.GetFullContext(ref FullContext, out FileNode, out FileDesc);
                return(FileSystem.GetReparsePoint(
                           FileNode,
                           FileDesc,
                           FileName,
                           Buffer,
                           out PSize));
            }
            catch (Exception ex)
            {
                PSize = default(UIntPtr);
                return(ExceptionHandler(FileSystem, ex));
            }
        }