of_getdiskspace


pfcapsrv.pbl   >   pfc_n_cst_filesrvsol2   >   of_getdiskspace   

Full name pfc_n_cst_filesrvsol2.of_getdiskspace
Access public
Extend of integer
Return value integer
Prototype public function integer of_getdiskspace(string,ref long,ref long)

Name Datatype
No Data

Name Datatype
ll_BytesPerSect long
ll_ClusterBytes long
ll_FreeClusters long
ll_SectPerCluster long
ll_TotalClusters long

public function integer of_getdiskspace (string as_drive, ref long al_totalspace, ref long al_freespace);//////////////////////////////////////////////////////////////////////////////
//	Public Function:  of_GetDiskSpace
//	Arguments:		as_Drive		The letter of the drive to be checked.
//						al_TotalSpace	The total number of bytes on the drive, passed by reference.
//						al_FreeSpace	The number of bytes free, passed by reference.
//	Returns:			Integer
//						1 if successful, -1 if an error occurrs.
//	Description:	Get space information about a drive.
//////////////////////////////////////////////////////////////////////////////
//	Rev. History:	Version
//						5.0.02   Initial version
// 					5.0.03	Changed argument datatype to string from char to fix polymorphism problem
//									with literals passed in.
//////////////////////////////////////////////////////////////////////////////
//	Copyright © 1996-1999 Sybase, Inc. and its subsidiaries.  All rights reserved.  Any distribution of the 
// PowerBuilder Foundation Classes (PFC) source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//////////////////////////////////////////////////////////////////////////////
long ll_SectPerCluster, ll_BytesPerSect, ll_FreeClusters, ll_TotalClusters, ll_ClusterBytes

If Not GetDiskFreeSpaceA(as_Drive, ll_SectPerCluster, ll_BytesPerSect, &
								 ll_FreeClusters, ll_TotalClusters) Then Return -1

ll_ClusterBytes = ll_SectPerCluster * ll_BytesPerSect
al_TotalSpace = ll_ClusterBytes * ll_TotalClusters
al_FreeSpace = ll_ClusterBytes * ll_FreeClusters

Return 1
end function

     
Name Owner
No Data

     
Name Owner
pfc_n_cst_filesrvsol2.GetDiskFreeSpaceA pfc_n_cst_filesrvsol2

     
Full name
No Data

     
Name Scope
No Data