DbiGetDirectory

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiGetDirectory

Return to chapter overview

C syntax

DBIResult DBIFN DbiGetDirectory (hDb, bDefault, pszDir);

Delphi syntax

function DbiGetDirectory (hDb: hDBIDb; bDefault: Bool; pszDir: PChar): DBIResult stdcall;

Description

DbiGetDirectory retrieves the current directory or the default directory, depending on the value specified in bDefault.

Parameters

hDb                Type: hDBIDb                (Input)
Specifies the database handle. Must be associated with a standard database.

bDefault                Type: BOOL                (Input)
The bDefault parameter specifies whether to retrieve the default directory or the current working directory.

pszDir                Type: pCHAR                (Output)
Pointer to the client-allocated buffer which receives the directory string. The buffer must be large enough to hold the directory string (DBIMAXPATHLEN + 1).

Usage

This function is valid only for a Paradox, FoxPro, or dBASE database. The default directory can be set when DbiInit is called as part of the DBIEnv structure. If DbiSetDirectory is not called, then the default directory is the same as the application startup directory.

SQL: DbiGetDirectory is not applicable to SQL databases.

Prerequisites

A valid database handle must be obtained.

Completion state

The output buffer contains the directory string.

DbiResult

Meaning

DBIERR_NONE

The directory was returned successfully.

DBIERR_INVALIDHNDL

The specified database handle is invalid or NULL.

See also

DbiSetDirectory, DbiInit, DbiOpenDatabase