mystuff

Your IP Address is: 38.107.191.103
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


 Determine what File System a Drive is Formatted with using GetVolumeInformation

This function will return the File System type, FAT, FAT32, NTFS etc. Pass the drive letter as input

eg: ShowMessage(GetDriveFormat('c:')); 

function GetDriveFormat(sDrive : string):string;
  var
    pFSBuf, pVolName : PChar;
    nVNameSer : PDWORD;
    FSSysFlags, maxCmpLen : DWord;
  begin
    result:='';
    GetMem(pVolName, MAX_PATH);
    GetMem(pFSBuf, MAX_PATH);
    GetMem(nVNameSer, MAX_PATH);
    Try
      GetVolumeInformation(PChar(Copy(sDrive,1,1) + ':\'), pVolName, MAX_PATH, nVNameSer,maxCmpLen, FSSysFlags, pFSBuf, MAX_PATH);
      result:=StrPas(pFSBuf);
    Finally
    End;
    FreeMem(pVolName, MAX_PATH);
    FreeMem(pFSBuf, MAX_PATH);
    FreeMem(nVNameSer, MAX_PATH);
  end;