是用createobject的方式引用的吗?

解决方案 »

  1.   

    1、mfc dll
    extern "C" long __stdcall test(long lvar)
    {
    return lvar;
    }def文件中
    EXPORTS
       test=test @01
    2、vb中
    private Declare Function test Lib ".\testdll.dll" (ByVal j As Long) As Longsub test()
        msgbox test(10)  '就在这里出错
    end sub
      

  2.   

    1、mfc dll
    extern "C" long __stdcall test(long lvar)
    {
    return lvar;
    }def文件中
    EXPORTS
       test=test @01
    2、vb中
    private Declare Function test Lib ".\testdll.dll" (ByVal j As Long) As Longsub testdll()
        msgbox test(10)  '就在这里出错
    end sub
      

  3.   

    用以上的代码,Dependency Walker能够看到test的自定义函数,但还是出错.
      

  4.   

    错误是:提示找不到dll的入口
    问题已经解决,不使用mfc dll用win32 dll 就行了。