System.Messaging Reference (Document! X Sample)
MessageQueue Class Methods


System.Messaging Namespace : MessageQueue Class

For a list of all members of this type, see MessageQueue members.

Public Methods
 NameDescription
Public MethodOverloaded. Initiates an asynchronous peek operation that has no time-out. The operation is not complete until a message becomes available in the queue.  
Public MethodOverloaded. Initiates an asynchronous receive operation that has no time-out. The operation is not complete until a message becomes available in the queue.  
Public Methodstatic (Shared in Visual Basic)Clears the connection cache.  
Public MethodFrees all resources allocated by the MessageQueue.  
Public Methodstatic (Shared in Visual Basic)Overloaded. Creates a non-transactional Message Queuing queue at the specified path.  
Public MethodCreates a new Cursor for the current message queue.  
Public Method (Inherited from System.MarshalByRefObject)
Public Methodstatic (Shared in Visual Basic)Deletes a queue on a Message Queuing server.  
Public MethodOverloaded. Overridden. Disposes of the resources (other than memory) used by the MessageQueue.  
Public MethodCompletes the specified asynchronous peek operation.  
Public MethodCompletes the specified asynchronous receive operation.  
Public Methodstatic (Shared in Visual Basic)Determines whether a Message Queuing queue exists at the specified path.  
Public MethodReturns all the messages that are in the queue.  
Public MethodEnumerates the messages in a queue. GetEnumerator is deprecated. GetMessageEnumerator2 should be used instead.  
Public Method (Inherited from System.MarshalByRefObject)
Public Methodstatic (Shared in Visual Basic)Gets the identifier of the computer on which the queue referenced by this MessageQueue is located.  
Public MethodCreates an enumerator object for all the messages in the queue. GetMessageEnumerator is deprecated. GetMessageEnumerator2 should be used instead.  
Public MethodCreates an enumerator object for all the messages in the queue.  
Public Methodstatic (Shared in Visual Basic)Overloaded. Provides forward-only cursor semantics to enumerate through all public queues on the network.  
Public Methodstatic (Shared in Visual Basic)Retrieves all the private queues on the specified computer.  
Public Methodstatic (Shared in Visual Basic)Overloaded. Retrieves all the public queues on the network.  
Public Methodstatic (Shared in Visual Basic)Retrieves all the public queues on the network that belong to the specified category.  
Public Methodstatic (Shared in Visual Basic)Retrieves all the public queues on the network that carry the specified label.  
Public Methodstatic (Shared in Visual Basic)Retrieves all the public queues that reside on the specified computer.  
Public Methodstatic (Shared in Visual Basic)Retrieves the security context that MSMQ associates with the current user (thread identity) at the time of this call.  
Public Method (Inherited from System.MarshalByRefObject)
Public MethodOverloaded. Returns without removing (peeks) the first message in the queue referenced by this MessageQueue. The Peek method is synchronous, so it blocks the current thread until a message becomes available.  
Public MethodOverloaded. Peeks the message that matches the given correlation identifier and immediately raises an exception if no message with the specified correlation identifier currently exists in the queue.  
Public MethodOverloaded. Peeks the message whose message identifier matches the id parameter.  
Public MethodOverloaded. Introduced in MSMQ 3.0. Peeks at the message that matches the given lookup identifier from a non-transactional queue.  
Public MethodDeletes all the messages contained in the queue.  
Public MethodOverloaded. Receives the first message available in the queue referenced by the MessageQueue. This call is synchronous, and blocks the current thread of execution until a message is available.  
Public MethodOverloaded. Receives the message that matches the given correlation identifier (from a non-transactional queue) and immediately raises an exception if no message with the specified correlation identifier currently exists in the queue.  
Public MethodOverloaded. Receives the message that matches the given identifier from a non-transactional queue and immediately raises an exception if no message with the specified identifier currently exists in the queue.  
Public MethodOverloaded. Introduced in MSMQ 3.0. Receives the message that matches the given lookup identifier from a non-transactional queue.  
Public MethodRefreshes the properties presented by the MessageQueue to reflect the current state of the resource.  
Public MethodResets the permission list to the operating system's default values. Removes any queue permissions you have appended to the default list.  
Public MethodOverloaded. Sends an object to non-transactional queue referenced by this MessageQueue.  
Public MethodOverloaded. Gives a computer, group, or user the specified access rights.  
Public Method (Inherited from System.ComponentModel.Component)
Top
Protected Methods
 NameDescription
Protected Method (Inherited from System.ComponentModel.Component)
Protected Method (Inherited from System.ComponentModel.Component)
Protected MethodOverloaded.  (Inherited from System.MarshalByRefObject)
Top
See Also

Reference

MessageQueue Class
System.Messaging Namespace