GetVolumeInformation = windll.kernel32.GetVolumeInformationW
LPDWORD = POINTER(DWORD)
GetVolumeInformation.restype = BOOL
GetVolumeInformation.argtypes = LPWSTR, LPWSTR, DWORD, LPDWORD, LPDWORD, LPDWORD, LPWSTR, DWORD
volumeNameBuffer = create_unicode_buffer(1024)
volumeSerialNumber = DWORD()
maximumComponentLenght = DWORD()
fileSystemFlags = DWORD()
fileSystemNameBuffer = create_unicode_buffer(1024)
ret = GetVolumeInformation(u'c:\\', volumeNameBuffer, 1024, byref(volumeSerialNumber), byref(maximumComponentLenght), byref(fileSystemFlags), fileSystemNameBuffer, 1024)
if ret:
print("============================================== ")
print("For disk C - <> = "+format(volumeSerialNumber.value, '08X')+" ("+str(volumeSerialNumber.value)+")")
#print "Volume name = ", volumeNameBuffer.value
#print "Max component lenght = ", maximumComponentLenght.value
#print "Filesystem name = ", fileSystemNameBuffer.value
else:
print("Error in GetVolumeInformation")
exit()
Код выдает 4 числа тире 4 числа имеено так?