This looks very similar to what I have.

.NET code:
public bool SaveInvoiceDocument(byte[] document, int invoiceNum)
DataFlex code:
Function ComSaveInvoiceDocument UChar[] lldocument Integer llinvoiceNum Returns Boolean
When I debug on the DataFlex side, the UChar array has data. But when I debug on the .NET side, the Byte array is empty.

Very frustrating.