diff options
Diffstat (limited to 'win32_functions.cpp')
| -rw-r--r-- | win32_functions.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/win32_functions.cpp b/win32_functions.cpp new file mode 100644 index 0000000..76ca18a --- /dev/null +++ b/win32_functions.cpp @@ -0,0 +1,15 @@ +#include "win32_functions.h" + +DWORD dwVolSerial; +BOOL bIsRetrieved; + +QString get_hdid() +{ + bIsRetrieved = GetVolumeInformation(TEXT("C:\\"), NULL, NULL, &dwVolSerial, NULL, NULL, NULL, NULL); + + if (bIsRetrieved) + return QString::number(dwVolSerial, 16); + else + return "invalidhd"; //what could possibly go wrong + +} |
