Share via


Message Queuing Sample Applications

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The Microsoft® Platform SDK includes the complete source code for several Message Queuing sample applications that illustrate how to implement Message Queuing. You can obtain the source code for these samples by downloading the Core SDK from the SDK Update Site. After the installation process is completed, you will find the samples in the subfolders under the \Program Files\Microsoft SDK\samples\netds\Message Queuing folder on the drive where the SDK software is installed. The names of the subfolders correspond to the names of the samples.

Sample Applications

These Message Queuing sample applications include the following:

Name Description
C_Draw A C++ distributed drawing application that sends and asynchronously receives messages containing line-drawing information.

Interops with VB_Draw and Imp_Draw.

Requires MSMQ 1.0 or later.
CSharp_Draw A C# application that demonstrates how to use the System.Messaging component from the .NET Framework to write an MSMQ application that sends and receives messages containing line-drawing information.
DirEncrypt A C++ application that demonstrates how to independently encrypt and send an MSMQ message when there is no access to the directory service.

Requires MSMQ 2.0 or later.
DistCreate A Visual Basic® application that demonstrates how to create public and private queues, how to create a queue alias for a private queue, and how to create a distribution list, as well as how to add public queues and a queue alias to a distribution list.

Requires MSMQ 3.0 installed in domain mode and Visual Basic 6.0.
DL_Draw A Visual Basic distributed drawing application that sends and asynchronously receives messages containing line-drawing information using a distribution list as the remote destination.

Interops with C_Draw, Imp_Draw, VB_Draw, CSharp_Draw, Mqf_Draw, and Multi_Dest_Draw.

Requires MSMQ 3.0 installed in domain mode.
HTTP A Visual Basic sample application that demonstrates how to send messages over HTTP transport and how to read and display XML-formatted messages.

Requires MSMQ 3.0 with HTTP Support installed.
Imp_Draw A C++ distributed drawing application that sends and asynchronously receives messages containing line-drawing information and demonstrates the use of the #import compiler directive for using the MSMQ COM components in C++.

Interops with C_Draw and VB_Draw.

Requires MSMQ 1.0 or later.
ManageQueue A Visual Basic sample that demonstrates how to use various management properties of the MSMQApplication, MSMQManagement, MSMQQueueManagement, and MSMQOutgoingQueueManagement objects to obtain specific information about queues.

Requires MSMQ 3.0 and Visual Basic 6.0.
MqApiTst An MFC application that can be used to interactively invoke MSMQ API functions.

Requires MSMQ 1.0 or later installed with access to the directory service.
Mqf_Draw A C++ distributed drawing application that sends and asynchronously receives messages containing line-drawing information using a multiple-element format name as the remote destination.

Interops with C_Draw, Imp_Draw, VB_Draw, CSharp_Draw, DL_Draw, and Multi_Dest_Draw.

Requires MSMQ 3.0.
MqPers A C++ console application that demonstrates how to build a persistent COM object using ATL and then send and receive it as an MSMQ message.

Requires MSMQ 1.0 or later and ATL 3.0.
MqPort A C++ console application that demonstrates how to use completion ports to asynchronously receive MSMQ messages.

Requires MSMQ 2.0 or later.
MqTestOA A C++ console application that demonstrates how to send and receive messages between processes using the MSMQ COM components.

Interops with MSMQTest.

Requires MSMQ 2.0 or later.
MqTrans A C++ console application that demonstrates how to implement coordinated transactions that include sending or receiving an MSMQ message and a SQL database update.

Requires MSMQ 1.0 or later installed on a computer with access to the directory service, ODBC, and SQL Server 6.5 or later.
MSMQTest A C++ console application that demonstrates how to send and receive messages between processes using MSMQ API functions.

Interops with MqTestOA.

Requires MSMQ 2.0 or later.
Multi_Dest_Draw A Visual Basic distributed drawing application that sends and asynchronously receives messages containing line-drawing information using a multiple-element format name as the remote destination.

Interops with C_Draw, Imp_Draw, VB_Draw, CSharp_Draw, DL_Draw, and Mqf_Draw.

Requires MSMQ 3.0 and Visual Basic 5.0 or later.
Multicast_Draw A Visual Basic distributed drawing application that sends and asynchronously receives messages containing line-drawing information using a multicast address as the remote destination.

Receives messages sent from C_Draw, Imp_Draw, VB_Draw, CSharp_Draw, DL_Draw, Mqf_Draw, and Multi_Dest_Draw.

Requires MSMQ 3.0 and Visual Basic 5.0 or later
ReplyAll A Visual Basic application that demonstrates how to use the MSMQ Mail COM object library.

Requires MSMQ 1.0 or later installed on a computer with access to the directory service.
VB_Draw A Visual Basic distributed drawing application that sends and asynchronously receives messages containing line-drawing information.

Interops with C_Draw and Imp_Draw.

Requires MSMQ 2.0 or later and Visual Basic 5.0 or later.
VB_LookupId A Visual Basic application that demonstrates the usage of the MSMQMessage.LookupId property of the MSMQMessage COM object to peek at messages in a specified queue.

Requires MSMQ 3.0 and Visual Basic 6.0.
VBTrans A Visual Basic application that sends and receives transactional messages and demonstrates how the receiver can identify the transaction to which each message belongs.

Requires MSMQ 2.0 or later and Visual Basic 5.0 or later.
ViewQInfo A Visual Basic sample that demonstrates how to use some of the properties and methods of the MSMQApplication COM object to obtain lists of the private and active queues on a specific computer as well as to obtain and reset the network connectivity status of the computer.

Requires MSMQ 3.0 or later and Visual Basic 6.0.

For information about code examples for performing basic Message Queuing tasks, see Using Message Queuing.