Beispiel #1
0
 public void Connect(string serverID)
 {
     this.itemMgtInterface = typeof(IOPCItemMgt).GUID;
     Type typeFromProgID = Type.GetTypeFromProgID(serverID);
     this.pIOPCServer = (IOPCServer) Activator.CreateInstance(typeFromProgID);
     this.groups = new OPCGroupCollection();
 }
Beispiel #2
0
 public void Connect(string ProgID,string ServerName)
 {
     this.itemMgtInterface = typeof(IOPCItemMgt).GUID;
     Type typeFromProgID;
     if (ProgID == null)
         typeFromProgID = Type.GetTypeFromProgID(ServerName);
     else
         typeFromProgID = Type.GetTypeFromProgID(ProgID, ServerName);
     this.pIOPCServer = (IOPCServer)Activator.CreateInstance(typeFromProgID);
     this.groups = new OPCGroupCollection();
 }