I would also like to check for free disk space (if this isn't possible then 
disk space used) on a server, using a share name (e.g. \\myServer\MyShare).  I 
think I'm safe to assume that all servers (that my app will run on and that 
it's monitoring) will be Windows Server 2003.

Hi,

have you tried using GetDiskFreeSpaceEx?
Docs say it should work...
Im using the following dllimport in one of my projects:

    [DllImport("Kernel32")]
    public static extern bool GetDiskFreeSpaceEx
    (
      string lpszPath,       // Must name a folder, must end with '\'.
      ref long lpFreeBytesAvailable,
      ref long lpTotalNumberOfBytes,
      ref long lpTotalNumberOfFreeBytes
    );


hth
ben

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to