示例#1
0
        public SafeHandle CreateFileFromDevice(string pathName)
        {
            string result = GetResultOrThrow(m_CreateFileFromDevice, pathName);

            if (result == null)
            {
                return(null);
            }

            SafeTestHandle handle = new SafeTestHandle(new IntPtr(1))
            {
                PathName = pathName
            };

            return(handle);
        }
示例#2
0
        public DiskExtent[] GetDiskExtents(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_Extents, handle.PathName));
        }
示例#3
0
        public PartitionInformation GetPartitionInfo(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_PartitionInfo, handle.PathName));
        }
示例#4
0
        public bool IsReadOnly(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_ReadOnly, handle.PathName));
        }
示例#5
0
        public BoolUnknown IncursSeekPenalty(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_SeekPenalty, handle.PathName));
        }
示例#6
0
        public StorageAccessAlignment GetAlignment(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_Alignment, handle.PathName));
        }
示例#7
0
        public DiskGeometry GetDiskGeometry(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_Geometry, handle.PathName));
        }
示例#8
0
        public StorageDeviceNumber GetDeviceNumberEx(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_DeviceNumberEx, handle.PathName));
        }
示例#9
0
        public bool GetMediaPresent(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_MediaPresent, handle.PathName));
        }
示例#10
0
        public VolumeDeviceQuery GetStorageDeviceProperty(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_StorageProperties, handle.PathName));
        }
示例#11
0
        public bool RefreshVolume(SafeHandle hDevice)
        {
            SafeTestHandle handle = CheckHandle(hDevice);

            return(GetResultOrThrow(m_DiskUpdateProperties, handle.PathName));
        }