My code for calling the DLL is the following:

Dim openparam As Z4OPEN_PARM
Dim lRet As Long
openparam.config.address1 = "D:\"
openparam.config.addrindex = "D:\"
openparam.config.cdrom = "D:\"
openparam.config.citystate = "D:\"
openparam.config.crossref = "D:\"
openparam.config.system = "D:\"
openparam.config.elot = "D:\"
openparam.config.elotindex = "D:\"
openparam.config.ewspath = "D:\"
openparam.config.dpvpath = "D:\"
lRet = z4opencfg(openparam)

I am still getting the bad calling convention error. Any ideas of what I am doing wrong?