Click or drag to resize

FGetBuffer Function

X#
Access or allocate the File I/O Buffer used by the X# Runtime for Low Level File Access for a file.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax
 FUNCTION FGetBuffer(
	hFile AS IntPtr,
	nSize AS LONG
) AS BYTE[]
Request Example View Source

Parameters

hFile
Type: IntPtr
nSize
Type: Long
The size of the buffer that you would like to allocate.s

Return Value

Type: Byte
The Byte[] associated with the file handle for an open file. When the file handle is invalid then a NULL object will be returned.
Remarks
This function will either return the existing buffer or allocate a new buffer of the requested size.
When there is already a buffer allocated for the file handle, and this buffer is large enough then the existing buffer is returned. When the size requested exceeds the size of the allocated buffer, or when no buffer exists, then a new byte array will be allocated.
See Also