Bad DLL calling convention

Error 49

Your program is calling a routine in a dynamic-link library that either is being passed the wrong type or number of arguments or does not use the Pascal calling convention.  Make sure that the arguments passed to the DLL routine exactly match the arguments expected by the routine.  If the DLL routine expects arguments by value, then make sure ByVal is specified for those arguments in the declaration for the routine.