I am creating a COM Visible C# object to proxy calls to a webservice for VB6 application. I have a method that returns an array of objects.
public DocActionReport[] DocActionReportByDateRange(System.DateTime reportStartDate, System.DateTime reportEndDate)
{
object[] results = this.Invoke("DocActionReportByDateRange", new object[] {
reportStartDate,
reportEndDate});
return ((DocActionReport[])(results[0]));
}
When I call this method via VB6, like so:
Dim proxy As New QueueMovementServiceClient.ReadQueueInfo
Dim report() As QueueMovementServiceClient.DocActionReport
report = proxy.DocActionReportByDateRange(startDate, reportEndDate)
It successfully executes (I can see that via logging on the web service) but no data is returned to the object in VB6 (LBound(report) == 0, UBound(report) == -1).
I have tried a couple of different approaches (changing the method to a void method and passing the collection in as a ref
parameter) but no joy so far.
What do I need to do to return an array of objects (list, collection, whatever) to a VB6 consumer?