*.dll文件,我直接添加引用,然后using.*,调用不了,应该怎么调用

解决方案 »

  1.   

    [DllImport("LicenseVerify.dll")]private static extern int VerifyLicense(string szProductType, string szProductVersion, StringBuilder szResult, int nMaxBufferSize);//函数声明         private void button1_Click(object sender, EventArgs e)        {            //ShowLicenseInfo();            string szProductType = "呃呃呃";            string szProductVersion = "嗖嗖嗖。";            StringBuilder szResult = new StringBuilder(1025);            VerifyLicense(szProductType, szProductVersion, szResult, 1024);        }试试看看
      

  2.   


    首先你的方法没有问题,using的时候是否正常,怎么调用不了?
      

  3.   

    using 的时候好像不正常,using的时候不出。。我去试试4楼的方法
      

  4.   

    如果都是非托管代码,在NET平台上就如同一语言开发的动态库使用,没有特殊的东西!如果使用VB6开发的,那就涉及到互操作