_BtClose() Function

 

<< Click to Display Table of Contents >>

Navigation:  Low Level Functions >

 

_BtClose() Function

 

Previous pageReturn to chapter overviewNext page

 

Purpose

 

 

Closes a open btrieve file

 

 

 

Prototype

 

 

FUNCTION _BtClose ( hFile AS PTR )  AS LOGIC

 

 

 

Argument(s)

 

 

<hFile>File handle that was returned by _BtOpen
<nId>Clientid to use for this file

 

 

 

 

Return

 

 

LOGIC                Is the file Created successfully?

 

 

 

Description

 

 

With this function you can close an open file

 

 

-                The file must be open.

-                The file is not included in any of the application's active transactions.

 

If the Close operation is successful, the following occurs:

-                The handle for the file is no longer valid. Your application can use it for another file or use the data area for OTHER purposes.

-                IF no OTHER applications have the file open, the MicroKernel deletes any

         pre-image file associated with the file being closed. Pre-image files apply

         only to pre-v6.0 files.

 

 

The Close operation destroys both the physical and the logical currency information of the file.

 

If the Close operation fails, the file remains open and the MicroKernel may return one of the following status codes to your application:

03 File Not Open
41 Operation Not Allowed

 

 

 

 

See Also

 

 

_BtOpen()