internal static int LoadNew(IntPtr proc, int parIndex, int err, out HFile[] obj) { HTuple tuple; err = HTuple.LoadNew(proc, parIndex, err, out tuple); obj = new HFile[tuple.Length]; for (int index = 0; index < tuple.Length; ++index) { obj[index] = new HFile(tuple[index].IP); } return(err); }
/// <summary> /// Write a serialized item to a file. /// Instance represents: Handle of the serialized item. /// </summary> /// <param name="fileHandle">File handle.</param> public void FwriteSerializedItem(HFile fileHandle) { IntPtr proc = HalconAPI.PreCall(405); this.Store(proc, 1); HalconAPI.Store(proc, 0, (HTool)fileHandle); int procResult = HalconAPI.CallProcedure(proc); HalconAPI.PostCall(proc, procResult); GC.KeepAlive((object)this); GC.KeepAlive((object)fileHandle); }
/// <summary> /// Read a serialized item from a file. /// Modified instance represents: Handle of the serialized item. /// </summary> /// <param name="fileHandle">File handle.</param> public void FreadSerializedItem(HFile fileHandle) { this.Dispose(); IntPtr proc = HalconAPI.PreCall(406); HalconAPI.Store(proc, 0, (HTool)fileHandle); HalconAPI.InitOCT(proc, 0); int err = HalconAPI.CallProcedure(proc); int procResult = this.Load(proc, 0, err); HalconAPI.PostCall(proc, procResult); GC.KeepAlive((object)this); GC.KeepAlive((object)fileHandle); }
internal static int LoadNew(IntPtr proc, int parIndex, int err, out HFile obj) { obj = new HFile(HTool.UNDEF); return(obj.Load(proc, parIndex, err)); }