/// <summary> /// Retrieves the supported mode pages for the device. /// </summary> /// <param name="requestType"> /// Type of mode page data to retrieve, for example, /// the current settings or the settings that are write enabled. /// For possible values, see the ModePageRequestType enumeration type. /// </param> /// <returns> /// Data buffer that contains one or more mode page types. /// For possible values, see the ModePageType enumeration type. /// To get the mode page data associated with the mode page type, call the IDiscRecorder2Ex.GetModePage /// method. /// </returns> Byte[] IDiscRecorder2X.GetSupportedModePages(ModePageRequestType requestType) { uint byteSize = 0; IntPtr modePageTypesPtr; IDiscRecorder2Ex recorderEx = (IDiscRecorder2Ex)this; recorderEx.GetSupportedModePages(requestType, out modePageTypesPtr, ref byteSize); Byte[] modePageTypes = new Byte[byteSize]; Marshal.Copy(modePageTypesPtr, modePageTypes, 0, (int)byteSize); Marshal.FreeCoTaskMem(modePageTypesPtr); return(modePageTypes); }
/// <summary> /// Sets the mode page data for the device (via MODE_SELECT10). /// </summary> /// <param name="requestType"> /// Type of mode page data to send. /// For possible values, see the ModePageRequestType enumeration type. /// </param> /// <param name="modePage"> /// Data buffer that contains the mode page data to send to the media. /// Do not include a header; this method generates and prepends a header to the mode page data. /// For details on specifying the fields of the mode page data, see the MODE SELECT (10) command in the /// latest revision of the MMC specification at ftp://ftp.t10.org/t10/drafts/mmc5/. /// </param> void IDiscRecorder2X.SetModePage(ModePageRequestType requestType, Byte[] modePage) { IDiscRecorder2Ex recorderEx = (IDiscRecorder2Ex)this; recorderEx.SetModePage(requestType, modePage, (uint)modePage.Length); }
/// <summary> /// Retrieves the supported mode pages for the device. /// </summary> /// <param name="requestType"> /// Type of mode page data to retrieve, for example, /// the current settings or the settings that are write enabled. /// For possible values, see the ModePageRequestType enumeration type. /// </param> /// <returns> /// Data buffer that contains one or more mode page types. /// For possible values, see the ModePageType enumeration type. /// To get the mode page data associated with the mode page type, call the IDiscRecorder2Ex.GetModePage /// method. /// </returns> Byte[] IDiscRecorder2X.GetSupportedModePages(ModePageRequestType requestType) { uint byteSize = 0; IntPtr modePageTypesPtr; IDiscRecorder2Ex recorderEx = (IDiscRecorder2Ex)this; recorderEx.GetSupportedModePages(requestType, out modePageTypesPtr, ref byteSize); Byte[] modePageTypes = new Byte[byteSize]; Marshal.Copy(modePageTypesPtr, modePageTypes, 0, (int)byteSize); Marshal.FreeCoTaskMem(modePageTypesPtr); return modePageTypes; }