forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


free disc space on a Share

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
thomas
Newbie


Joined: 15 Jan 2003
Posts: 23
Location: Germany

PostPosted: Tue May 11, 2004 10:28 am    Post subject: free disc space on a Share Reply with quote

Hello,

I want to know the free disc space on a Share. The Share is reachable by \\Server\Share. I do not want to map this share to get a drive letter.
Is this possible??

@volinfo(\\servername\share,f)
does not work.
Back to top
View user's profile Send private message
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Wed May 12, 2004 11:29 pm    Post subject: Reply with quote

I think you will have to use the GetDiskFreeSpaceEx API call:

Microsoft wrote:
BOOL GetDiskFreeSpaceEx(

LPCTSTR lpDirectoryName, // pointer to directory name on disk of interest
PULARGE_INTEGER lpFreeBytesAvailableToCaller, // pointer to variable to receive free bytes on disk available to the caller
PULARGE_INTEGER lpTotalNumberOfBytes, // pointer to variable to receive number of bytes on disk
PULARGE_INTEGER lpTotalNumberOfFreeBytes // pointer to variable to receive free bytes on disk
);


Since it states:

Microsoft wrote:
lpDirectoryName

Pointer to a null-terminated string that specifies a directory on the disk of interest. This string can be a UNC name.


The GetDiskFreeSpace does not state this, so that it probably wouldn't be possible using that
one.

Downside is:

Microsoft wrote:
The GetDiskFreeSpaceEx function is available on Windows 95 systems beginning with OEM Service Release 2 (OSR 2).


Unfortunately I have not enough time right now to try to write an example for calling the
API function.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group