用add reference 添加引用,再用using 你得namespace

解决方案 »

  1.   

    不能向2000下regsvr32注册?死微软也提供向下兼容!
      

  2.   

    .NET Dll根本不用注册。若要用Com调用,.NET里有一个libexp.exe(大概是)的转换工具,将.net dll包装成com接口。
    若要.net调用直接用csc /r:***.dll即可
      

  3.   

    using System;
    using System.Runtime.InteropServices; 
    class Test
    {
    [DllImport("User32.dll")]   ///引用dll,你可以看看
    public static extern int MessageBox(int h,string m,string c,int type);
    public static int Main()
    {
    string message;
    Console.WriteLine("enter the message:");
    message=Console.ReadLine();
    return MessageBox(0,message,"系统提示",0);
    }
    }
      

  4.   

    不可以在2000 server(没有装.net框架)下用吗?