HighTechTalks DotNet Forums  

How to use BeginReceive and ReceiveCompleted

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss How to use BeginReceive and ReceiveCompleted in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Nelson Xu
 
Posts: n/a

Default How to use BeginReceive and ReceiveCompleted - 02-03-2005 , 03:57 PM






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




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.