示例#1
0
        private void SetMemoryCap(_MemoryCap m)
        {
            IntPtr buffer = Marshal.AllocHGlobal(Marshal.SizeOf(m));

            Marshal.StructureToPtr(m, buffer, false);

            NativeMethods.fscc_set_memory_cap(this._handle, buffer);

            Marshal.FreeHGlobal(buffer);
        }
示例#2
0
        private _MemoryCap GetMemoryCap(_MemoryCap m)
        {
            IntPtr buffer = Marshal.AllocHGlobal(Marshal.SizeOf(m));

            Marshal.StructureToPtr(m, buffer, false);

            NativeMethods.fscc_get_memory_cap(this._handle, buffer);

            m = (_MemoryCap)Marshal.PtrToStructure(buffer, typeof(_MemoryCap));
            Marshal.FreeHGlobal(buffer);

            return(m);
        }