예제 #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));
        }