怎么实现?请高手给点思路,要是有代码更好,多谢

解决方案 »

  1.   

    还用代码吗?
    solution窗口,工程下的“引用”右键,选“添加引用”。弹出窗口中选“浏览”,文件夹中选择dll。完成
      

  2.   

    Assembly assembly = Assembly.LoadFile(path);
                            //得到Assembly中的所有类型
                            Type[] types = assembly.GetTypes(); IPlugin plugin = (IPlugin)Activator.CreateInstance(type);//创建插件实例
      

  3.   

    using System;
    using System.Runtime.InteropServices;  //DllImport namespace
    public partial class _Default : System.Web.UI.Page 
    {
        [DllImport(@"E:\Mine\Dllimport\Solution1\web\Bin\aq82.tong.dll")]
        public static extern String ReadDiskID(bool HDD, bool NIC, bool CPU, bool BIOS, string sRegistrationCode);
        [DllImport(@"E:\Mine\Dllimport\Solution1\web\Bin\aq82.tong.dll")]
        public static extern String ReadDiskIDWithapp(string AppID, bool HDD, bool NIC, bool CPU, bool BIOS, string sRegistrationCode);    protected void Page_Load(object sender, EventArgs e)
        {
            string abc=ReadDiskID(true, false, true, false, "*aq82.com*");
            Response.Write(abc);
        }
    }
      

  4.   


    c#写的dll也可以这么用吗?一般这种用法只在使用非托管dll时使用啊,例如系统API
      

  5.   

    是指要反射么?反射一个dll里内容