Introduced in MSMQ 3.0. Peeks at a specific message from the queue. The message can be specified by a lookup identifier or by its position at the front or end of the queue.
Parameters
- action
- One of the MessageLookupAction values, specifying how the message is read in the queue. Specify one of the following:MessageLookupAction.Current: Peeks at the message specified by .MessageLookupAction.Next: Peeks at the message following the message specified by .MessageLookupAction.Previous: Peeks at the message preceding the message specified by .MessageLookupAction.First: Peeks at the first message in the queue. The parameter must be set to 0.MessageLookupAction.Last: Peeks at the last message in the queue. The parameter must be set to 0.
- lookupId
- The LookupId of the message to peek at, or 0. 0 is used when accessing the first or last message in the queue.
Return Value
The
Message specified by the and parameters passed in.
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