Tao.PhysFs SDK Documentation

Fs.PHYSFS_read Method (IntPtr, IntPtr, UInt32, UInt32)

Read data from a PhysicsFS filehandle to a buffer location which already has memory allocated to it.

[Visual Basic]
Overloads Public Shared Function PHYSFS_read( _
   ByVal handle As IntPtr, _
   ByVal buffer As IntPtr, _
   ByVal objSize As UInt32, _
   ByVal objCount As UInt32 _
) As Long
[C#]
public static long PHYSFS_read(
   IntPtr handle,
   IntPtr buffer,
   uint objSize,
   uint objCount
);

Parameters

handle
handle returned from PHYSFS_openRead.
buffer
buffer to store read data into.
objSize
size in bytes of objects being read from (handle).
objCount
number of (objSize) objects to read from (handle).

Return Value

number of objects read. PHYSFS_getLastError can shed light on the reason this might be less than (objCount), as can PHYSFS_eof. -1 if complete failure.

Remarks

The file must be opened for reading. Memory must be allocated.

See Also

Fs Class | Tao.PhysFs Namespace | Fs.PHYSFS_read Overload List | PHYSFS_eof