Q: [IDAPI] Query Progress CallBack Function

Hi, EveryBody!

I'm interested in writing IDAPI Callback Function which will obtain
progress of quering. I wrote the registration of function MyCallBack;

  pfCb := MyCallBack;
  DBIRslt := DbiRegisterCallBack (          { Register a call back fn }
      Query1.Handle,                     { Cursor (Optional) }
      cbGENPROGRESS,                     { Type of call back }
      0,                                 { Pass-thru client data }
      512,                               { Callback buffer len }
      CallBackBufferPtr,                            { Pointer to callback buffer }
      pfCb                               { Call back fn being registered }
   );

and then wrote "export far CallBack" funtion

function MyCallBack(
     ecbType       : CBType;        { Callback type }
      iClientData   : Longint;       { Client callback data }
var   CbInfo        : Pointer        { Call back info/Client Input }
   ): CBRType;
var
  QryProgress : DBIQryProgress absolute CbInfo;
begin
  Application.ProcessMessages;
  if ecbType = cbGENPROGRESS then
    begin
      with QryProgress do
        MessageDlg(Format('Total steps in query : %d'#13#10+
                          'Steps completed out of total : %d'#13#10+
                          'Total elements in current step : %d'#13#10+
                          'Elements completed in current step : %d',
                          [stepsInQry,stepsCompleted,totElemInStep,elemCompleted]),
                          mtInformation, [mbOk],0);
      Result := cbrCONTINUE;
    end;
end;

DBIQueryProgress is a type posted in unit "DBITypes"

BUT stepsinQry is always 65535 and doesn't change during quering
while count of calls of this function is different

HOW to know the TOTAL STEPS IN QUERY in order to make the QUERY PROGRESS BAR.

THANKS IN ADVANCE.

----------------------------------------------------------------------------
Alexander Mamontov
Russian Center of Laser Physics
voice/fax : +7 (812) 293-3979
E-mail : el...@mamon.rclph.spb.su
------------------------------------------------------