Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than Structures, prefix the name with the module name and a period.
ReparseTag
Reparse point tag. Must be a Microsoft reparse point tag.
ReparseDataLength
Size, in bytes, of the data after the Reserved member. This can be calculated by:
(4 * sizeof(ushort)) + SubstituteNameLength + PrintNameLength +
(namesAreNullTerminated ? 2 * sizeof(char) : 0);
Reserved
Reserved; do not use.
SubstituteNameOffset
Offset, in bytes, of the substitute name string in the PathBuffer array.
SubstituteNameLength
Length, in bytes, of the substitute name string. If this string is null-terminated,
SubstituteNameLength does not include space for the null character.
PrintNameOffset
Offset, in bytes, of the print name string in the PathBuffer array.
PrintNameLength
Length, in bytes, of the print name string. If this string is null-terminated,
PrintNameLength does not include space for the null character.
PathBuffer
A buffer containing the unicode-encoded path string. The path string contains
the substitute name string and print name string.
Notes:
The maximum size of this structure is 16KiB.
The total size of the structure can be calculated by:
// Make sure we have a folder, change to suite yourt needs!
String rppFolder = args[1];
if (Directory.Exists(rppFolder))
Directory.Delete(rppFolder, true);
Directory.CreateDirectory(rppFolder);
// Open the file to with correct access to write the Reparse Point
IntPtr hMP = CreateFile(rppFolder
, EFileAccess.GenericWrite
, EFileShare.Read | EFileShare.Write | EFileShare.Delete
, IntPtr.Zero
, ECreationDisposition.OpenExisting
, EFileAttributes.BackupSemantics | EFileAttributes.OpenReparsePoint
, IntPtr.Zero);
// The size of the data we are passing into the FSCTL.
int dataSize = rdb.ReparseDataLength + ReparseHeaderSize;
IntPtr pMem = Marshal.AllocHGlobal(Marshal.SizeOf(rdb));
try
// Set the reparse point.
int bytesReturned = 0;
bool rc = DeviceIoControl(hMP
, EIOControlCode.FsctlSetReparsePoint
, rdb
, dataSize
, IntPtr.Zero
, 0
, ref bytesReturned
, IntPtr.Zero);
if (!rc)
{
Marshal.StructureToPtr(rdb, pMem, false);
// Set the reparse point.
int bytesReturned = 0;
bool rc = DeviceIoControl(hMP
, EIOControlCode.FsctlSetReparsePoint
//, rdb
, pMem
, dataSize
, IntPtr.Zero
, 0
, ref bytesReturned
, IntPtr.Zero);
if (!rc)
{
int err = Marshal.GetLastWin32Error();
Console.WriteLine("Failed to set reparse point: 0x{0:X}", err);
}
int err = Marshal.GetLastWin32Error();
}
finally
{
Marshal.FreeHGlobal(pMem);
}
}
}
}
}
Please edit this page!
Do you have...
helpful tips?
corrections to the existing content?
alternate definitions?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.