|
|
Using COM+ Components
I_08_Events subscriberInterface = this as I_08_Events; COMAdmin.ICOMAdminCatalog pICat = new COMAdmin.COMAdminCatalogClass() as COMAdmin.ICOMAdminCatalog; COMAdminWrapper.Subscriptions.AddTransientSubscription( pICat, //ICOMAdminCatalog subscriptionID.ToString(), // Subscription name _08_Events.EventClassCLSID, // EventClass to subscribe to null, // PublisherID _08_Events.FiringInterfaceID, // FiringInterfaceID subscriberInterface, // the transient interface pointer on this form null, // methodName null, // FilterCriteria null, // Publisher property name null); // publisher property value
COMAdmin.ICOMAdminCatalog pICat = new COMAdmin.COMAdminCatalogClass() as COMAdmin.ICOMAdminCatalog; COMAdminWrapper.Subscriptions.RemoveTransientSubscription(pICat, subscriptionID.ToString());