I have written a WCF service using vb. The client, written by a third party in c# requires two out parameters.
The service works correctly, but I have a problem with the out parameters.
Searching SO I found the solution and I have been able to declare the two parameters using the prefix.
One of the parameters is a string and the other is an array of objects as shown by the declaration below.
Function getStatusAndCosts(<Out()> ByRef commStatus() As communicationStatus, <Out()> ByRef communicationError As String, ByVal strUser As String, ByVal strPwd As String, ByVal communicationId As Guid) As Boolean
When I launch the client, the array returns empty, while the string is filled with the correct data.
Dim bTest As Boolean = False
Dim strTest As String ="-"
Dim tmpcommListArray() As DocPos_WebService.IDocPoscommunicationStatus
Dim tmpGuid As New Guid("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
bTest = client.getStatusAndCosts(tmpcommListArray, strTest, "yyy", "yyy", tmpGuid)
I tried to remove the second out parameter (see the declaration below)
Function getStatusAndCosts(<Out()> ByRef commStatus() As communicationStatus, ByVal strUser As String, ByVal strPwd As String, ByVal communicationId As Guid) As Boolean
In this case the array is filled with the correct data.
I tried also to change the order of the parameters with no result (the string is filled the array returns empty)
Where do I am wrong? Is it possible to have multiple out params in vb?
Thanks for your replies!