Exemplo n.º 1
0
        public static CHS Create(CHSStruct st)
        {
            CHS chs = new CHS();

            chs.Cylinder    = st.m_Cylinder;
            chs.HeadTrack   = st.m_Head_Track;
            chs.TrackSector = st.m_Track_Sector;
            return(chs);
        }
Exemplo n.º 2
0
        public LocalHDD(PhysicsDeviceStruct st)
        {
            DeviceID        = st.ObjectID;
            Lable           = st.Lable;
            DevName         = st.DevName;
            Size            = (long)st.DevSize;
            DevCHS          = CHS.Create(st.DevCHS);
            DevMomd         = st.DevMomd;
            DevType         = st.DevType;
            SectorSize      = st.SectorSize;
            Buffer          = st.Buffer;
            Partition       = st.Partiton;
            Arch            = st.Arch;
            DevRW           = st.DevRW;
            DevState        = st.DevState;
            InternalVolumes = new List <LocalVolume>();

            if (st.Handle != IntPtr.Zero)
            {
                Handle = new SafeFileHandle(st.Handle, false);
            }
        }