System.Messaging Reference (Document! X Sample)
System.Messaging Namespace / MessageEnumerator Class / RemoveCurrent Method / RemoveCurrent(MessageQueueTransaction) Method
The MessageQueueTransaction object that specifies the transaction in which the message will be removed.



In This Topic
    RemoveCurrent(MessageQueueTransaction) Method
    In This Topic
    Removes the current message from a transactional queue and returns the message to the calling application. There is no timeout specified for a message to arrive in the queue.
    Syntax
    'Declaration
     
    
    Public Overloads Function RemoveCurrent( _
       ByVal transaction As MessageQueueTransaction _
    ) As Message
    'Usage
     
    
    Dim instance As MessageEnumerator
    Dim transaction As MessageQueueTransaction
    Dim value As Message
     
    value = instance.RemoveCurrent(transaction)
    public Message RemoveCurrent( 
       MessageQueueTransaction transaction
    )
    public:
    Message^ RemoveCurrent( 
       MessageQueueTransaction^ transaction
    ) 

    Parameters

    transaction
    The MessageQueueTransaction object that specifies the transaction in which the message will be removed.

    Return Value

    A Message that references the first message available in the queue.
    Exceptions
    ExceptionDescription
    The transaction parameter is null.
    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