Esempio n. 1
0
 public StructWrapper(object obj)
 {
     Size = Marshal.SizeOf(obj);
     Ptr  = Marshal.AllocHGlobal(Size);
     Win32Api.ZeroMemory(Ptr, Size);
     Marshal.StructureToPtr(obj, Ptr, false);
 }
Esempio n. 2
0
 public Raw_Array_Wrapper(int sizeinbytes)
 {
     Size = sizeinbytes;
     Ptr  = Marshal.AllocHGlobal(Size);
     Win32Api.ZeroMemory(Ptr, Size);
 }