public unsafe static void PtrToStructureDirect(IntPtr ptr, TypedReference structure, int size) { SafeBufferHacks.PtrToStructureNative((byte *)ptr, structure, unchecked ((uint)size)); }
public unsafe static void StructureToPtrDirect(TypedReference structure, IntPtr ptr, int size) { SafeBufferHacks.StructureToPtrNative(structure, (byte *)ptr, unchecked ((uint)size)); }