Buffer Function | |
Return an uninitialized string of a specified size.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax FUNCTION Buffer(
dwSize AS DWORD
) AS STRING
public static string Buffer(
uint dwSize
)
Request Example
View SourceParameters
- dwSize
- Type: DWord
The number of bytes to return.
Return Value
Type:
String
A string of
dwSize bytes.
If
dwSize is 0, Buffer() returns a NULL_STRING.
Remarks
Buffer() is similar to Space() but with random contents. You should use it, instead of Space(), in cases where an initialization character is not needed.
Examples
This example uses Buffer() to allocate a string then fills it in with the data read from FRead3():
1cBuff := Buffer(8)
2FRead3(ptrHandle, Ptr(_CAST, cBuff), 8)
See Also