示例#1
0
            int InternalCheckHandlerImpl(IntPtr action, IntPtr parameter, IntPtr ctlVal, bool test, bool interlockCheck)
            {
                GCHandle handle = GCHandle.FromIntPtr(parameter);

                ControlHandlerInfo info = (ControlHandlerInfo)handle.Target;

                if (info != null & info.checkHandler != null)
                {
                    ControlAction controlAction = new ControlAction(action, info, this);

                    return((int)info.checkHandler(controlAction, info.checkHandlerParameter, new MmsValue(ctlVal), test, interlockCheck));
                }
                else
                {
                    return((int)CheckHandlerResult.OBJECT_UNDEFINED);
                }
            }
示例#2
0
            int internalCheckHandler(IntPtr parameter, IntPtr ctlVal, bool test, bool interlockCheck, IntPtr connection)
            {
                GCHandle handle = GCHandle.FromIntPtr(parameter);

                ControlHandlerInfo info = (ControlHandlerInfo)handle.Target;

                if (info != null & info.checkHandler != null)
                {
                    ClientConnection con = null;

                    clientConnections.TryGetValue(connection, out con);

                    return((int)info.checkHandler(info.controlObject, info.checkHandlerParameter, new MmsValue(ctlVal), test, interlockCheck, con));
                }
                else
                {
                    return((int)CheckHandlerResult.OBJECT_UNDEFINED);
                }
            }