Arguments passed to adynamic-link library (DLL) or Macintosh code resource routine must exactly match those expected by the routine. Calling conventions deal with number, type, and order of arguments. This error has the following causes and solutions:

  • Your program is calling a routine in a DLL (in Windows) or a code resource (on the Macintosh) that’s being passed the wrong type of arguments. Make sure all argument types agree with those specified in the declaration of the routine you are calling.
  • Your program is calling a routine in a DLL (in Windows) or a code resource (on the Macintosh) that’s being passed the wrong number of arguments. Make sure you are passing the same number of arguments indicated in the declaration of the routine you are calling.
  • Your program is calling a routine in a DLL, but isn’t using the StdCall calling convention. If the DLL routine expects arguments by value, then make sure ByVal is specified for those arguments in the declaration for the routine.
  • Your Declare statement for a Windows DLL includes CDecl. The CDecl keyword applies only to the Macintosh

[efb_likebox fanpage_url="https://www.facebook.com/vbamarket/" box_width="840" box_height=340"" responsive="1" show_faces="1" show_stream="1" hide_cover="1" small_header="0" hide_cta="0" locale="en_US"]