Rami,
Do you want to send the contents of the file or do you want to send the file
name?
To send the contents of a file, the "easiest" way is to set the BodyStream
property of the message.
Dim theQueue As System.Messagin g.MessageQueue
Dim thePath As String = "c:\myfile. txt"
Dim theStream As New System.IO.FileS tream(thePath, IO.FileMode.Ope n)
Dim theMessage As New Message
theMessage.Body Stream = theStream
theMessage.Labe l = System.IO.Path. GetFileName(the Path)
theMessage.Prio rity = MessagePriority .Normal
theQueue.Send(t heMessage)
The send the file name, you can simply use:
Dim theMessage As New Message(thePath )
theMessage.Labe l = System.IO.Path. GetFileName(the Path)
theMessage.Prio rity = MessagePriority .Normal
theQueue.Send(t heMessage)
Hope this helps
Jay
"Rami" <an*******@disc ussions.microso ft.com> wrote in message
news:EC******** *************** ***********@mic rosoft.com...
can I send a file with MSMQ.
If yes then do you have an example.
Thanks.