示例#1
0
 protected FixedPointer(Action <IntPtr> recycleHandler)
 {
     MemoryType = StructMemoryType.HGlobal;
     Ptr        = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(TS)));
     WindowsInterop.RtlZeroMemory(Ptr, (UIntPtr)T_SIZE);
     Recycle = recycleHandler;
 }
示例#2
0
 protected FixedPointer(IntPtr intptr) //for FromInArg only
 {
     MemoryType = StructMemoryType.Native;
     Ptr        = intptr;
     //Recycle = .. ; //Native data don't need recycle
 }