Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi AD Hilfe !! (https://www.delphipraxis.net/119718-ad-hilfe.html)

Alter Mann 1. Sep 2008 17:00

Re: AD Hilfe !!
 
Hi,

ich hatte nur kurz Zeit mal ein Blick auf das 'Description'-Feld zu werfen.
Es wird als 'Variant-Array of Variant-Array' zurückgegeben.

Probiere mal die nachstehende Funktion(ist aus einem anderen Projekt, deshalb ungetestet)
Delphi-Quellcode:
  function GetArrayContent(FVarObj: Variant): string;
  var
    idx: Integer;
    RS : String;
  begin
    RS := '[';
    if (VarIsNull(FVarObj)) or (VarArrayHighBound(FVarObj, 1) <= 0) then
      RS := RS + ']'
    else
    begin
      for idx := 1 to VarArrayHighBound(FVarObj, 1) do
        RS := RS + VarToStr(FVarObj[idx]) + ', ';
    end;
    if Length(RS) > 2 then RS := Copy(RS, 1, Length(RS) - 2) + ']';
    Result := RS;
  end;
Würde empfehlen beim ersten if ein breakpoint zusetzen und dann durch zusteppen.

Gruß

Alter Mann 10. Sep 2008 06:21

Re: AD Hilfe !!
 
Hallo,

so wichtig ist es wohl dann doch nicht?

Falls doch, dann aus diesem:
Delphi-Quellcode:
for idx := 1 to VarArrayHighBound(FVarObj, 1) do
dieses machen:
Delphi-Quellcode:
for idx := 0 to VarArrayHighBound(FVarObj, 1) do
Gruß


Alle Zeitangaben in WEZ +1. Es ist jetzt 14:38 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz