Here is a handy little routine that you can use to retrieve licensing information from the SalesLogix system. The output will be an XML list of your SalesLogix licenses and will display which are valid and when they might expire. The other nice thing is it will identify what the license number is for (Network Users, Sync Server, etc.)
string str = string.Empty; object obj2 = null; string alias = Sage.Platform.Application.ApplicationContext.Current.Services.Get<Sage.Platform.Data.IDataService>(true).Alias; SLXSystem.ISlxServer instance = Sage.SalesLogix.SLXSystemPool.GetInstance(); object target = instance.GetInterface("SLXLicenseMgr.SlxLicense", "553D6249-C4A6-40B6-9118-B937021CD9DA"); if (target != null) { try { object[] args = new object[] { alias }; obj2 = target.GetType().InvokeMember("GetLicenses", System.Reflection.BindingFlags.InvokeMethod, null, target, args); } finally { System.Runtime.InteropServices.Marshal.ReleaseComObject(target); } } Sage.SalesLogix.SLXSystemPool.ReleaseInstance(instance); if (obj2 != null) { str = Convert.ToString(obj2); } this.DialogService.ShowMessage(str); |



