public interface IHandleVIParentInfo { Dictionary<int, string> ContainerParentredVi {get; set;} int GetListCount(); } [ComVisible(true)] [ClassInterface(ClassInterfaceType.None)] [ComSourceInterfaces(typeof(IHandleVIParentInfo))] [ProgIdAttribute("Qcs.VIParentedInfoHandler")] [GuidAttribute(HandleVIParentedInfo.Guid)] [DisplayName("Qcs VI Parented Info Handler")] public class HandleVIParentedInfo : IDisposable, IHandleVIParentInfo { public const string Guid = "CB6BFC97-F8E3-4fce-B68B-4D01485811A1"; public Dictionary<int, string> ContainerParentredVi { get { return _containerParentredVi; } set { _containerParentredVi = value; } } private Dictionary<int, string> _containerParentredVi = new Dictionary<int, string>(); public HandleVIParentedInfo() { //private Dictionary<int, string> _containerParentredVi = new Dictionary<int, string>(); } #region IDisposable Members void IDisposable.Dispose() { throw new NotImplementedException(); } #endregion #region IHandleVIParentInfo Members int IHandleVIParentInfo.GetListCount() { return ContainerParentredVi.Count; } #endregion }</pre>
public static void GetIDEInstances() { instances = new List<object>(); Hashtable runningStationInstances = new Hashtable(); Hashtable runningObjects = GetROTContent(); object expectedObj; //runningObjects["!{5EB461D8-71CD-4E78-A360-4CE788A93063}"].GetHashCode(); IDictionaryEnumerator rotEnumerator = runningObjects.GetEnumerator(); while (rotEnumerator.MoveNext()) { string candidateName = (string)rotEnumerator.Key; if (string.Compare(candidateName,"!{CB6BFC97-F8E3-4fce-B68B-4D01485811A1}",true)==0) { viParenting = (IHandleVIParentInfo)rotEnumerator.Value; } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)