using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace IED_Application
{
   public partial class IED : Form
    {
        //int led=0x278;
       [DllImport("inpout32.dll", EntryPoint = "Out32")]
       public static extern void Output(int adress, int value);
       
  
       public IED()
        {
            InitializeComponent();
        }       private void IED_Load(object sender, EventArgs e)
        {        }
       
       private void output_Click(object sender, EventArgs e)
        {
            
            IED.Output(888, 253);           
        }
    }
}
程序运行到最后一个语句的时候
System.runtime.InterOpServices.SEHException{"外部组件发生异常"}