Calling a C DLL from VB gives me the Runtime
Error: Bad DLL calling convention

The C declaration is:

int Z4W32FUNC z4opencfgSTD(Z4OPEN_PARM *, ...); /* open with custom parameters */

My VB declaration is:

Public Declare Function z4opencfg Lib "zip4_w32.dll" Alias "z4opencfgSTD" _

(ByVal rsvd1 As String, ByVal status As Integer, ByRef fname As Long, ByRef config As CONFIG_PARM, _

ByVal elotflag As Byte, ByVal dpvflag As Byte, ByVal iopenflag As Byte, ByVal rsvd2 As String) As Long

Please advice