static void MciClosure(string command, string failure_message, MciCall code) { int ret = mciSendString(command, mci_result, mci_result.Capacity, IntPtr.Zero); if (ret != 0) { mciGetErrorString(ret, mci_error, mci_error.Capacity); throw new LocalDiscException(string.Format("{0} : {1}", failure_message, mci_error.ToString())); } else if (code != null) { code(mci_result.ToString()); } }
static void MciClosure (string command, string failure_message, MciCall code) { int ret = mciSendString (command, mci_result, mci_result.Capacity, IntPtr.Zero); if (ret != 0) { mciGetErrorString (ret, mci_error, mci_error.Capacity); throw new LocalDiscException (string.Format ("{0} : {1}", failure_message, mci_error.ToString ())); } else if (code != null) code (mci_result.ToString ()); }