Delphi Examples: DbiGetDirectory

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiGetDirectory

Return to chapter overview

Return the current working directory.

This example uses the following input:

 ReturnString:= fDbiGetDirectory(Table1.DBHandle);

 

The function is defined as:

function fDbiGetDirectory(hDB: hDbiDb): String;

var

 Dir: string;

begin

 SetLength(Dir, dbiMaxPathLen + 1);

 Check(DbiGetDirectory(hDB, False, PChar(Dir)));

 SetLength(Dir, StrLen(PChar(Dir)));

 Result:= Dir;

end;