[Minifilter] Serial Number in IOCTL_STORAGE_QUERY_PROPERTY

What is the serial number returned in IOCTL_STORAGE_QUERY_PROPERTY, it does not seem to be the same as the serial number for some devices.

Where is this serial number stored? and will it change once i reformat the device?

Thanks.

So i checked on some other Usb devices as well and here is the result.

This is what i see :

C:\Windows\system32>wmic diskdrive get pnpdeviceid
PNPDeviceID
USBSTOR\DISK&VEN_SONY&PROD_STORAGE_MEDIA&REV_PMAP\5C3000637C2070A595&0
USBSTOR\DISK&VEN_BM&PROD_&REV_1.10\070007AA1F02CF40063F&0

And these are the serial numbers returned from my minifilter :

Serial Number found 57C03A050905
Serial Number found 070007AA1F02CF400630

So what is the serial number that my minifilter is returning?

OK so I just tested on my external harddisk and this is what i get from my device manager
575834314137363534565656

and from my minifilter:
WX41A7654VVV

it seems that the serial number in the device manager is hex representation of the serial number which i got from my minifilter

57 58 34 31 41 37 36 35 34 56 56 56
W X 4 1 A 7 6 5 4 V V V

so for some devices it is represented in Hex format while others is Char format?

I think calling a user application is the only solution at this point for me.

The request is propagated down the device stack. The first driver/filter that completes it reports some ID. This might not be a valid hardware ID in all cases.

Also, some devices do not have a unique hardware ID. If a unique ID is requested the driver provides a software generated ID. In case of USB devices this ID has the ‘&’ symbol.

@qwn
can you please tell me the logic of the conversion
57 58 34 31 41 37 36 35 34 56 56 56 <==> W X 4 1 A 7 6 5 4 V V V