PutLong


The PutLong method writes long integer (32 bit) sequence to file and returns number of elements actually written. File position is moved forward by the number of bytes written.
C++
long PutLong(
  long *LongBuffer,                // buffer that contains data
  long NumberOfElements,           // number of elements to write
  long FilePosition = -1           // position of data in file
);
BASIC
PutLong(
  LongBuffer As Variant,           // variant that contains data
  NumberOfElements As Long = -1,   // number of elements to write
  FilePosition As Long = -1        // position of data in file
) As Long

Parameters

LongBuffer
C++
Pointer to buffer that contains data.
BASIC
Variant that contains data.
Variant type must be compatible with Long data type; it can be either single variable or one-dimensional array.
NumberOfElements
Number of elements in data sequence to write.
BASIC
If this parameter is -1 length of sequence is determined by the size of LongBuffer.
FilePosition
Position in file to write data at.
If this parameter is -1 data is written at current file position.

Return Values

If the method succeeds, the return value is the number of elements actually written.
If the method fails, the return value is failure code and error code is set. Call GetError to get error code.

Remarks

BASIC
LongBuffer can be either single variable of type Long or one-dimensional Long array, depending on how many elements are to be written. If only one element is written, LongBuffer can be a single variable, if more than one element is to be written it must be a one-dimensional array.

See Also

GetLong, PutBit, PutByte, PutShort, PutFloat, PutDouble, PutText, PutUnicodeText, PutVariant, PutBinary, Reading and Writing Data