i think u must declare dll as __stdcall ( standed c )such asPublic Declare Sub MyFunc Lib "MyVCDLL" ( ByVal a as long )MyFunc 10&    __declspec( dllexport )  void __stdcall MyFunc( int a )
    {
    }

解决方案 »

  1.   

    jennyvenus:
         Thank you for your reply!
    '     MyFunc 10&
    '
    '    __declspec( dllexport )  void __stdcall MyFunc( int a )
    '    {
    '    }     what's mean? write in DLL source or Define a function in VB??
      

  2.   

    Public Declare Sub MyFunc Lib "MyVCDLL" ( ByVal a as long )this is vb dll declare
    =============================================================
    MyFunc 10&this is vb call dll
    ===============================================================    __declspec( dllexport )  void __stdcall MyFunc( int a )
        {
        }
    this is vc implement, it work good under my env.
      

  3.   

    this Dll is create by others!now I can change the dll!can i use this dll in my VB application???Help!!!!
      

  4.   

    sorry, i don't know, i suggest u try loadlibrary.