System.Messaging Reference (Document! X Sample)
System.Messaging Namespace / MessageQueue Class / ReceiveByLookupId Method / ReceiveByLookupId(Int64) Method
The LookupId of the message to receive.



In This Topic
    ReceiveByLookupId(Int64) Method
    In This Topic
    Introduced in MSMQ 3.0. Receives the message that matches the given lookup identifier from a non-transactional queue.
    Syntax
    'Declaration
     
    
    Public Overloads Function ReceiveByLookupId( _
       ByVal lookupId As Long _
    ) As Message
    'Usage
     
    
    Dim instance As MessageQueue
    Dim lookupId As Long
    Dim value As Message
     
    value = instance.ReceiveByLookupId(lookupId)
    public Message ReceiveByLookupId( 
       long lookupId
    )
    public:
    Message^ ReceiveByLookupId( 
       int64 lookupId
    ) 

    Parameters

    lookupId
    The LookupId of the message to receive.

    Return Value

    The Message whose LookupId property matches the lookupId parameter passed in.
    Exceptions
    ExceptionDescription
    MSMQ 3.0 is not installed.
    The message with the specified lookupId could not be found.
    An error occurred when accessing a Message Queuing method.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also