Skip to content

disk properties on Windows systems. It provides functionalities to fetch the serial number, model, and size of disk drives.

Notifications You must be signed in to change notification settings

dwep1337/DiskUtilsLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

DiskUtilsLib

DiskUtilsLib is a C++ mini library for retrieving disk properties on Windows systems, including serial number, model, and size.

Features

  • Retrieve Disk Serial Number
  • Retrieve Disk Model
  • Retrieve Disk Size

How to Download

  1. Clone the Repository: https://github.com/dwep1337/DiskUtilsLib.git

  2. Include the Header

    Add DiskUtilsLib.hpp to your project and include it in your source files:

    #include "DiskUtilsLib.hpp"

Usage Example

Here is a simple example of how to use the library to fetch disk properties:

#include <iostream>
#include "DiskUtilsLib.hpp"

int main() {
    std::wstring volumePath = L"\\\\.\\C:";  // Change this to the volume path you want to check, e.g., L"\\\\.\\D:"

    DiskPropertiesFetcher fetcher(volumePath);

    std::cout << "Serial Number: " << fetcher.DiskSerialNumber() << std::endl;
    std::cout << "Model: " << fetcher.DiskModel() << std::endl;
    std::cout << "Size: " << fetcher.DiskSize() << " GB" << std::endl;

    return 0;
}

About

disk properties on Windows systems. It provides functionalities to fetch the serial number, model, and size of disk drives.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages