GetDiskSerial DLL
Read the real factory serial number of the hard disk from any Windows application. GetDiskSerial DLL is a standard, self-contained DLL with no dependency on external runtime libraries — ideal for generating machine IDs, hardware fingerprints and copy-protection keys.

- Returns the real serial number — not the partition ID or volume ID.
- No administrator rights required on Windows XP/Vista/7/8/10/11.
- Also reads model number, revision, buffer size, cylinders, heads and sectors per track.
- Detects whether your code is running in a virtual machine.
Key features
- Easy to obtain the hard-disk serial number.
- Serial number cannot be changed by formatting or repartitioning.
- Supports reading multiple physical drives.
- Works from Delphi, C++Builder, C#, Visual C++, Visual Basic, VB.NET, PowerBuilder, Visual FoxPro, VBA and Clarion.
- Lightweight and dependency-free.
- Supports Windows XP, Vista, 7, 8/8.1, 10, 11 and later.
Screenshot
GetDiskSerial DLL in action, reading the serial number of a physical drive.
Supported languages & examples
Ready-made sample projects are included to get you started quickly:
Delphi
Native sample showing how to declare and call the DLL.
C# / VB.NET
P/Invoke declarations and a complete console sample.
C++ / Visual C++
Header + link example for MFC and native Win32 apps.
Visual Basic
Declare statement and usage for classic VB 6.
PowerBuilder
External function declaration example.
Visual FoxPro
DECLARE DLL sample for FoxPro applications.
Get the free trial
Try GetDiskSerial DLL in your own project today — no registration required.