Exemplo n.º 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;
 }
Exemplo n.º 2
0
 protected FixedPointer(IntPtr intptr) //for FromInArg only
 {
     MemoryType = StructMemoryType.Native;
     Ptr        = intptr;
     //Recycle = .. ; //Native data don't need recycle
 }