diff options
| author | Skoland <Skoland> | 2017-01-22 01:19:59 +0100 |
|---|---|---|
| committer | Skoland <Skoland> | 2017-01-22 01:19:59 +0100 |
| commit | 7b7315005329266c26facb1885dc6483c081fabb (patch) | |
| tree | 8157eea1949a6cbcb1400b2d0addd0405e928ffe /win32_functions.cpp | |
| parent | 623d67999a96178da30cab427a2c675c1eccd2d0 (diff) | |
added hdid function(for win32)
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 + +} |
