public void method_0(IConnection interface19_1, GInterface6 ginterface6_1, WorkProcesser class109_1) { this.interface19_0 = interface19_1; this.ginterface6_0 = ginterface6_1; this.class109_0 = class109_1; this.bool_5 = true; }
private void DetectMedia() { if (this.cboDevice.SelectedIndex == -1) { return; } IDiscRecorder2 tag = (IDiscRecorder2)this.cboDevice.SelectedItem.Tag; MsftFileSystemImage msftFileSystemImageClass = null; GInterface6 msftDiscFormat2DataClass = null; try { try { msftDiscFormat2DataClass = (GInterface6)(new MsftDiscFormat2DataClass()); if (msftDiscFormat2DataClass.IsCurrentMediaSupported(tag)) { msftDiscFormat2DataClass.Recorder = tag; IMAPI_MEDIA_PHYSICAL_TYPE currentPhysicalMediaType = msftDiscFormat2DataClass.CurrentPhysicalMediaType; this.lblMedia.Text = this.cdUtil.GetMediaTypeString(currentPhysicalMediaType); msftFileSystemImageClass = (MsftFileSystemImage)(new MsftFileSystemImageClass()); msftFileSystemImageClass.ChooseImageDefaultsForMediaType(currentPhysicalMediaType); if (!msftDiscFormat2DataClass.MediaHeuristicallyBlank) { msftFileSystemImageClass.MultisessionInterfaces = msftDiscFormat2DataClass.MultisessionInterfaces; msftFileSystemImageClass.ImportFileSystem(); } this._totalDiscSize = 2048L * (long)msftFileSystemImageClass.FreeMediaBlocks; this.btn_BurnDisc.Enabled = true; } else { this.lblMedia.Text = LangCtrl.GetString("lblMedia", "NO MEDIA"); this._totalDiscSize = 0L; return; } } catch (COMException cOMException1) { COMException cOMException = cOMException1; MessageBox.Show(this, cOMException.Message, "Detect Media Error", MessageBoxButtons.OK, MessageBoxIcon.Hand); } } finally { if (msftDiscFormat2DataClass != null) { Marshal.ReleaseComObject(msftDiscFormat2DataClass); } if (msftFileSystemImageClass != null) { Marshal.ReleaseComObject(msftFileSystemImageClass); } } this.UpdateCapacity(); }
public bool DetectMedia(ListItem li, ref Label lbl) { bool flag = false; lbl.Text = string.Empty; MsftFileSystemImage msftFileSystemImage = null; GInterface6 msftDiscFormat2DataClass = null; IDiscRecorder2 tag = (IDiscRecorder2)li.Tag; try { try { msftDiscFormat2DataClass = (GInterface6)(new MsftDiscFormat2DataClass()); if (msftDiscFormat2DataClass.IsCurrentMediaSupported(tag)) { msftDiscFormat2DataClass.Recorder = tag; lbl.Text = this.GetMediaTypeString(msftDiscFormat2DataClass.CurrentPhysicalMediaType); flag = true; } else { lbl.Text = "No Media"; } } catch (COMException cOMException) { } } finally { if (msftDiscFormat2DataClass != null) { Marshal.ReleaseComObject(msftDiscFormat2DataClass); } if (msftFileSystemImage != null) { Marshal.ReleaseComObject(msftFileSystemImage); } } return(flag); }
private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) { IStream stream; MsftDiscRecorder2 msftDiscRecorder2Class = null; GInterface6 gInterface6 = null; try { try { msftDiscRecorder2Class = (MsftDiscRecorder2)(new MsftDiscRecorder2Class()); msftDiscRecorder2Class.InitializeDiscRecorder(((BurnData)e.Argument).uniqueRecorderId); GInterface6 msftDiscFormat2DataClass = (GInterface6)(new MsftDiscFormat2DataClass()); msftDiscFormat2DataClass.Recorder = msftDiscRecorder2Class; msftDiscFormat2DataClass.ClientName = "C3BurnMedia"; msftDiscFormat2DataClass.ForceMediaToBeClosed = this._closeMedia; gInterface6 = msftDiscFormat2DataClass; ((IBurnVerification)gInterface6).BurnVerificationLevel = this._verificationLevel; object[] multisessionInterfaces = null; if (!gInterface6.MediaHeuristicallyBlank) { multisessionInterfaces = gInterface6.MultisessionInterfaces; } if (this.CreateMediaFileSystem(msftDiscRecorder2Class, multisessionInterfaces, out stream)) { gInterface6.Update += new DiscFormat2Data_EventHandler(this.discFormatData_Update); this.backgroundWorker.ReportProgress(0, this._burnData); try { try { gInterface6.Write(stream); e.Result = 0; } catch (COMException cOMException1) { COMException cOMException = cOMException1; e.Result = cOMException.ErrorCode; MessageBox.Show(this, cOMException.Message, "Write failed", MessageBoxButtons.OK, MessageBoxIcon.Hand); } } finally { if (stream != null) { Marshal.FinalReleaseComObject(stream); } } gInterface6.Update -= new DiscFormat2Data_EventHandler(this.discFormatData_Update); this.backgroundWorker.ReportProgress(0, this._burnData); if (this._ejectMedia) { msftDiscRecorder2Class.EjectMedia(); } } else { e.Result = -1; return; } } catch (COMException cOMException3) { COMException cOMException2 = cOMException3; MessageBox.Show(cOMException2.Message); e.Result = cOMException2.ErrorCode; } } finally { if (msftDiscRecorder2Class != null) { Marshal.ReleaseComObject(msftDiscRecorder2Class); } if (gInterface6 != null) { Marshal.ReleaseComObject(gInterface6); } } }
public extern void imethod_6([MarshalAs(UnmanagedType.Interface)][In] GInterface6 pdispPlaylist);