SilverScreen Solid Modeler

bt_read

bt_read

Previous topic Next topic  

bt_read

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

Antiquated

 

int bt_read( int handle, int record_number, char *buf )

 

int   handle;             // an open b-tree database handle

int   record_number;      // the record number of the record to read

char *buf;                // where to store the record data

 

 




Synopsis

#include "silver.h"

 

The bt_read function retrieves the data from a record specified by record_number from the b-tree database designated by handle . The data is stores in buf .

 

 

Parameters

handle is an open b-tree database handle, as obtained by a call to bt_open . record_number is a sequential record number, as obtainable by a call to bt_find . buf is a pointer to a buffer where the record is to be stored, and and should be greater than or equal to the record size of the data file.

 

 

Return Value

bt_read stores the record data in buf and returns 1 if successful, and returns 0 if not.

 

 

Comments

The btree-family of functions is not available in SilverSharp, except by means of P/Invoke.

 

See Also

bt_find , bt_write

 

 

Example

See the section on B-Trees for more information on the b-tree functions.

 

C / C++ Code

 

 int handle;

 char *key;

 char *data;

 

 if ( record = bt_find( handle, key ) )

    {

    bt_read( handle, record, data );

    ss_command ( "note key: %s data: %s", key, data );

    }