Unit tvAPIThing

tvAPIThing Primary Author: Tim Victor - tvictor@erols.com With the help of the following: Wolfgang Wendefeuer William A. Portillo Version History 1.00 17Aug1997 - Original 1.01 14Sep1997 - Added disk formatting/GlobalMemoryStatus/ExitWindows, with the input of Wolfgang Wendefeuer recoded the unit to minimize compiler warning and tips 1.1 11Nov1997 - Added properties to correspond to all fields in the SYSTEM_INFO structure. 1.2 26Dec1997 - Added Network dis/connection functions

Classes

TtvAPIThing - TFixedFileInfo

Functions

Register - DWORD WNetGetUniversalName( LPCTSTR lpLocalPath, // address of drive-based path for a network resource DWORD dwInfoLevel, // specifies form of universal name to be obtained LPVOID lpBuffer, // address of buffer that receives universal name data structure LPDWORD lpBufferSize // address of variable that specifies size of buffer );
SHFormatDrive -

Types

PFixedFileInfo
TDriveType
TFileTimeComparision
TFixedFileInfo
TInformationStrings
TTimeOfWhat
TVolumeInfo

Constants

PROCESSOR_ALPHA_21064
PROCESSOR_INTEL_386
PROCESSOR_INTEL_486
PROCESSOR_INTEL_PENTIUM
PROCESSOR_MIPS_R4000

Variables


Functions


procedure Register;

DWORD WNetGetUniversalName( LPCTSTR lpLocalPath, // address of drive-based path for a network resource DWORD dwInfoLevel, // specifies form of universal name to be obtained LPVOID lpBuffer, // address of buffer that receives universal name data structure LPDWORD lpBufferSize // address of variable that specifies size of buffer );

function SHFormatDrive(hWnd : HWND;Drive, fmtID, Options : WORD) : longint;


Types


PFixedFileInfo = ^TFixedFileInfo
TVolumeInfo
TDriveType = (dtUnknown, dtNoDrive, dtFloppy, dtFixed, dtNetwork, dtCDROM, dtRAM);

TFileTimeComparision = ( ftError, ftFileOneIsOlder, ftFileTimesAreEqual, ftFileTwoIsOlder );

TFixedFileInfo = record
dwSignature : DWORD;
dwStrucVersion : DWORD;
wFileVersionMS : WORD;
wFileVersionLS : WORD;
wProductVersionMS : WORD;
wProductVersionLS : WORD;
dwFileFlagsMask : DWORD;
dwFileFlags : DWORD;
dwFileOS : DWORD;
dwFileType : DWORD;
dwFileSubtype : DWORD;
dwFileDateMS : DWORD;
dwFileDateLS : DWORD;
end;

TInformationStrings = ( isCompanyName,  isFileDescription, isFileVersion,
                          isInternalName, isLegalCopyright,  isOriginalFilename,
                          isProductName,  isProductVersion,  isComments,
                          isLegalTrademarks );

TTimeOfWhat = ( ftCreationTime, ftLastAccessTime, ftLastWriteTime );

TVolumeInfo = record
Name : String;
SerialNumber : DWORD;
MaxComponentLength : DWORD;
FileSystemFlags : DWORD;
FileSystemName : String;
end;

Constants

PROCESSOR_ALPHA_21064 = 21064

PROCESSOR_INTEL_386 = 386

PROCESSOR_INTEL_486 = 486

PROCESSOR_INTEL_PENTIUM = 586

PROCESSOR_MIPS_R4000 = 4000


Variables