Microsoft KB Archive/174300

{|
 * width="100%"|

Imp_Draw.exe Uses MSMQ ActiveX Objects from Visual C++ 5.0

 * }

Q174300

-

The information in this article applies to:


 * Microsoft Message Queue Server version 1.0

-

SUMMARY
This sample demonstrates how to use the MSMQ ActiveX components with the #import compiler directive new to Visual C++ 5.0. This program also demonstrates how to handle MSMQ ActiveX Events in C++.

MORE INFORMATION
The following files are available for download from the Microsoft Download Center. Click the file names below to download the files:

"Imp_Draw.exe" For more information about how to download files from the Microsoft Download Center, please visit the Download Center at the following Web address

"http://www.microsoft.com/downloads/search.asp" and then click How to use the Microsoft Download Center. The #import compiler directive makes COM objects easier to use from C++. This sample program functions identically to the VB_Draw and C_Draw samples included with the MSMQ product and will inter-operate with those two samples.

This self-extracting executable file contains a sample project. To use the sample, unzip the contents of this file into a new directory. From the File menu, select Open Workspace from the Visual C++ IDE. Select Imp_Draw.dsw as the Workspace to load.

A new class has been defined to handle ActiveX Event notification, CMSMQEventHandler. This class can be used in other projects by deriving a new class from CMSMQEventHandler and overriding the Arrived and ArrivedError methods.

Aside from this new class the majority of code in this project was taken, or adapted, from the existing C_Draw and VB_Draw samples.

Additional query words:

Keywords : kbfile MQVC

Issue type : kbinfo

Technology :