Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Upcoming OSR Seminars:

Writing WDF Drivers I: Core Concepts, Nashua, NH 15-19 May, 2017
Writing WDF Drivers II: Advanced Implementation Tech., Nashua, NH 23-26 May, 2017
Kernel Debugging and Crash Analysis, Dulles, VA 26-30 June, 2017
Windows Internals & Software Driver Development, Nashua, NH 24-28 July, 2017


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 25  
29 Mar 06 17:39
ntdev member 26546
xxxxxx@yahoo.com
Join Date:
Posts To This List: 53
How to extract a device or driver's name?

Hi All, I am trying to extract a name of the device or the driver from typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { DWORD cbSize; CHAR DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A defined in DDK. Can somebody please tell me how to extract the name as this structure doesn't have the name field. It gives the DevicePath but not device name. Thanks, Harsha --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. --
  Message 2 of 25  
29 Mar 06 18:19
ntdev member 8437
xxxxxx@windows.microsoft.com
Join Date:
Posts To This List: 1404
How to extract a device or driver's name?

what do you mean by device name? -p ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Wednesday, March 29, 2006 2:39 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to extract a device or driver's name? Hi All, I am trying to extract a name of the device or the driver from typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { DWORD cbSize; CHAR DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A defined in DDK. Can somebody please tell me how to extract the name as this structure doesn't have the name field. It gives the DevicePath but not device name. Thanks, Harsha ________________________________ Yahoo! Messenger with Voice. <http://us.rd.yahoo.com/mail_us/taglines/postman3/*http://us.rd.yahoo.co m/evt=39666/*http://beta.messenger.yahoo.com> PC-to-Phone calls for ridiculously low rates. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 3 of 25  
30 Mar 06 14:13
ntdev member 26546
xxxxxx@yahoo.com
Join Date:
Posts To This List: 53
How to extract a device or driver's name?

I mean the name of the USB device shown in device manager. Peter Wieland <xxxxx@windows.microsoft.com> wrote: what do you mean by device name? -p --------------------------------- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Wednesday, March 29, 2006 2:39 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to extract a device or driver's name? Hi All, I am trying to extract a name of the device or the driver from typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { DWORD cbSize; CHAR DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A defined in DDK. Can somebody please tell me how to extract the name as this structure doesn't have the name field. It gives the DevicePath but not device name. Thanks, Harsha --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1&cent;/min. --
  Message 4 of 25  
30 Mar 06 14:25
ntdev member 27474
xxxxxx@stonestreetone.com
Join Date:
Posts To This List: 5
How to extract a device or driver's name?

Do you mean the name that is associated with the device in the INF? _____ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Thursday, March 30, 2006 11:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I mean the name of the USB device shown in device manager. Peter Wieland <xxxxx@windows.microsoft.com> wrote: what do you mean by device name? -p _____ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Wednesday, March 29, 2006 2:39 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to extract a device or driver's name? Hi All, I am trying to extract a name of the device or the driver from typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { DWORD cbSize; CHAR DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A defined in DDK. Can somebody please tell me how to extract the name as this structure doesn't have the name field. It gives the DevicePath but not device name. Thanks, Harsha _____ Yahoo! <http://us.rd.yahoo.com/mail_us/taglines/postman3/*http:/us.rd.yahoo.com/evt =39666/*http:/beta.messenger.yahoo.com> Messenger with Voice. PC-to-Phone calls for ridiculously low rates. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer _____ Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great <http://us.rd.yahoo.com/mail_us/taglines/postman7/*http:/us.rd.yahoo.com/evt =39666/*http:/beta.messenger.yahoo.com> rates starting at 1?/min. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 5 of 25  
30 Mar 06 14:28
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10031
How to extract a device or driver's name?

SetupDiGetDeviceRegistryProperty with a property of SPDRP_FRIENDLYNAME. = If that fails, use the SPDRP_DEVICEDESC property. d ________________________________________ From: xxxxx@lists.osr.com = [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Thursday, March 30, 2006 11:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I mean the name of the USB device shown in device manager. Peter Wieland <xxxxx@windows.microsoft.com> wrote:=20 what do you mean by device name? =A0 -p ________________________________________ From: xxxxx@lists.osr.com = [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Wednesday, March 29, 2006 2:39 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to extract a device or driver's name? Hi All, =A0 I am trying to extract a name of the device or the driver from=20 typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { =A0=A0=A0 DWORD=A0 cbSize; =A0=A0=A0 CHAR=A0=A0 DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A =A0 defined in DDK. =A0 Can somebody please tell me how to extract the name as this structure = doesn't have the name field. It gives the DevicePath but not device = name. =A0 Thanks, Harsha ________________________________________ Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low = rates. --- Questions? First check the Kernel Driver FAQ at = http://www.osronline.com/article.cfm?id=3D256 To unsubscribe, visit the = List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer ---=20 Questions? First check the Kernel Driver FAQ at = http://www.osronline.com/article.cfm?id=3D256=20 To unsubscribe, visit the List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer=20 ________________________________________ Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great = rates starting at 1=A2/min. --- Questions? First check the Kernel Driver = FAQ at http://www.osronline.com/article.cfm?id=3D256 To unsubscribe, = visit the List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer
  Message 6 of 25  
30 Mar 06 15:26
ntdev member 26546
xxxxxx@yahoo.com
Join Date:
Posts To This List: 53
How to extract a device or driver's name?

Yes. Randal Erman <xxxxx@stonestreetone.com> wrote: v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Do you mean the name that is associated with the device in the INF? --------------------------------- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Thursday, March 30, 2006 11:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I mean the name of the USB device shown in device manager. Peter Wieland <xxxxx@windows.microsoft.com> wrote: what do you mean by device name? -p --------------------------------- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Wednesday, March 29, 2006 2:39 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to extract a device or driver's name? Hi All, I am trying to extract a name of the device or the driver from typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { DWORD cbSize; CHAR DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A defined in DDK. Can somebody please tell me how to extract the name as this structure doesn't have the name field. It gives the DevicePath but not device name. Thanks, Harsha --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --------------------------------- Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. --
  Message 7 of 25  
31 Mar 06 13:13
ntdev member 26546
xxxxxx@yahoo.com
Join Date:
Posts To This List: 53
How to extract a device or driver's name?

Hi, Thank you. I used first SPDRP_FRIENDLYNAME property & then SPDRP_DEVICEDESC but both of them didn't extract any data. Any suggestions? These are the parameters: DWORD *dwRegType; SetupDiGetDeviceRegistryProperty(pHeader->hDevInfo, &pHeader->pInfo[i].DeviceInfoData, SPDRP_DEVICEDESC, dwRegType, (BYTE*) szFriendlyName, 2096, NULL); Thanks, Harsha Doron Holan <xxxxx@microsoft.com> wrote: SetupDiGetDeviceRegistryProperty with a property of SPDRP_FRIENDLYNAME. If that fails, use the SPDRP_DEVICEDESC property. d ________________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Thursday, March 30, 2006 11:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I mean the name of the USB device shown in device manager. Peter Wieland wrote: what do you mean by device name? -p ________________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Wednesday, March 29, 2006 2:39 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to extract a device or driver's name? Hi All, I am trying to extract a name of the device or the driver from typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { DWORD cbSize; CHAR DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A defined in DDK. Can somebody please tell me how to extract the name as this structure doesn't have the name field. It gives the DevicePath but not device name. Thanks, Harsha ________________________________________ Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer ________________________________________ Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --------------------------------- New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. --
  Message 8 of 25  
31 Mar 06 13:50
ntdev member 8437
xxxxxx@windows.microsoft.com
Join Date:
Posts To This List: 1404
How to extract a device or driver's name?

what did you get? Error? zero data? -p ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 10:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Hi, Thank you. I used first SPDRP_FRIENDLYNAME property & then SPDRP_DEVICEDESC but both of them didn't extract any data. Any suggestions? These are the parameters: DWORD *dwRegType; SetupDiGetDeviceRegistryProperty(pHeader->hDevInfo, &pHeader->pInfo[i].DeviceInfoData, SPDRP_DEVICEDESC, dwRegType, (BYTE*) szFriendlyName, 2096, NULL); Thanks, Harsha Doron Holan <xxxxx@microsoft.com> wrote: SetupDiGetDeviceRegistryProperty with a property of SPDRP_FRIENDLYNAME. If that fails, use the SPDRP_DEVICEDESC property. d ________________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Thursday, March 30, 2006 11:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I mean the name of the USB device shown in device manager. Peter Wieland wrote: what do you mean by device name? -p ________________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Wednesday, March 29, 2006 2:39 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to extract a device or driver's name? Hi All, I am trying to extract a name of the device or the driver from typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { DWORD cbSize; CHAR DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A defined in DDK. Can somebody please tell me how to extract the name as this structure doesn't have the name field. It gives the DevicePath but not device name. Thanks, Harsha ________________________________________ Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer ________________________________________ Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer ________________________________ New Yahoo! Messenger with Voice. Call regular phones from your PC <http://us.rd.yahoo.com/mail_us/taglines/postman6/*http://us.rd.yahoo.com/evt=396 63/*http://voice.yahoo.com> and save big. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --
  Message 9 of 25  
31 Mar 06 13:58
ntdev member 26546
xxxxxx@yahoo.com
Join Date:
Posts To This List: 53
How to extract a device or driver's name?

I just got nothing. I am trying to extract this data in MFC app in a combo box, but combo box is empty. Thanks, Harsha Peter Wieland <xxxxx@windows.microsoft.com> wrote: what did you get? Error? zero data? -p --------------------------------- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 10:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Hi, Thank you. I used first SPDRP_FRIENDLYNAME property & then SPDRP_DEVICEDESC but both of them didn't extract any data. Any suggestions? These are the parameters: DWORD *dwRegType; SetupDiGetDeviceRegistryProperty(pHeader->hDevInfo, &pHeader->pInfo[i].DeviceInfoData, SPDRP_DEVICEDESC, dwRegType, (BYTE*) szFriendlyName, 2096, NULL); Thanks, Harsha Doron Holan <xxxxx@microsoft.com> wrote: SetupDiGetDeviceRegistryProperty with a property of SPDRP_FRIENDLYNAME. If that fails, use the SPDRP_DEVICEDESC property. d ________________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Thursday, March 30, 2006 11:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I mean the name of the USB device shown in device manager. Peter Wieland wrote: what do you mean by device name? -p ________________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Wednesday, March 29, 2006 2:39 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to extract a device or driver's name? Hi All, I am trying to extract a name of the device or the driver from typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { DWORD cbSize; CHAR DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A defined in DDK. Can somebody please tell me how to extract the name as this structure doesn't have the name field. It gives the DevicePath but not device name. Thanks, Harsha ________________________________________ Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer ________________________________________ Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --------------------------------- New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --------------------------------- Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1&cent;/min. --
  Message 10 of 25  
31 Mar 06 14:16
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10031
How to extract a device or driver's name?

What did SetupDiGetDeviceRegistryProperty return? TRUE or FALSE? ________________________________________ From: xxxxx@lists.osr.com = [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 10:58 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I just got nothing. I am trying to extract this data in MFC app in a = combo box, but combo box is empty. =A0 Thanks, Harsha Peter Wieland <xxxxx@windows.microsoft.com> wrote: what did you get?=A0 Error?=A0 zero data? =A0 -p ________________________________________ From: xxxxx@lists.osr.com = [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 10:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Hi, =A0 Thank you. I used first SPDRP_FRIENDLYNAME property & then = SPDRP_DEVICEDESC but both of them didn't extract any data. =A0 Any suggestions? These are=A0the parameters: =A0 DWORD *dwRegType; =A0 SetupDiGetDeviceRegistryProperty(pHeader->hDevInfo, =A0=A0=A0=A0=A0=A0 &pHeader->pInfo[i].DeviceInfoData, =A0=A0=A0=A0=A0=A0=A0=A0SPDRP_DEVICEDESC, =A0=A0=A0=A0=A0=A0=A0=A0 dwRegType, =A0=A0=A0=A0=A0(BYTE*) szFriendlyName, =A0=A0=A0=A0=A0=A0=A0=A0=A0 2096, =A0=A0=A0=A0=A0=A0=A0=A0=A0 NULL); =A0 Thanks, Harsha Doron Holan <xxxxx@microsoft.com> wrote: SetupDiGetDeviceRegistryProperty with a property of SPDRP_FRIENDLYNAME. = If that fails, use the SPDRP_DEVICEDESC property. d ________________________________________ From: xxxxx@lists.osr.com = [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Thursday, March 30, 2006 11:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I mean the name of the USB device shown in device manager. Peter Wieland wrote:=20 what do you mean by device name? =A0 -p ________________________________________ From: xxxxx@lists.osr.com = [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Wednesday, March 29, 2006 2:39 PM To: Windows System Software Devs Interest List Subject: [ntdev] How to extract a device or driver's name? Hi All, =A0 I am trying to extract a name of the device or the driver from=20 typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { =A0=A0=A0 DWORD=A0 cbSize; =A0=A0=A0 CHAR=A0=A0 DevicePath[ANYSIZE_ARRAY]; } SP_DEVICE_INTERFACE_DETAIL_DATA_A =A0 defined in DDK. =A0 Can somebody please tell me how to extract the name as this structure = doesn't have the name field. It gives the DevicePath but not device = name. =A0 Thanks, Harsha ________________________________________ Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low = rates. --- Questions? First check the Kernel Driver FAQ at = http://www.osronline.com/article.cfm?id=3D256 To unsubscribe, visit the = List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer ---=20 Questions? First check the Kernel Driver FAQ at = http://www.osronline.com/article.cfm?id=3D256=20 To unsubscribe, visit the List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer=20 ________________________________________ Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great = rates starting at 1=A2/min. --- Questions? First check the Kernel Driver = FAQ at http://www.osronline.com/article.cfm?id=3D256 To unsubscribe, = visit the List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer --- Questions? First check the Kernel Driver FAQ at = http://www.osronline.com/article.cfm?id=3D256 To unsubscribe, visit the List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer ________________________________________ New Yahoo! Messenger with Voice. Call regular phones from your PC and = save big. --- Questions? First check the Kernel Driver FAQ at = http://www.osronline.com/article.cfm?id=3D256 To unsubscribe, visit the = List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer ---=20 Questions? First check the Kernel Driver FAQ at = http://www.osronline.com/article.cfm?id=3D256=20 To unsubscribe, visit the List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer=20 ________________________________________ Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great = rates starting at 1=A2/min. --- Questions? First check the Kernel Driver = FAQ at http://www.osronline.com/article.cfm?id=3D256 To unsubscribe, = visit the List Server section of OSR Online at = http://www.osronline.com/page.cfm?name=3DListServer
  Message 11 of 25  
31 Mar 06 14:24
ntdev member 25850
xxxxxx@stonestreetone.com
Join Date:
Posts To This List: 207
How to extract a device or driver's name?

"I just got nothing" is user talk. Talk like a programmer. Run your app in a debugger, set a breakpoint after the call to SetupDiGetDeviceRegistryProperty. Then examine the variables that were returned to you, the return value of SetupDiGetDeviceRegistryProperty, and if the return value is FALSE, then also evaluate GetLastError(). If these values don't show you what the problem is, then post the values to the list, and we will try to help you. Judging from the code you have posted, you are not checking the return value of the function. You must do this. If the function returns FALSE, then it has failed, and the contents of the return buffer (szFriendlyName) are undefined. (The buffer may have been overwritten, or it may not, or it may contain "GREEN CHEESE" over and over.) If you are not checking the return value, you are simply not programming, only stumbling in the dark. If you are checking the return value, and it is FALSE, then what is the value of GetLastError()? Also note that you've committed a very basic programming error. You are passing an uninitialized pointer to SetupDiGetDeviceRegistryProperty, specifically dwRegType. dwRegType needs to be a local variable of type DWORD, NOT "DWORD*". "DWORD*" is a pointer to a DWORD, but you have not initialized the pointer. When your code calls SetupDiGetDeviceRegistryProperty, it will pass stack noise as the pointer to the registry type, and SetupDiGetDeviceRegistryProperty will then store the registry type of the property in a random pointer. This will cause mysterious errors and crashes that are difficult to predict or discover. Instead, declare the variable as "DWORD dwRegType;" and pass "&dwRegType" to SetupDiGetDeviceRegistryProperty. This is a basic C issue. -- arlie ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 1:58 PM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I just got nothing. I am trying to extract this data in MFC app in a combo box, but combo box is empty. Thanks, Harsha Peter Wieland <xxxxx@windows.microsoft.com> wrote: what did you get? Error? zero data? -p ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 10:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Hi, Thank you. I used first SPDRP_FRIENDLYNAME property & then SPDRP_DEVICEDESC but both of them didn't extract any data. Any suggestions? These are the parameters: DWORD *dwRegType; SetupDiGetDeviceRegistryProperty(pHeader->hDevInfo, &pHeader->pInfo[i].DeviceInfoData, SPDRP_DEVICEDESC, dwRegType, (BYTE*) szFriendlyName, 2096, NULL); Thanks, Harsha
  Message 12 of 25  
31 Mar 06 15:06
ntdev member 26546
xxxxxx@yahoo.com
Join Date:
Posts To This List: 53
How to extract a device or driver's name?

Thanks Arlie for your detailed email. Here is my code: BOOL Value; for(i=0;i<pHeader->nInfo;i++) { memset(szFriendlyName, 0, 2096); Value = SetupDiGetDeviceRegistryProperty(pHeader->hDevInfo, &pHeader->pInfo[i].DeviceInfoData, SPDRP_DEVICEDESC, &dwRegType, (PBYTE)szFriendlyName, 2096, NULL); if(Value) { CString s((PBYTE)szFriendlyName); combo1.AddString(s); edit = "TRUE"; } else if(Value == FALSE) { Err1 = GetLastError(); edit = Err1; //This is the edit box I have created to display the error value. } But unfortunately I don't see any value in the edit box. I don't know the reason. Thank you. Harsha Arlie Davis <xxxxx@stonestreetone.com> wrote: "I just got nothing" is user talk. Talk like a programmer. Run your app in a debugger, set a breakpoint after the call to SetupDiGetDeviceRegistryProperty. Then examine the variables that were returned to you, the return value of SetupDiGetDeviceRegistryProperty, and if the return value is FALSE, then also evaluate GetLastError(). If these values don't show you what the problem is, then post the values to the list, and we will try to help you. Judging from the code you have posted, you are not checking the return value of the function. You must do this. If the function returns FALSE, then it has failed, and the contents of the return buffer (szFriendlyName) are undefined. (The buffer may have been overwritten, or it may not, or it may contain "GREEN CHEESE" over and over.) If you are not checking the return value, you are simply not programming, only stumbling in the dark. If you are checking the return value, and it is FALSE, then what is the value of GetLastError()? Also note that you've committed a very basic programming error. You are passing an uninitialized pointer to SetupDiGetDeviceRegistryProperty, specifically dwRegType. dwRegType needs to be a local variable of type DWORD, NOT "DWORD*". "DWORD*" is a pointer to a DWORD, but you have not initialized the pointer. When your code calls SetupDiGetDeviceRegistryProperty, it will pass stack noise as the pointer to the registry type, and SetupDiGetDeviceRegistryProperty will then store the registry type of the property in a random pointer. This will cause mysterious errors and crashes that are difficult to predict or discover. Instead, declare the variable as "DWORD dwRegType;" and pass "&dwRegType" to SetupDiGetDeviceRegistryProperty. This is a basic C issue. -- arlie ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 1:58 PM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? I just got nothing. I am trying to extract this data in MFC app in a combo box, but combo box is empty. Thanks, Harsha Peter Wieland wrote: what did you get? Error? zero data? -p ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 10:13 AM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Hi, Thank you. I used first SPDRP_FRIENDLYNAME property & then SPDRP_DEVICEDESC but both of them didn't extract any data. Any suggestions? These are the parameters: DWORD *dwRegType; SetupDiGetDeviceRegistryProperty(pHeader->hDevInfo, &pHeader->pInfo[i].DeviceInfoData, SPDRP_DEVICEDESC, dwRegType, (BYTE*) szFriendlyName, 2096, NULL); Thanks, Harsha --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --------------------------------- New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates. --
  Message 13 of 25  
31 Mar 06 15:27
ntdev member 25850
xxxxxx@stonestreetone.com
Join Date:
Posts To This List: 207
How to extract a device or driver's name?

You didn't take my advice or Doron's. Stop looking at the edit box -- it is clearly not giving you any useful information. Look at the code, and use a debugger. Step through the code with a debugger, and examine the values of the variables. The code you have posted is incomplete. You *still* haven't said whether SetupDiGetDeviceRegistryProperty returns TRUE or FALSE. You also have not specified what the value of dwRegType is on return. You may not be handling ANSI/UNICODE translation correctly. Are you compiling with #define UNICODE / #define _UNICODE? What is the type of szFriendlyName? If it is TCHAR, or CHAR, or WCHAR, or whatever, you're coercing its type in the call to the CString constructor. If you are compiling with #define UNICODE / _UNICODE, then SetupDi* is returning a Unicode string into szFriendlyName, and the wrong CString constructor is being called, and Unicode characters are incorrectly being interpreted as ANSI. We can only help you so much -- at a certain level, you have to do the work. This is basic C programming, not rocket science. -- arlie ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 3:06 PM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Thanks Arlie for your detailed email. Here is my code: BOOL Value; for(i=0;i<pHeader->nInfo;i++) { memset(szFriendlyName, 0, 2096); Value = SetupDiGetDeviceRegistryProperty(pHeader->hDevInfo, &pHeader->pInfo[i].DeviceInfoData, SPDRP_DEVICEDESC, &dwRegType, (PBYTE)szFriendlyName, 2096, NULL); if(Value) { CString s((PBYTE)szFriendlyName); combo1.AddString(s); edit = "TRUE"; } else if(Value == FALSE) { Err1 = GetLastError(); edit = Err1; //This is the edit box I have created to display the error value. } But unfortunately I don't see any value in the edit box. I don't know the reason. Thank you. Harsha
  Message 14 of 25  
31 Mar 06 15:42
ntdev member 26546
xxxxxx@yahoo.com
Join Date:
Posts To This List: 53
How to extract a device or driver's name?

Thanks Arlie. I will take a look at all the points you have mentioned & reply you. Sorry for my lack of knowledge. Thanks, Harsha Arlie Davis <xxxxx@stonestreetone.com> wrote: You didn't take my advice or Doron's. Stop looking at the edit box -- it is clearly not giving you any useful information. Look at the code, and use a debugger. Step through the code with a debugger, and examine the values of the variables. The code you have posted is incomplete. You *still* haven't said whether SetupDiGetDeviceRegistryProperty returns TRUE or FALSE. You also have not specified what the value of dwRegType is on return. You may not be handling ANSI/UNICODE translation correctly. Are you compiling with #define UNICODE / #define _UNICODE? What is the type of szFriendlyName? If it is TCHAR, or CHAR, or WCHAR, or whatever, you're coercing its type in the call to the CString constructor. If you are compiling with #define UNICODE / _UNICODE, then SetupDi* is returning a Unicode string into szFriendlyName, and the wrong CString constructor is being called, and Unicode characters are incorrectly being interpreted as ANSI. We can only help you so much -- at a certain level, you have to do the work. This is basic C programming, not rocket science. -- arlie ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 3:06 PM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Thanks Arlie for your detailed email. Here is my code: BOOL Value; for(i=0;i nInfo;i++) { memset(szFriendlyName, 0, 2096); Value = SetupDiGetDeviceRegistryProperty(pHeader->hDevInfo, &pHeader->pInfo[i].DeviceInfoData, SPDRP_DEVICEDESC, &dwRegType, (PBYTE)szFriendlyName, 2096, NULL); if(Value) { CString s((PBYTE)szFriendlyName); combo1.AddString(s); edit = "TRUE"; } else if(Value == FALSE) { Err1 = GetLastError(); edit = Err1; //This is the edit box I have created to display the error value. } But unfortunately I don't see any value in the edit box. I don't know the reason. Thank you. Harsha --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. --
  Message 15 of 25  
31 Mar 06 15:52
ntdev member 25850
xxxxxx@stonestreetone.com
Join Date:
Posts To This List: 207
How to extract a device or driver's name?

It's not the lack of knowledge, but of effort. Just investigate the problem further first, with the tools in front of you, and you'll probably find the problem. ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 3:42 PM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Thanks Arlie. I will take a look at all the points you have mentioned & reply you. Sorry for my lack of knowledge. Thanks, Harsha
  Message 16 of 25  
31 Mar 06 16:24
ntdev member 26546
xxxxxx@yahoo.com
Join Date:
Posts To This List: 53
How to extract a device or driver's name?

Hi Arlie, Thank you so much for your guidance. I am able to extract the name. I commented out the following sentence & it worked. memset(szFriendlyName, 0, 2096); But before that I made sure that the Value was TRUE using the debugger. But I wanted to know one thing. I am not sure whether I am compiling with #define UNICODE/ _UNICODE. How to find that out? Also if that is the case how to convert from char [] to string? In this case I used char szFriendlyName[]. Thank you again for your help. Harsha Arlie Davis <xxxxx@stonestreetone.com> wrote: It's not the lack of knowledge, but of effort. Just investigate the problem further first, with the tools in front of you, and you'll probably find the problem. ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 3:42 PM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Thanks Arlie. I will take a look at all the points you have mentioned & reply you. Sorry for my lack of knowledge. Thanks, Harsha --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer --------------------------------- How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates. --
  Message 17 of 25  
01 Apr 06 01:08
David J. Craig
xxxxxx@yoshimuni.com
Join Date:
Posts To This List: 1128
How to extract a device or driver's name?

I would suggest you try reading some documentation about the compiler. MSDN Library contains a lot of what you need. Define 'string' and how it differs from char[]. "Harsha Inamdar" <xxxxx@yahoo.com> wrote in message news:76852@ntdev... Hi Arlie, Thank you so much for your guidance. I am able to extract the name. I commented out the following sentence & it worked. memset(szFriendlyName, 0, 2096); But before that I made sure that the Value was TRUE using the debugger. But I wanted to know one thing. I am not sure whether I am compiling with #define UNICODE/ _UNICODE. How to find that out? Also if that is the case how to convert from char [] to string? In this case I used char szFriendlyName[]. Thank you again for your help. Harsha Arlie Davis <xxxxx@stonestreetone.com> wrote: It's not the lack of knowledge, but of effort. Just investigate the problem further first, with the tools in front of you, and you'll probably find the problem. ________________________________ From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha Inamdar Sent: Friday, March 31, 2006 3:42 PM To: Windows System Software Devs Interest List Subject: RE: [ntdev] How to extract a device or driver's name? Thanks Arlie. I will take a look at all the points you have mentioned & reply you. Sorry for my lack of knowledge. Thanks, Harsha --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer ------------------------------------------------------------------------------ How low will we go? Check out Yahoo! Messenger's low PC-to-Phone call rates. --
  Message 18 of 25  
02 Apr 06 03:34
ntdev member 27653
xxxxxx@ca.com
Join Date:
Posts To This List: 39
How to extract a device or driver's name?

As for me, I don't like SetupDI* interface and in the same situation prefer looking for appropriate data in the registry directly. All data which SetupDI* may give you are in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\.... Regards, Michael.
  Message 19 of 25  
02 Apr 06 19:05
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10031
How to extract a device or driver's name?

Programming is hard. Plain and simple. Some problems are simple, some are hard. Some APIs you like, some you don't. Going behind the back of those APIs and getting at the data yourself will only cause problems for you and your customers. =20 Yes, right now device data is stored under the Enum key. That doesn't mean it will be there in the future (very likely it won't be). Right now you have access to the Enum key today doesn't mean you will have access to it tomorrow (very likely it will be restricted down much tighter). Right now your code works b/c you are running as an admin, the APIs can provide read access for lower rights users. To get at device specific data, you need the instance path. The only generic way I know of getting that path is through setupdi. You can hard code values all you want, but that is not portable across machines. In the end, just use the API provided for you. It protects you from future changes and are a supported scenario. Spelunking the registry directly is not. d -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Grabelkovsky, Michael Sent: Saturday, April 01, 2006 11:33 PM To: Windows System Software Devs Interest List Subject: RE:[ntdev] How to extract a device or driver's name? As for me, I don't like SetupDI* interface and in the same situation prefer looking for appropriate data in the registry directly. All data which SetupDI* may give you are in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\.... Regards, Michael. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=3D256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=3DListServer
  Message 20 of 25  
02 Apr 06 20:04
ntdev member 8437
xxxxxx@windows.microsoft.com
Join Date:
Posts To This List: 1404
How to extract a device or driver's name?

That will work until the PNP team decides that they want to change the structure of the registry (it's undocumented, so they can do that) or decide they don't want to keep the data in the registry anymore. At that point your app will stop working. I agree the SetupDI interface could be better. But it is the right way to get this sort of information. -p=20 -----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Grabelkovsky, Michael Sent: Saturday, April 01, 2006 11:33 PM To: Windows System Software Devs Interest List Subject: RE:[ntdev] How to extract a device or driver's name? As for me, I don't like SetupDI* interface and in the same situation prefer looking for appropriate data in the registry directly. All data which SetupDI* may give you are in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\.... Regards, Michael. --- Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=3D256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=3DListServer
  Message 21 of 25  
03 Apr 06 03:42
ntdev member 27653
xxxxxx@ca.com
Join Date:
Posts To This List: 39
How to extract a device or driver's name?

Doron, Peter! I'd like agree about SetupDi* advantages. But some events and privet experience have pushed me analyze registry. I name only the mains: 1. About year ago I tried to use Protocol NDIS example from Microsoft DDK. It is loading and even working about. But!!! Computer hangs up on the reboot, if the driver remains in the memory. The reason was the attempt the Protocol driver reconfiguration via SetupDI*. I receive the stable allergy to SetupDI* after. 2. I right now have finishing the huge code which analyzes a lot of Registry sections comprising Hardware installation info. Code has been checked for every Windows version from W2000 to W2K3. It works perfect and (the most important!) has NOT any branch, dependently from OS version. Obviously, it is not guarantee from future problems. But who from us has these guarantees...? :) 3. Unfortunately SetupDi* doesn't deliver all useful information which I need. As example only, it has NOT callback about hardware configuration changes. 4. I myself one time had been forced edit registry after hardware installation due it was the single way to close the SetupDI* problem. I agree with you, I would prefer using official documented API. But if this API would be defined and written better, than SetupDI* done... Regards, Michael.
  Message 22 of 25  
03 Apr 06 14:41
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11487
How to extract a device or driver's name?

Doron Holan wrote: >Programming is hard. Plain and simple. Some problems are simple, some >are hard. Some APIs you like, some you don't. Going behind the back of >those APIs and getting at the data yourself will only cause problems for >you and your customers. > > That's true. However, I have to say that the SetupDi APIs are among the most arcane and obscure APIs in the entire Win32 set. Despite the fact that I have written several, I seriously doubt that I could successfully create a SetupDi-based program from scratch with the MSDN docs, without being able to cut-and-paste working code from a sample. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 23 of 25  
03 Apr 06 15:10
Michal Vodicka
xxxxxx@upek.com
Join Date: 02 Apr 2004
Posts To This List: 1612
How to extract a device or driver's name?

> ---------- > From: = xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com]= on behalf of Tim Roberts[SMTP:xxxxx@probo.com] > Reply To: Windows System Software Devs Interest List > Sent: Monday, April 03, 2006 8:40 PM > To: Windows System Software Devs Interest List > Subject: Re: [ntdev] How to extract a device or driver's name? >=20 > That's true. However, I have to say that the SetupDi APIs are among = the > most arcane and obscure APIs in the entire Win32 set. =20 >=20 I guess the word 'obnoxious' is the most accurate here :) > Despite the fact that I have written several, I seriously doubt that I = could successfully > create a SetupDi-based program from scratch with the MSDN docs, = without > being able to cut-and-paste working code from a sample. >=20 It is possible and necessary for non-trivial cases which can't be find = in the samples. Time consuming and unnecessarily hard. Docs should = contain the relations between APIs, ideally as a graph. I wonder if = there is any person in the world, including Setup API inventors, who = fully understands it and who'd be able to describe all relations. If it = is even possible. Sometimes it is better to throw out the monster and = design new one from scratch. Best regards, Michal Vodicka UPEK, Inc. [xxxxx@upek.com, http://www.upek.com]
  Message 24 of 25  
09 Apr 06 13:48
Maxim S. Shatskih
xxxxxx@storagecraft.com
Join Date: 20 Feb 2003
Posts To This List: 10395
How to extract a device or driver's name?

Correct. DevicePath is the one which can be passed to CreateFile. In fact, the only purpose of the "device interface detail" entity is to provide you with the openable filename. Maxim Shatskih, Windows DDK MVP StorageCraft Corporation xxxxx@storagecraft.com http://www.storagecraft.com ----- Original Message ----- From: "Harsha Inamdar" <xxxxx@yahoo.com> To: "Windows System Software Devs Interest List" <xxxxx@lists.osr.com> Sent: Thursday, March 30, 2006 2:38 AM Subject: [ntdev] How to extract a device or driver's name? > Hi All, > > I am trying to extract a name of the device or the driver from > typedef struct _SP_DEVICE_INTERFACE_DETAIL_DATA_A { > DWORD cbSize; > CHAR DevicePath[ANYSIZE_ARRAY]; > } SP_DEVICE_INTERFACE_DETAIL_DATA_A > > defined in DDK. <...excess quoted lines suppressed...> doesn't have the name field. It gives the DevicePath but not device name. > > Thanks, > Harsha > > > --------------------------------- > Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates. > --- > Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 > > To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  Message 25 of 25  
09 Apr 06 19:16
Maxim S. Shatskih
xxxxxx@storagecraft.com
Join Date: 20 Feb 2003
Posts To This List: 10395
How to extract a device or driver's name?

> That's true. However, I have to say that the SetupDi APIs are among the > most arcane and obscure APIs in the entire Win32 set. Despite the fact Some of the PnP IDs (I think Instance ID) are just not available via SetupDi. Maxim Shatskih, Windows DDK MVP StorageCraft Corporation xxxxx@storagecraft.com http://www.storagecraft.com
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 06:35.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license