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