The information in this article applies to:
SUMMARY
ATLAsync.exe is a sample that demonstrates using ATL 3.0 to sink MSMQEvent events.
MORE INFORMATIONThe following files are available for download from the Microsoft
Download Center. Click the file names below to download the files: ATLAsync.exeFor 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.aspand then click How to use the Microsoft Download Center. The following table describes the files necessary for the ATLAsync.exe application:
This project demonstrates how to sink MSMQEvent events using ATL 3.0. The IDispEventImpl class in ATL allows your class (in this case CSinkMSMQEvents) to sink IDispatch events. The actual event sink is set up with both the sink map:
and the call to DispEventAdvise() in CSinkMSMQEvents::AdviseSource(). In addition CSinkMSMQEvents contains an instance of the MSMQEvent object and a reference to the MSMQQueue object passed to CMSMQEvents::AdviseSource(). All of the event sinks (CSinkMSMQEvents objects) are contained in a Standard Template Library (STL) list which is contained in a CQueueSinks object. An instance of this class is contained in the CEnterQueueForNotificationDlg dialog class. This is used to set up the event sinks. This example will allow you to set up notifications on any number of queues and send test messages to see the notifications work. To set up notifications on a queue, enter the name in the upper edit box of the dialog box. The second edit is used to enter the name of the queue to which you want to send test messages to. When you notify on a queue, the sample code will propagate the path name of the queue to the send test message edit box. If you attempt to notify on a queue that does not exist, the sample will attempt to create that queue. REFERENCESFor additional information, please click the article number(s) below to view the article(s) in the Microsoft Knowledge Base: Q194179 SAMPLE: AtlEvnt.exe Creates ATL Sinks Using IDispEventImpl Q181277 SAMPLE: AtlSink Uses ATL to Create a Dispinterface Sink Additional query words: MSMQ Events ATL
Keywords : kbfile kbMSMQ kbMSMQ100 kbGrpPlatform kbDSupport |
Last Reviewed: January 13, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |