System.Messaging Reference (Document! X Sample)



The Id of the message to peek.
PeekById(String) Method
Peeks the message whose message identifier matches the id parameter.
Syntax
'Declaration
 
Public Overloads Function PeekById( _
   ByVal id As String _
) As Message
'Usage
 
Dim instance As MessageQueue
Dim id As String
Dim value As Message
 
value = instance.PeekById(id)
public Message PeekById( 
   string id
)
public:
Message^ PeekById( 
   String^ id
) 

Parameters

id
The Id of the message to peek.

Return Value

The Message whose Id property matches the id parameter.
Exceptions
ExceptionDescription
The id parameter is null.
No message with the specified id exists.
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