Binary Large Objects (blob)
Chapter Updated 9/12/25
| Method | Description |
|---|---|
| xbBlob() xbBlob( unsigned char *pIn, xbInt32 lBlobLen ) | Constructors |
| ~xbBlob() | Destructor |
| xbInt16 Append( const xbBlob &bAppendBlob ) | Append data to blob object |
| void Clear() | Clear blob contents and free associated memory. |
| void Dump() | Dump xbBlob internals. Available if XB_DEBUG_SUPPORT is compiled into library. |
| xbInt32 GetLen() const | Return the length of the blob. |
| unsigned char *GetBlob() const | Return pointer to blob data. |
| char GetDbaseType() const | Return dBASE type field. Defaults to space if not set. U - User value (field type B) S - Sound or noise (field type B) I - Image or video (field type B) O - OLE field (field type G) |
| xbInt32 GetUser1() const | Return the user field. Get user integer field. Defaults to 0 if not set. |
| xbInt16 Set( unsigned char *vpIn, xbInt32 lBlobLen = 0 ) | Set the blob object to data at vpIn for lBlobLen bytes. |
| void SetUser1( xbInt32 iUser1 ) | Set user field to value in iUser1 |
| void SetDbaseType( char cDbaseType ) | Set dBASE type. U - User value S - Sound or noise I - Image or video 0 - OLE field |
| xbInt16 ReadFromFile( xbXBase &x, xbString &sFileName, xbInt32 lStartPos = 0, xbInt32 lLen = 0 ) |
Read blob from an input file. x - Pointer to main xbXBase instance. sFileName - Input file to read blob data from. lStartPos - Starting position within file to read. lLen - Length of data to read. 0 for the entire file contents (is if fits). |
| xbInt16 ReadFromFile( xbFile &f, xbInt32 lStartPos = 0, xbInt32 lLen = 0 ) |
Read blob from an open input file. f - Pointer to xbFile object. lStartPos - Starting position within file to read. lLen - Length of data to read. 0 for the entire file contents (is if fits). |
| xbInt16 WriteToFile( xbXBase &x, xbString &sFileName, xbInt16 iMode = 0, xbInt32 lStartPos = 0, xbInt32 lLen = 0 ) |
Write blob to an output file.
x - Pointer to main xbXBase instance. sFileName - Input write blob data to. iMode 0 - Truncate file if it exists and place data at the beginning of the file. 1 - Append data to the end of the file. lStartPos Starting position within blob to write to the file. 0 is default and beginning of blob. lLen - Length of data to write or 0 to write the entire blob contents to the file. |
| xbBool operator == (const xbBlob &b) const | Compare for equality operator b Blob to compare. Returns xbTrue if xbBlobs match or xbFalse if xbBlobs don't match. |
| xbBool operator != (const xbBlob &b) const | Compare for inequality operator b Blob to compare. Returns xbTrue if xbBlobs don't match or xbFalse if xbBlobs match. |
