private void bnCleanUp_Click(object sender, EventArgs e) { // Disable SynchGate1 output: Omit "Gate" parameter // (Not available prior to ALP-4) AlpImport.DevControlEx_SynchGate(m_DevId, 1, true); // Recommendation: always call DevHalt() before DevFree() AlpImport.Result result = AlpImport.DevFree(m_DevId); txResult.Text = "DevFree " + AlpErrorString(result); if (AlpImport.Result.ALP_OK != result) { return; // error -> exit } m_DevId = UInt32.MaxValue; }
// Convert error string private string AlpErrorString(AlpImport.Result result) { return(String.Format("{0}", result)); }
private void bnHalt_Click(object sender, EventArgs e) { AlpImport.Result result = AlpImport.ProjHalt(m_DevId); txResult.Text = "ProjHalt " + AlpErrorString(result); }