Using system; using system.runtime.interopservices;
Namespace arli.commonprj {
#region how use this? / * string svol = getVol.getvolof ("c"); * / #ndregion
Public class getvol {
[DllImport ( "kernel32.dll")] private static extern int GetVolumeInformation (string lpRootPathName, string lpVolumeNameBuffer, int nVolumeNameSize, ref int lpVolumeSerialNumber, int lpMaximumComponentLength, int lpFileSystemFlags, string lpFileSystemNameBuffer, int nFileSystemNameSize);
Public Static String GetVolof (String DRVID) {const INT MAX_FILENAME_LEN = 256; int RETVAL = 0; INT A = 0; int b = 0; string str1 = null; string str2 = null;
INT i = GetVolumeInformation (drvid @ ": /", str1, max_filename_len, ref reledval, a, b, str2, max_filename_len;
Return RetVal.Tostring ("x");}}}