DECLARE LONG FedExAPITransaction in whatever.DLL STRING @host, LONG port, STRING @sbuf, LONG sbuf_len, long universalTransCode, STRING @rbuf, LONG rbuf_len, LONG @receive_lengthWhen calling a DLL there's no conversion going on. BTW, I think it's a problem with the FedEx object, not VFP. The buffer parameter is incorrectly marked as a BSTR, not as a byte array.