Write the contents of a buffer to an open file.
XSharp.Core (in XSharp.Core.dll) Version: 2.2a
Syntax View Source
ptrHandle AS IntPtr,
ptrBuffer AS BYTE,
dwBytes AS DWORD
) AS DWORD
public static uint FWrite3(
- Type: IntPtr
The handle of the file to write to.
- Type: Byte
A pointer to the buffer to write.
- Type: UInt32
The number of bytes in <ptrBuffer> to write, beginning at the current file pointer position.
The number of bytes written. If the value returned is equal to <dwBytes>, the operation was successful. If the return value is less than <dwBytes> or 0, this means that the length of <ptrBuffer> is less than <dwBytes>, or the disk is full, or another error has occurred. FError() can be used to determine the specific error.
FWrite3() is a strongly-typed version of FWrite(). Moreover, the second argument in FWrite3() is a pointer to a buffer, instead of a string. See FWrite() for details.
Conversions between OEM en Ansi were relevant in an Ansi environment like Visual Objects.
In a Unicode environment this conversion is noto much a conversion between OEM and Ansi but a
conversion between either Unicode and Ansi or Unicode and OEM. |
For these conversions the runtime uses the current values of the
This example writes the contents of a PSZ to a file:.
LOCAL pszBuff AS PSZ
LOCAL ptrHandle AS PTR
pszBuff := "hello" // psz converted data
ptrHandle := FOpen2("temp.bin", FO_READWRITE)
IF ptrHandle != F_ERROR
FWrite3(ptrHandle, pszBuff, PszLen(pszBuff)