internal ControlObject(string objectReference, IntPtr connection, IedConnection iedConnection) { this.iedConnection = iedConnection; this.self = ControlObjectClient_create(objectReference, connection); if (this.self == System.IntPtr.Zero) { throw new IedConnectionException("Control object not found", 0); } intCommandTerminationHandler = new InternalCommandTerminationHandler(MyCommandTerminationHandler); ControlObjectClient_setCommandTerminationHandler(self, intCommandTerminationHandler, self); }
internal ControlObject(string objectReference, IntPtr connection, IedConnection iedConnection) { this.iedConnection = iedConnection; this.controlObject = ControlObjectClient_create(objectReference, connection); if (this.controlObject == System.IntPtr.Zero) throw new IedConnectionException("Control object not found", 0); InternalCommandTerminationHandler intCommandTerminationHandler = new InternalCommandTerminationHandler (MyCommandTerminationHandler); ControlObjectClient_setCommandTerminationHandler(controlObject, intCommandTerminationHandler, controlObject); }
private static extern void ControlObjectClient_setCommandTerminationHandler(IntPtr self, InternalCommandTerminationHandler handler, IntPtr handlerParameter);
private static extern void ControlObjectClient_setCommandTerminationHandler(IntPtr self, InternalCommandTerminationHandler handler, IntPtr handlerParameter);