hello,,Thanks for your reply.The link which u had told me to refer
shows the following code
Dim msmqMessage As System.Messaging.Message
msmqMessage = New System.Messaging.Message("Hello World")
msmqMessage.Recoverable = True 'default is False
but the code which i have already written is something like shown below
i dnt have a message object which has this property of recoverrable.How
can i modify this now.
Thanks and Regards,
Shahbaz Yousuf
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim QUEUE_NAME As String = ".\private$\myprivq"
Dim msqQ As System.Messaging.MessageQueue
Dim msgText As String
Dim s As String
s = TextBox1.Text
msgText = s
msqQ = GetQ(QUEUE_NAME)
msqQ.Send(msgText)
TextBox1.Text = ""
End Sub
Private Function GetQ(ByVal queueName As String) As
System.Messaging.MessageQueue
Dim msgQ As System.Messaging.MessageQueue
Dim queue_name As String = ".\private$\myprivq"
If Not System.Messaging.MessageQueue.Exists(queueName) Then
Try
msgQ = System.Messaging.MessageQueue.Create(queueName)
Catch CreateException As Exception
Throw New Exception("Error Creating Queue",
CreateException)
End Try
Else
Try
msgQ = New System.Messaging.MessageQueue(queueName)
Catch GetException As Exception
Throw New Exception("Error Getting Queue", GetException)
End Try
End If
Return msgQ
End Function