Beispiel #1
0
        public Int32 HNC_CrdsGetValue(Int32 type, Int32 ax, ref Int32 value, Int32 ch, Int32 crds)
        {
            Int32  ret = -1;
            IntPtr ptr = Marshal.AllocHGlobal(HncApi.intSize);

            ret   = HncApi.HNC_CrdsGetValue(type, ax, ptr, ch, crds, _ClientNo);
            value = Marshal.ReadInt32(ptr);
            Marshal.FreeHGlobal(ptr);

            return(ret);
        }
Beispiel #2
0
        public Int32 HNC_CrdsGetValue(Int32 type, Int32 ax, ref Double value, Int32 ch, Int32 crds)
        {
            Int32  ret = -1;
            IntPtr ptr = Marshal.AllocHGlobal(HncApi.doubleSize);

            ret   = HncApi.HNC_CrdsGetValue(type, ax, ptr, ch, crds, _ClientNo);
            value = (Double)Marshal.PtrToStructure(ptr, typeof(Double));
            Marshal.FreeHGlobal(ptr);

            return(ret);
        }