因为你调用了一个单独的进程,当你关了.net程序的时候,delphi的还没有被关掉
经常遇到的例子就是,在程序中调用excel的dll,也会出现你所说的这个情况

解决方案 »

  1.   

    aspnet_wp.exe就是web程序执行的三!
      

  2.   

    谢谢大家了。
        主要是 我要怎样才能解决(关闭掉这个单独的进程). 因为在.net里面我用的是非托管方式的调用dll,怎样才能释放掉???
      

  3.   

    在delphi里面我用的是 freelibrary来释放。那么在.net中怎么办?谢谢!
      

  4.   

    MyClient.cs  
    using System; using MyMethods; //这里我们引用刚才定义的名称空间,如果刚才的两个文件我们写在两个不同的名称空间
    class MyClient {     public static void Main(string[] args)      {         if (args.Length != 2)          { Console.WriteLine("Usage: MyClient <num1> <num2>");  return;          }          long num1 = long.Parse(args[0]);           long num2 = long.Parse(args[1]);           SwapClass.Swap(ref num1,ref num2);// 请注意,文件开头的 using 指令使您得以在编译时使用未限定的类名来引用 DLL 方法          Console.WriteLine("The result of swap is num1 = {0} and num2 ={1}",num1, num2);          long maxcd = MaxCDClass.MaxCD(num1,num2);          Console.WriteLine("The MaxCD of {0} and {1} is {2}",num1, num2, maxcd);      }}若要生成可执行文件 MyClient.exe,请使用以下命令行:csc /out:MyClient.exe /reference:MyLibrary.DLL MyClient.cs/out 编译器选项通知编译器输出 EXE 文件并且指定输出文件名 (MyClient.exe)。/reference 编译器选项指定该程序所引用的 DLL 文件。
      

  5.   

    试试用调用EXCEL后的那个方法呢?
      

  6.   

    谢谢  可是动态连接库怎么dispose??? 代码见上面
      

  7.   

    http://www.blogcn.com/user8/flier_lu/blog/2164751.html