/// <summary> /// Retrieves the specified feature page from the device (via GET_CONFIGURATION). /// </summary> /// <param name="requestedFeature"> /// Feature page to retrieve. For possible values, see the /// FeaturePageType enumeration type. /// </param> /// <param name="currentFeatureOnly"> /// Set to True to retrieve the feature page only when it is the current /// feature page. Otherwise, False to retrieve the feature page regardless of it being the current feature /// page. /// </param> /// <returns> /// Data buffer that contains the feature page. For details of the contents of the /// data buffer, see the GET CONFIGURATION command in the latest revision of the MMC specification at /// ftp://ftp.t10.org/t10/drafts/mmc5/. /// This method removes header information and other non-feature data before filling and sending this buffer. /// </returns> Byte[] IDiscRecorder2X.GetFeaturePage(FeaturePageType requestedFeature, bool currentFeatureOnly) { uint byteSize = 0; IntPtr featureDataPtr; IDiscRecorder2Ex recorderEx = (IDiscRecorder2Ex)this; recorderEx.GetFeaturePage(requestedFeature, currentFeatureOnly, out featureDataPtr, ref byteSize); Byte[] featureData = new Byte[byteSize]; Marshal.Copy(featureDataPtr, featureData, 0, (int)byteSize); Marshal.FreeCoTaskMem(featureDataPtr); return(featureData); }
/// <summary> /// Retrieves the specified feature page from the device (via GET_CONFIGURATION). /// </summary> /// <param name="requestedFeature"> /// Feature page to retrieve. For possible values, see the /// FeaturePageType enumeration type. /// </param> /// <param name="currentFeatureOnly"> /// Set to True to retrieve the feature page only when it is the current /// feature page. Otherwise, False to retrieve the feature page regardless of it being the current feature /// page. /// </param> /// <returns> /// Data buffer that contains the feature page. For details of the contents of the /// data buffer, see the GET CONFIGURATION command in the latest revision of the MMC specification at /// ftp://ftp.t10.org/t10/drafts/mmc5/. /// This method removes header information and other non-feature data before filling and sending this buffer. /// </returns> Byte[] IDiscRecorder2X.GetFeaturePage(FeaturePageType requestedFeature, bool currentFeatureOnly) { uint byteSize = 0; IntPtr featureDataPtr; IDiscRecorder2Ex recorderEx = (IDiscRecorder2Ex)this; recorderEx.GetFeaturePage(requestedFeature, currentFeatureOnly, out featureDataPtr, ref byteSize); Byte[] featureData = new Byte[byteSize]; Marshal.Copy(featureDataPtr, featureData, 0, (int)byteSize); Marshal.FreeCoTaskMem(featureDataPtr); return featureData; }