Desktop Functions: Smart Device Functions:
|
GetVolumeInformation (kernel32)
C# Signature:[DllImport("Kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] extern static bool GetVolumeInformation(
string RootPathName, User-Defined Types:None. Notes:The VolumeSerialNumber is not optional with this signature!!! Tips & Tricks:Please add some! Sample Code:StringBuilder volname = new StringBuilder(256); StringBuilder fsname = new StringBuilder(256); uint sernum, maxlen, flags; if(!GetVolumeInformation("c:\\", volname.Capacity, out sernum, out maxlen, out flags, fsname, fsname.Capacity))
Marshal.ThrowExceptionForHR(Marshal.GetHRForLastWin32Error()); string volnamestr = volname.ToString(); string fsnamestr = fsname.ToString(); Alternative Managed API:Do you know one? Please contribute it! Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|