Declare Function EncryptString Lib 库名 (ByVal bstrSrc As String, ByRef pbstrResult As Long) As Long

解决方案 »

  1.   

    注意以下几点:
    1、该函数必须被vc引出。
    2、dll放在正确的位置:system/system32,windows,exe所在的目录
    3、Declare Function EncryptString Lib <[path]"dllname"> (ByVal bstrSrc As String, ByRef pbstrResult As Long) As Long
      

  2.   

    还有啊,就是用VC写的函数要用stdcall类型啊
      

  3.   

    我这样生命之后还是找不到入点,为什么?
    STDMETHODIMP __stdcall CCrypto::
    EncryptString( BSTR bstrSrc, BSTR *pbstrResult )
    {

    }
      

  4.   

    在dll中的函数申明前加上extern "C"
      

  5.   

    extern "C" 我也加了,还是找不到入点。