Torna al Thread

COMAdminCatalogClass ^comAdmin = gcnew COMAdminCatalogClass(); ICatalogCollection ^subCollection = (ICatalogCollection ^)comAdmin->GetCollection("TransientSubscriptions"); subCollection->Populate(); ICatalogObject ^catalogObject = (ICatalogObject ^)subCollection->Add(); // we must insert the CLSID of our component, we can see in the // Component Services Tool or in the registry editor catalogObject->Value["EventCLSID"] = "{D5978620-5B9F-11D1-8DD2-00AA004ABD5E}"; catalogObject->Value["Name"] = "Subscription to Logon event"; catalogObject->Value["MethodName"] = "Logon"; // who subscribe the event catalogObject->Value["SubscriberInterface"] = this; catalogObject->Value["Enabled"] = true; catalogObject->Value["PerUser"] = true; subCollection->SaveChanges();
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5