| View previous topic :: View next topic |
| Author |
Message |
thomas Newbie
Joined: 15 Jan 2003 Posts: 23 Location: Germany
|
Posted: Tue May 11, 2004 10:28 am Post subject: free disc space on a Share |
|
|
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 |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Wed May 12, 2004 11:29 pm Post subject: |
|
|
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 |
|
 |
|