| private void button1_Click(object sender, EventArgs e) { WFR2025V.WfrCom wfrCom = null; try { wfrCom = new WFR2025V.WfrCom(); wfrCom.Open(@"d:\test\sample.wfr"); wfrCom.Import("#1", 0, @"d:\test\sample.csv"); wfrCom.PdfOut(@"c:\out\sample.pdf"); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { if (wfrCom != null) { System.Runtime.InteropServices.Marshal.ReleaseComObject(wfrCom); wfrCom = null; } } } |