Converting HDD Serial # VB6 code into VB.NET code

后端 未结 6 1626
花落未央
花落未央 2020-12-16 07:02

I\'ve got a cool piece of code taken from a VC++ project which gets complete information of the hard disk drive WITHOUT using WMI (since WMI has got its own problems) I ask

6条回答
  •  北海茫月
    2020-12-16 07:06

    Sorry I don't have time to convert it for you, but if nobody else comes up with the code, you could do worse than take a look at http://www.pinvoke.net. Your VB6 code has to call Windows API functions to do the work, and VB.NET code has to do the same. It will call the same API functions.

    For example, here is the page for DeviceIoControl.

    But if you wait long enough, somebody else might just have the code to hand :-)

提交回复
热议问题