mystuff

Your IP Address is: 38.107.191.101
Last site update: 23 March 2009
You are visitor number: 

  home | wsname | wallpaper creator | delphi stuff | vb script stuff | other stuff | contact me

Google
Web Site
Here's a collection of Delphi functions I've found useful.

Network
   Using the DsGetDcName function to return the name of a domain controller in a specified domain
   Determine if the computer is a member of a Domain or Workgroup - Method 1: Using NetGetJoinInformation
   Determine if the computer is a member of a Domain or Workgroup - Method 2: Using NetRenameMachineInDomain

File System
   Determine what File System a Drive is Formatted with using GetVolumeInformation
   Get the Disk Label using GetVolumeInformation using GetVolumeInformation
   Get the Size of a File


 Get the Size of a File

function GetFileSizeEx( const filename: String ): int64;
  Var
    SRec: TSearchrec;
    converter: packed record
      case Boolean of
        false: ( n: int64 );
        true : ( low, high: DWORD );
      end;
  Begin
    If FindFirst( filename, faAnyfile, SRec ) = 0 Then Begin
      converter.low := SRec.FindData.nFileSizeLow;
      converter.high:= SRec.FindData.nFileSizeHigh;
      Result:= converter.n;
      FindClose( SRec );
    End
    Else
      Result := -1;
  End;