I have the following method in QT:
QString getHDDSerial() {
DWORD dwVolSerial;
BOOL bIsRetrieved;
bIsRetrieved = GetVolumeInformation(L"C:\\", NULL, NULL, &dwVolSerial, NULL, NULL, NULL, NULL);
qDebug() << dwVolSerial;
if (bIsRetrieved) {
return dwVolSerial;
} else {
return "error";
}
}
How can I return the dwVolSerial as a QString?
I was able to get it done with this:
return QString::number(dwVolSerial);