'get a reference to the service
Dim ws As InwiseWebServices.InwiseWebServices = New InwiseWebServices.InwiseWebServices()
'fill the security header
Dim header As InwiseWebServices.SecHeader = New InwiseWebServices.SecHeader()
header.username = "username"
header.pass = "myPassword"
ws.SecHeaderValue = header 'set credentials
'call the operation
Dim messages() As InwiseWebServices.MessageQueueData = ws.Queue_Sending()
Dim i As Integer
For i = 0 To messages.Length - 1 Step i + 1
Dim mq As InwiseWebServices.MessageQueueData = messages(i)
Dim priority As Single = mq.Ai 'the priority of the sending
Dim confirmed As Boolean = mq.Confirmed 'has the sending been confirmed
Dim groupid As Integer = mq.Groupid 'if the sending is to a group, this is the group id
Dim queryId As Integer = mq.Queryid 'if the sending is to a query, this is the query id
Dim id As Integer = mq.Id 'the id of the sending
Dim attachmentFileName As String = mq.MsgAttachFileName 'if there is an attachment file, this is it's name
Dim name As String = mq.Name 'the name of the group/query the message is being sent to
Dim sendid As Integer = mq.SendID 'the send id of the message being sent
Dim messageSubject As String = mq.Subject 'the subject of the message being sent
Dim timeForStartSending As DateTime = mq.TimeToStartDistribution 'the time to start the sending
Next