I'm trying to use app.set_Value("<prop>", <value>). I need to change the Remote Server property of the COM+ application (Local com+ app). I can find it and connect to it using the, I just cannot find the property name of the remote server string/value. The whole point of this app I'm writing is a front end to another application, however the other application is 3rd party and has 7 different remote servers to connect to but only 1 COM+ app to do it with. What i'm writing is a simple drop down and launch button, that just modifies the COM+ remote server, then launches the application based on what is selected in the dropdown. Sounds simple enough huh? Heres the function so far The messagebox was me trying to guess what the value name was called, all I really need is the set_Value. private void SetCOM(string strSrv) { Type type = Type.GetTypeFromProgID("COMAdmin.COMAdminCatalog"); object catalog = Activator.CreateInstance(type); object[] args2 = new object[] { "Applications" }; COMAdminCatalogCollection apps = (COMAdminCatalogCollection)type. InvokeMember("GetCollection", BindingFlags.InvokeMethod, null, catalog, args2) ; apps.Populate(); for (int i = 0; i < apps.Count; i++) { COMAdminCatalogObject app = (COMAdminCatalogObject)apps. get_Item(i); lblTest.Text = app.Name.ToString(); if (app.Name.ToString().ToLower().Contains("test")) { Debug.WriteLine(app.Name); //chkTest.Checked = true; System.Windows.Forms.MessageBox.Show((string)app. get_Value("Server")); //app.set_Value("DataSource", strSrv); //apps.SaveChanges(); } }
Don't see what you're looking for? Try a search.
|