Converting HDD Serial # VB6 code into VB.NET code

后端 未结 6 1635
花落未央
花落未央 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:22

    That's a lot of code to wade through for someone who doesn't understand the spoken language used in the comments.

    I will says this: Anywhere in that code you see the Type keyword you probably want to use Structure instead, the syntax used for Properties in .Net is a little different, function calls require parentheses, and VB.Net doesn't have an 'Any' type (maybe System.IntPtr instead? not sure).

    Most of the rest of the syntax in VB.Net is the same, and so you might have better luck making the fixes I've already mentioned and then addressing each error (or type of error) you get when building the resulting code individually.

提交回复
热议问题