I'm trying to do this in Visual Basic 6. I'm following, to the best of my understanding, how I'm supposed to use the DeviceIoControl API function, and I'm trying to use it with the IOCTL_STORAGE_QUERY_PROPERTY to retrieve info about my harddrive (this includes things like the serial number and the manufacturer ID and product ID). But it keeps giving me error 24, which is ERROR_BAD_LENGTH, according to the Microsoft documentation. I don't know what's wrong.
↧