Esempio n. 1
0
        /// <summary>
        /// Retrieves the track information from the media (via READ_TRACK_INFORMATION).
        /// </summary>
        /// <param name="address">
        /// Address field. The addressType parameter provides additional context for
        /// this parameter.
        /// </param>
        /// <param name="addressType">
        /// Type of address specified in the address parameter, for example,
        /// if this is an LBA address or a track number. For possible values, see the ReadTrackAddressType
        /// enumeration type.
        /// </param>
        /// <returns>
        /// Data buffer that contains the track information.
        /// For details of the contents of the data buffer, see the READ TRACK INFORMATION command in the
        /// latest revision of the MMC specification at ftp://ftp.t10.org/t10/drafts/mmc5/.
        /// </returns>
        Byte[] IDiscRecorder2X.GetTrackInformation(uint address, ReadTrackAddressType addressType)
        {
            uint   byteSize = 0;
            IntPtr trackInformationPtr;

            IDiscRecorder2Ex recorderEx = (IDiscRecorder2Ex)this;

            recorderEx.GetTrackInformation(address, addressType, out trackInformationPtr, ref byteSize);

            Byte[] trackInformation = new Byte[byteSize];

            Marshal.Copy(trackInformationPtr, trackInformation, 0, (int)byteSize);
            Marshal.FreeCoTaskMem(trackInformationPtr);

            return(trackInformation);
        }
Esempio n. 2
0
        /// <summary>
        /// Retrieves the track information from the media (via READ_TRACK_INFORMATION).
        /// </summary>
        /// <param name="address">
        /// Address field. The addressType parameter provides additional context for 
        /// this parameter.
        /// </param>
        /// <param name="addressType">
        /// Type of address specified in the address parameter, for example, 
        /// if this is an LBA address or a track number. For possible values, see the ReadTrackAddressType 
        /// enumeration type.
        /// </param>
        /// <returns>
        /// Data buffer that contains the track information. 
        /// For details of the contents of the data buffer, see the READ TRACK INFORMATION command in the 
        /// latest revision of the MMC specification at ftp://ftp.t10.org/t10/drafts/mmc5/.
        /// </returns>
        Byte[] IDiscRecorder2X.GetTrackInformation(uint address, ReadTrackAddressType addressType)
        {
            uint byteSize = 0;
            IntPtr trackInformationPtr;

            IDiscRecorder2Ex recorderEx = (IDiscRecorder2Ex)this;

            recorderEx.GetTrackInformation(address, addressType, out trackInformationPtr, ref byteSize);

            Byte[] trackInformation = new Byte[byteSize];

            Marshal.Copy(trackInformationPtr, trackInformation, 0, (int)byteSize);
            Marshal.FreeCoTaskMem(trackInformationPtr);

            return trackInformation;
        }