Opens a queue for receiving messages. If the queue does not exist and the protocol is set to OS, the method tries to create a queue and fails if this is not possible.
[In] Name |
The name of the queue in one of the following:
|
[In] Protocol |
Refers to the network protocol you must use when you connect to the queue. The options are:
|
[In] Mode |
Reflects the mode in which the queue will be opened. The mode options are:
When the protocol contains a value that has no meaning, the default OS protocol is used. When you set Mode to DIRECT, a FormatName (see below) is used. Any other Mode uses a PathName. |
You use direct format names to reference public or private queues without accessing the directory. You can use direct format names when performing the following operations:
Sending a message directly to a computer.
Sending a message to computers on the Internet.
Sending messages in a workgroup environment.
Reading messages in a workgroup environment.
The general format of direct format names is shown below. Note that you can directly access public, private and (for MSMQ 2.0 clients and servers) computer system queues.
AddressSpecification\QueueName (for public queues)
AddressSpecification\PRIVATE\QueueName (for private queues)
AddressSpecification\SYSTEM$,computersystemqueue (introduced in MSMQ 2.0 for computer journal and dead-letter queues)
157.18.3.1\myQueue (Mode Direct, Protocol TCP)
elvisp.ms.com\myQueue (Mode Direct, Protocol OS)
00000012:00a0234f7500\myQueue (Mode Direct, Protocol SPX, supported only on Windows NT4 and Windows 2000)
More information: