Hi All,
I try to create a Windows Service application using VB.NET.
Here is what I like to do:
<1>Crerate an instance of MessageQueue like this:
Dim mq As MessageQueue = New MessageQueue(mqPath);
<2>Read message from MSMQ:
AddHandler mq.ReceiveCompleted, AddressOf
OnReceiveCompleted
mq.BeginReceive()
<3> OnReceiveCompleted is a procedure and will be trigged
whenever event ReceiveCompleted has beeb raised.
I got a sample form MSDN as this link:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/cpref/html/frlrfsystemmessagingmessagequeueclassreceivec
ompletedtopic.asp
However, above sample does not trigge the procedure
OnReceiveCompleted.
Any help will be appreciated !
Nelson