How can I find the Harddisk Device Serial Number without using the WMI in .NET?

后端 未结 6 1637
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-11 20:22

I want to get the hardwired serial number from the hard disk but NOT using WMI. I tried using WMI code, and it doesn\'t work on my machine for sure. So is there any alternat

6条回答
  •  鱼传尺愫
    2020-12-11 20:54

    You can use the:

    GetVolumeInformation

    Win32 API function to get this information, if you must avoid WMI. The linked page gives full the declaration signature (in both VB & C#) for the API function along with sample code.

提交回复
热议问题