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

Last reviewed: March 4, 1998
Article ID: 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 file is available for download from the Microsoft Software Library:

 ~ Imp_Draw.exe (size: 119282 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE : How to Obtain Microsoft Support Files from Online Services

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.

Keywords          : MQVC
Version           : WINNT:1.0
Platform          : winnt
Issue type        : kbfile
Solution Type     : kbsample


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 4, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.