Announcement

Collapse
No announcement yet.

WWW.TORRY.RU

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • WWW.TORRY.RU

    Auf dieser Seite findet man viele Komponenten sogar nach Typen aufgeschlüsselt! Sollte man sich als Bookmark setze
    Zuletzt editiert von Christian Marquardt; 31.03.2014, 13:29.

  • #2
    verrate mir mal wie man da nach was bestimmten sucht. ich suche eine komponente die festplatten über 2 gigabyte
    richtig ausliest!!!!!!

    mfg

    marku
    Herzliche Grüße

    Markus Lemcke
    barrierefreies Webdesign

    Comment


    • #3
      Torry, hat leider keine suchmaschine......aber die Delphi Super Page hat eine......<br>
      Da Torry im moment umgestaltet wird, einfach mal noch ein wöchlein warten, dann gibbet auch suchen unter torr

      Comment


      • #4
        Hallo Markus,

        Du hast doch jetzt Delphi 5. Und dort findest Du in der Unit <b>SYSUTILS.PAS</b> den folgenden Text:

        <i>{ The GetDiskFreeSpace Win32 API does not support partitions larger than 2GB
        under Win95. A new Win32 function, GetDiskFreeSpaceEx, supports partitions
        larger than 2GB but only exists on Win NT 4.0 and Win95 OSR2.
        The GetDiskFreeSpaceEx function pointer variable below will be initialized
        at startup to point to either the actual OS API function if it exists on
        the system, or to an internal Delphi function if it does not. When running
        on Win95 pre-OSR2, the output of this function will still be limited to
        the 2GB range reported by Win95, but at least you don't have to worry
        about which API function to call in code you write. }</i>
        <pre>
        var
        GetDiskFreeSpaceEx: function (Directory: PChar; var FreeAvailable,
        TotalSpace: TLargeInteger; TotalFree: PLargeInteger): Bool stdcall = nil;
        </pre>

        Das ist aber noch nicht alles, in dieser Unit hat Borland sogar einige Hilfsfunktionen geschrieben, über die diese API-Funktion sofort aufgerufen werden können:
        <pre>
        function InternalGetDiskSpace(Drive: Byte;
        var TotalSpace, FreeSpaceAvailable: Int64): Bool;
        var
        RootPath: array[0..4] of Char;
        RootPtr: PChar;
        begin
        RootPtr := nil;
        if Drive > 0 then
        begin
        RootPath[0] := Char(Drive + $40);
        RootPath[1] := ':';
        RootPath[2] := '\';
        RootPath[3] := #0;
        RootPtr := RootPath;
        end;
        Result := GetDiskFreeSpaceEx(RootPtr, FreeSpaceAvailable, TotalSpace, nil);
        end;

        function DiskFree(Drive: Byte): Int64;
        var
        TotalSpace: Int64;
        begin
        if not InternalGetDiskSpace(Drive, TotalSpace, Result) then
        Result := -1;
        end;

        function DiskSize(Drive: Byte): Int64;
        var
        FreeSpace: Int64;
        begin
        if not InternalGetDiskSpace(Drive, Result, FreeSpace) then
        Result := -1;
        end;
        </pre>

        Die Funktionen <b>DiskFree</b> und <b>DiskSize</b> können direkt vom eigenen Programm aufgerufen werden.

        P.S. Ich denke, das sich damit auch die Beantwortung der eMail erledigt hat ;-

        Comment


        • #5
          Ein Tipp: http://www.lfsoft.com gibt's die DelphiRom, die enthält auch umfangreiche Suchfunktionen ..

          Comment

          Working...
          X