Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk Space on a Remote NT server

Status
Not open for further replies.

arouhi

Programmer
Jul 7, 2001
29
0
0
US
Is there any way that I can get the amount of Disk Space on a Remote NT server with-out using 2000/XP WMI or Network Mapped Drives?

-Thank You!
 
If you can use the UNC path you can use the API:

Public Declare Function GetDiskFreeSpace Lib "kernel32" Alias "GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, lpTtoalNumberOfClusters As Long) As Long

then for the lpRootPathName just use \\servername\c$
just setup long variable for the other parameters because they are all pointers that will return values.

You must have rights to the share to be able to do this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top