我的程序调用vc写成的ATPSystem.dll.里面有个函数ArriveTimePredict:
extern "C"  ATPSYSTEM_API void _stdcall ArriveTimePredict(int Direction,int
             RouteFlag,int SectionFlag,int StopStationFlag,double HisAveVelocity,
             double longitude,double latitude,double v,int GPShour,int GPSminute,
             int GPSsecond)
我在Module里面声明:
Declare Function ArriveTimePredict Lib "ATPSystem.dll" (ByVal Direction As Integer, RouteFlag As Integer, SectionFlag As Integer, StopStationFlag As Integer, HisAveVelocity As Double, longitude As Double, latitude As Double, v As Double, GPShour As Integer, GPSminute As Integer, GPSsecond As Integer) As Long但是程序在调用的时候:
Private Sub StopSearchCmd_Click()
Call ArriveTimePredict(0, 202, 0, 0, 3.4, 106.4357, 29.6234, 11, 7, 15, 34)
End Sub 
就会报错can't find DLL entry point ArriveTimePredict in ATPSystem.dll!请教各位高手该如何解决啊?!

解决方案 »

  1.   

    没有函数入口,原因是函数申明有误,下面的建议,你试试看修改:
    Declare Function ArriveTimePredict Lib "ATPSystem.dll" (ByVal Direction As Integer, ByVal RouteFlag As Integer, ByVal SectionFlag As Integer, ByVal StopStationFlag As Integer, ByVal HisAveVelocity As Long, ByVal longitude As Long, ByVal latitude As Long, ByVal v As Long, ByVal GPShour As Integer, ByVal GPSminute As Integer, ByVal GPSsecond As Integer) As Long
      

  2.   

    按照楼上的建议修改后出现的错误是:
    bad DLL calling convention
      

  3.   

    搞错了,还是把那几个Double还原,其他的按我的改。应该没有问题。