Click or drag to resize

FRead4 Function

Read characters from a file into an allocated buffer with optional OEM to Ansi conversion.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.0
Syntax
 FUNCTION FRead4(
	pFile AS IntPtr,
	pData AS IntPtr,
	dwCount AS DWORD,
	lAnsi AS LOGIC
) AS DWORD

Parameters

pFile
Type: IntPtr
The handle of the file. Please see the remark below about the compatibility of X# Runtime file handles and Win32 file handles.
pData
Type: IntPtr
A block of memory to store the data read from the specified file. The length of this variable must be greater than or equal to the number of bytes in the next parameter.
dwCount
Type: UInt32
The number of bytes to read into the buffer.
lAnsi
Type: Boolean
If FALSE an OEM to ANSI conversion is made.

Return Value

Type: UInt32
The number of bytes successfully read. A return value less than the number of bytes requested indicates end-of-file or some other read error. FError() can be used to determine the specific error.
Remarks
Tip Tip
This function is included for compatibility. We do not recomment using static memory for file i/o operations. We recommend that you use the function overload that takes a byte array parameter in stead.
See Also