Share via


Creating a Private Queue (COM) (Windows Embedded CE 6.0)

1/6/2010

To create a private queue, you must provide the pathname for the queue, plus additional queue properties needed by your application.

The pathname for a private queue contains the name of the local computer where the messages sent to the queue will be stored, the "PRIVATE$" keyword, and the name of the queue.

When providing the name of local computer, you can use the NetBIOS machine name, full DNS machine name, or a period (".") to designate the computer.

When providing a name for the queue, you can use any character except "\", ";" and "$" as the last character of the name. (Message Queuing reserves names ending with "$". For example, the token "PRIVATE$" is used to specify a private queue.)

The name of the queue is case-insensitive (for example, "MyQueue" and "myQueue" are treated as the same name) and can be up to 124 Unicode characters.

Note

Queue names greater than 64 Unicode characters can cause a slight reduction in performance, and they are not easily displayed in Active Directory.

To create a private queue

  1. Declare the MSMQQueueInfo variable for the queue.

  2. Create a new MSMQQueueInfo object and assign it to the variable.

  3. Specify the pathname of the queue.

    In these examples, "." is used to indicate the local computer.

    Note

    For Message Queuing servers and independent clients, the local machine is the local computer. However, for Message Queuing–dependent clients, the local machine is the client's Message Queuing server.

  4. (Optional) Add additional queue properties that might be needed.

    The C++ COM code example also specifies the label of the queue.

  5. Call MSMQQueueInfo.Create to create the queue.

For a code example using C++ COM, see C++ COM Code Example: Creating a Private Queue.

See Also

Concepts

Creating a Queue (COM)
MSMQ COM Support
Using the COM Components
MSMQ Security

Other Resources

Message Queuing