INFO: MSMQ Triggers Service Uses Late Binding (IDispatch) to COM Objects (257289)
The information in this article applies to:
- Microsoft Message Queue Server (MSMQ) 1.0
- Microsoft Message Queuing 2.0
This article was previously published under Q257289 SUMMARY
The Message Queuing (MSMQ) Triggers service provides a mechanism to call a method of a COM object from a trigger. For this mechanism to work properly, the COM object must implement the COM IDispatch interface.
When you try to invoke a COM component that is written in C++ and you are not using the IDispatch interface, the Message Queuing Triggers service may not be successful and you may receive the following error message: Error: 0x80004002 No Such Interface MORE INFORMATION
To configure an action for a trigger, you need to specify the programmatic identifier (ProgID) of the COM object, and the name of the method by using the Triggers Microsoft Management Console (MMC) Snap-In.
In order to call COM objects at run time based on name, all operations on the object must be done with late (run-time) binding through the IDispatch interface. If the called object does not implement an IDispatch or dual interface, the call fails when the trigger is activated.
COM objects that are created by using Microsoft Visual Basic automatically implement a dual interface. Objects created in other languages may require additional implementation.
REFERENCES
MSDN Online Help for IDispatch
The Help documentation for the MSMQ Triggers package.
Modification Type: | Major | Last Reviewed: | 1/16/2004 |
---|
Keywords: | kbinfo KB257289 |
---|
|