COM+ Event Tutorial
COM+ Event Tutorial
COM+ Event Tutorial
Creating a COM+ Event 1. To Create and install a COM+ Event first create a new ActiveX Library. 2. Next create a COM+ Event object. 3. Add to the COM+ Event Object interface the methods along with parameters that will be passed to the subscriber. 4. Save the project and compile it. NOTE: Do not implement the methods for the generated object. Installing a COM+ Event 1. Create a new COM+ Application in Component Services. You get to Component Services by going to Start, Settings, Control Panel, Administrative Tools, Component Services. 2. To create the application, in the tree view on the left go to Computers, My Computer, COM+ Applications.
3. Right click on COM+ Applications choose New, Application. Click Next, and Create an empty application.
5. Now that you have the COM+ application created add the event. Expand the application and select Components. Right click on Components and choose New, Component.
6. Click Next and Choose Install new event class(es). Browse for the DLL that contains your COM+ Event Object and click Next and Finish.
7. The COM+ Event Object will now be visible in the Component Services.
3. Browse for the DLL that contains your COM Subscription Object and click Next and Finish.
4. Click on Subscriptions under the COM Subscription Object and right click and choose New, Subscription.
5. All COM+ Events will be shown in the dialog, choose the methods or entire object you want to subscribe to and click Next.
6. Now choose the COM+ Event object you are going to subscribe to and click Next.
7. Enter a Subscription name, click Enable this subscription immediately, and click Next.
var Event: IClockEvent; Hour, Minute, Second: Integer; begin Event := CoClockEvent.Create; // Now call the COM+ event object as you normally // would: Event.SomeMethod end;