Example #1
0
 internal MountPoint(SafeBufferGeneric buffer, MOUNTMGR_MOUNT_POINT mp)
 {
     SymbolicLinkName = buffer.ReadUnicodeString((ulong)mp.SymbolicLinkNameOffset, mp.SymbolicLinkNameLength / 2);
     if (SymbolicLinkName.StartsWith(@"\DosDevices", StringComparison.OrdinalIgnoreCase))
     {
         SymbolicLinkName = @"\??" + SymbolicLinkName.Substring(11);
     }
     UniqueId   = buffer.ReadBytes((ulong)mp.UniqueIdOffset, mp.UniqueIdLength);
     DeviceName = buffer.ReadUnicodeString((ulong)mp.DeviceNameOffset, mp.DeviceNameLength / 2);
 }
Example #2
0
 private static string ReadString(SafeBufferGeneric buffer, int offset, int length)
 {
     if (offset <= 0)
     {
         return(string.Empty);
     }
     return(buffer.ReadUnicodeString((ulong)offset, length / 2));
 }