public static PHYSFS_sint64 PHYSFS_read(IntPtr handle, out short[] buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) { IntPtr ptrBuffer; PHYSFS_sint64 ret = PHYSFS_read(handle, out ptrBuffer, objSize, objCount); buffer = new short[objCount]; Marshal.Copy(ptrBuffer, buffer, 0, (int)objCount); Marshal.FreeHGlobal(ptrBuffer); return ret; }
public static PHYSFS_sint64 PHYSFS_read(IntPtr handle, out IntPtr buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount) { buffer = Marshal.AllocHGlobal((int)objSize * (int)objCount); return PHYSFS_read(handle, buffer, objSize, objCount); }
public extern static PHYSFS_sint64 PHYSFS_read(IntPtr handle, IntPtr buffer, PHYSFS_uint32 objSize, PHYSFS_uint32 objCount);
public extern static int PHYSFS_writeULE32(IntPtr file, PHYSFS_uint32 val);
public extern static PHYSFS_uint32 PHYSFS_swapULE32(PHYSFS_uint32 val);
public extern static int PHYSFS_readULE64(IntPtr handle, ref PHYSFS_uint32 val);