Example #1
0
        internal static int LoadNew(IntPtr proc, int parIndex, int err, out HMutex[] obj)
        {
            HTuple tuple;

            err = HTuple.LoadNew(proc, parIndex, err, out tuple);
            obj = new HMutex[tuple.Length];
            for (int index = 0; index < tuple.Length; ++index)
            {
                obj[index] = new HMutex(tuple[index].IP);
            }
            return(err);
        }
Example #2
0
        /// <summary>
        ///   wait on the signal of a condition synchronization object.
        ///   Instance represents: Condition synchronization object.
        /// </summary>
        /// <param name="mutexHandle">Mutex synchronization object.</param>
        public void WaitCondition(HMutex mutexHandle)
        {
            IntPtr proc = HalconAPI.PreCall(547);

            this.Store(proc, 0);
            HalconAPI.Store(proc, 1, (HTool)mutexHandle);
            int procResult = HalconAPI.CallProcedure(proc);

            HalconAPI.PostCall(proc, procResult);
            GC.KeepAlive((object)this);
            GC.KeepAlive((object)mutexHandle);
        }
Example #3
0
 internal static int LoadNew(IntPtr proc, int parIndex, int err, out HMutex obj)
 {
     obj = new HMutex(HTool.UNDEF);
     return(obj.Load(proc, parIndex, err));
 }