dll是Com组件吗?不是  则不可以

解决方案 »

  1.   

    那api函数不是com,同样可以调用呀
      

  2.   

    using System;
    using System.Runtime.InteropServices;class PlatformInvokeTest
    {
        [DllImport("FileOperDLL.dll", EntryPoint="ImportFile")]
        public static extern void ImportFile(string c);    public static void Main() 
        {
            ImportFile("test.txt");
        }
    }好象不需要那个下划线
      

  3.   

    EntryPoint="_ImportFile"??!!
    进入点的问题吧?!