Files
mirror-processhacker/1.x/trunk/ProcessHacker.Native/Io/FileSystem.cs
T
wj32 4bfc3788f3 * MemoryRegion: don't use GetStructSize unless index is not 0
* MemoryRegion: removed srcOffset parameter from WriteMemory
* MemoryAlloc: added ResizeNew - instead of actually resizing the allocation, this frees and allocates, which is faster
* added some MountManager functions

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@2494 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2009-12-24 10:25:40 +00:00

43 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
using ProcessHacker.Native;
using ProcessHacker.Native.Api;
using ProcessHacker.Native.Objects;
using ProcessHacker.Native.Security;
namespace ProcessHacker.Native.Io
{
public static class FileSystem
{
public const int MaximumReparseDataBufferSize = 16 * 1024;
[StructLayout(LayoutKind.Sequential)]
public struct ReparseDataBuffer
{
public static readonly int GenericDataBuffer =
Marshal.OffsetOf(typeof(ReparseDataBuffer), "SubstituteNameOffset").ToInt32();
public static readonly int MountPointPathBuffer =
Marshal.OffsetOf(typeof(ReparseDataBuffer), "Flags").ToInt32();
public static readonly int SymbolicLinkPathBuffer =
Marshal.OffsetOf(typeof(ReparseDataBuffer), "PathBuffer").ToInt32();
public uint ReparseTag;
public ushort ReparseDataLength;
public ushort Reserved;
public ushort SubstituteNameOffset; // GenericReparseBuffer.DataBuffer
public ushort SubstituteNameLength;
public ushort PrintNameOffset;
public ushort PrintNameLength;
public int Flags; // MountPointReparseBuffer.PathBuffer
public byte PathBuffer; // SymbolicLinkReparseBuffer.PathBuffer
}
public static readonly int FsCtlSetReparsePoint = Win32.CtlCode(DeviceType.FileSystem, 41, DeviceControlMethod.Buffered, DeviceControlAccess.Special);
public static readonly int FsCtlGetReparsePoint = Win32.CtlCode(DeviceType.FileSystem, 42, DeviceControlMethod.Buffered, DeviceControlAccess.Any);
public static readonly int FsCtlDeleteReparsePoint = Win32.CtlCode(DeviceType.FileSystem, 43, DeviceControlMethod.Buffered, DeviceControlAccess.Special);
}
}