@“Peter_Viscarola_(OSR)” thank you and sorry for the mistake
@Tim_Roberts said:
Nikhil_V_S wrote:
But for some of device its not work correctly.
example
while checking with the device having pnp id=USBSTOR\DISK&VEN_KINGSTON&PROD_DATATRAVELER_2.0&REV_1.00\60A44C413BF2F0718628B8E0&0
we are getting the serial no ‘0’
but checking with other tool (USBDeview) it showing serial as 60A44C413BF2F0718628B8E0
why its happen?
You haven’t provided nearly enough information. Is this code in an
application or in a driver, and if a driver, what kind? Where is the
code you used to fetch the structure? Have you dumped the whole
structure to see if the other parts look reasonable? Are you using the
normal include files, or have you copied the struct definition into your
own code?
And, by the way, this code is wrong:
if(pszStart != ANSI_NULL)
You’re trying to find out of the string is empty. That means you need
to check the first character, not the ADDRESS of the first character:
if(pszStart[0] != ANSI_NULL )
@Tim_Roberts said:
Nikhil_V_S wrote:
But for some of device its not work correctly.
example
while checking with the device having pnp id=USBSTOR\DISK&VEN_KINGSTON&PROD_DATATRAVELER_2.0&REV_1.00\60A44C413BF2F0718628B8E0&0
we are getting the serial no ‘0’
but checking with other tool (USBDeview) it showing serial as 60A44C413BF2F0718628B8E0
why its happen?
You haven’t provided nearly enough information. Is this code in an
application or in a driver, and if a driver, what kind? Where is the
code you used to fetch the structure? Have you dumped the whole
structure to see if the other parts look reasonable? Are you using the
normal include files, or have you copied the struct definition into your
own code?
And, by the way, this code is wrong:
if(pszStart != ANSI_NULL)
You’re trying to find out of the string is empty. That means you need
to check the first character, not the ADDRESS of the first character:
if(pszStart[0] != ANSI_NULL )
@Tim_Roberts said:
Nikhil_V_S wrote:
But for some of device its not work correctly.
example
while checking with the device having pnp id=USBSTOR\DISK&VEN_KINGSTON&PROD_DATATRAVELER_2.0&REV_1.00\60A44C413BF2F0718628B8E0&0
we are getting the serial no ‘0’
but checking with other tool (USBDeview) it showing serial as 60A44C413BF2F0718628B8E0
why its happen?
You haven’t provided nearly enough information. Is this code in an
application or in a driver, and if a driver, what kind? Where is the
code you used to fetch the structure? Have you dumped the whole
structure to see if the other parts look reasonable? Are you using the
normal include files, or have you copied the struct definition into your
own code?
And, by the way, this code is wrong:
if(pszStart != ANSI_NULL)
You’re trying to find out of the string is empty. That means you need
to check the first character, not the ADDRESS of the first character:
if(pszStart[0] != ANSI_NULL )