Delphi Examples: DbiGetProp

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Delphi Examples: DbiGetProp

Return to chapter overview

Example 1: Return the native database handle

This example uses the following input:

Size := GetNativeDBHandle(Database1.Handle, NativeDB);

 

Size is a variable of type word. NativeDB is a variable of type longint.

 

function GetNativeDBHandle(DBHandle: hDBIDb; var NativeHandle: longint): Word;

begin

 Result := 0;

 // Get the native handle to the database...

 Check(DbiGetProp(hDBIObj(DBHandle), dbNATIVEHNDL, @NativeHandle,

   sizeof(NativeHandle), Result));

end;